Thumbnail images on-the-fly
I've got an idea kicking around in my head .. having a web-directory that can have image files added to it, taken away, or prefaced with "." to have them be ignored temporarily without removing them. initial run of the .cgi indexes the directory into a local database file, and creates thumbnails of each image in the directory (havn't decided whether they should be variable size yet, as I'm not certain about the tool I'd need to use for this) future runs of the .cgi double check the directory, match it against the database and create further thumbnails if necessary, or update the db to reflect images no longer listed, or marked with . as in "do not display" upon updating, it then provides an html-page with the thumbnails laid out in a table for easy clicking by the user. This is pretty straightforward, and I'm sure it's been done in the past. What I'm looking for is a bit of a shove in the right direction from those of you who have walked this path before.. I've never worked with the graphical Perl modules yet, and am really unfamiliar with which tools (i.e. modules) would be the most elegant and efficient for a job like this. any pointers? I'm happy to toddle off and download and read my face off -- that's not a problem.. I'd just like to have some indication on which direction to start walking. :-) print pack "H*", "4a75737420416e6f74686572204d61635065726c204861636b65722c0d"; -- Scott R. Godin| e-mail : [EMAIL PROTECTED] Laughing Dragon Services |web : http://www.webdragon.net/ It is not necessary to cc: me via e-mail unless you mean to speak off-group. I read these via nntp.perl.org, so as to get the stuff OUT of my mailbox. :-) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Thumbnail images on-the-fly
I think you'll need to look at the image magik module for creating the thumbnails. I've looked at this in the past, and come away with headaches, but I believe it's the right tool for the job. Good luck John -Original Message- From: Scott R. Godin [mailto:[EMAIL PROTECTED]] Sent: 16 January 2002 10:24 To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Thumbnail images on-the-fly I've got an idea kicking around in my head .. having a web-directory that can have image files added to it, taken away, or prefaced with "." to have them be ignored temporarily without removing them. initial run of the .cgi indexes the directory into a local database file, and creates thumbnails of each image in the directory (havn't decided whether they should be variable size yet, as I'm not certain about the tool I'd need to use for this) future runs of the .cgi double check the directory, match it against the database and create further thumbnails if necessary, or update the db to reflect images no longer listed, or marked with . as in "do not display" upon updating, it then provides an html-page with the thumbnails laid out in a table for easy clicking by the user. This is pretty straightforward, and I'm sure it's been done in the past. What I'm looking for is a bit of a shove in the right direction from those of you who have walked this path before.. I've never worked with the graphical Perl modules yet, and am really unfamiliar with which tools (i.e. modules) would be the most elegant and efficient for a job like this. any pointers? I'm happy to toddle off and download and read my face off -- that's not a problem.. I'd just like to have some indication on which direction to start walking. :-) print pack "H*", "4a75737420416e6f74686572204d61635065726c204861636b65722c0d"; -- Scott R. Godin| e-mail : [EMAIL PROTECTED] Laughing Dragon Services |web : http://www.webdragon.net/ It is not necessary to cc: me via e-mail unless you mean to speak off-group. I read these via nntp.perl.org, so as to get the stuff OUT of my mailbox. :-) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --Confidentiality--. This E-mail is confidential. It should not be read, copied, disclosed or used by any person other than the intended recipient. Unauthorised use, disclosure or copying by whatever medium is strictly prohibited and may be unlawful. If you have received this E-mail in error please contact the sender immediately and delete the E-mail from your system. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Thumbnail images on-the-fly
I suggest using Image::Magick for generating thumnails. It is painless to do and the resulting files are of good quality. Here is a code snippet: use Image::Magick; my $im = new Image::Magick(); $im->Read($inputfile); $im->Resize( geometry => "200x200" ); $im->Write($outputfile); undef $im; I would also not have the CGI script handle this as it could be slow if there are lots of files to process or very large images. Instead try a cron job (or some scheduled task) to create the thumbnails. So when a new image is uploaded the CGI script handling that could add an entry in a log, then the scheduled task would check the log for files to process and handle them. But that is just a suggestion. Rob -Original Message- From: Scott R. Godin [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 16, 2002 5:24 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Thumbnail images on-the-fly I've got an idea kicking around in my head .. having a web-directory that can have image files added to it, taken away, or prefaced with "." to have them be ignored temporarily without removing them. initial run of the .cgi indexes the directory into a local database file, and creates thumbnails of each image in the directory (havn't decided whether they should be variable size yet, as I'm not certain about the tool I'd need to use for this) future runs of the .cgi double check the directory, match it against the database and create further thumbnails if necessary, or update the db to reflect images no longer listed, or marked with . as in "do not display" upon updating, it then provides an html-page with the thumbnails laid out in a table for easy clicking by the user. This is pretty straightforward, and I'm sure it's been done in the past. What I'm looking for is a bit of a shove in the right direction from those of you who have walked this path before.. I've never worked with the graphical Perl modules yet, and am really unfamiliar with which tools (i.e. modules) would be the most elegant and efficient for a job like this. any pointers? I'm happy to toddle off and download and read my face off -- that's not a problem.. I'd just like to have some indication on which direction to start walking. :-) print pack "H*", "4a75737420416e6f74686572204d61635065726c204861636b65722c0d"; -- Scott R. Godin| e-mail : [EMAIL PROTECTED] Laughing Dragon Services |web : http://www.webdragon.net/ It is not necessary to cc: me via e-mail unless you mean to speak off-group. I read these via nntp.perl.org, so as to get the stuff OUT of my mailbox. :-) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Thumbnail images on-the-fly
Wednesday, January 16, 2002, 10:24:27 AM, Scott R. Godin wrote: > I've got an idea kicking around in my head .. > having a web-directory that can have image files added to it, taken > away, or prefaced with "." to have them be ignored temporarily without > removing them. [snip] > any pointers? I'm happy to toddle off and download and read my face off > -- that's not a problem.. I'd just like to have some indication on which > direction to start walking. :-) If you're feeling a bit sadistic and want to walk for many, many miles you could try to make something as clever as Apache::Gallery. It uses mod_perl, Inline::C and a C libary called imlib2 to do it's thing. The guy who wrote it has a demo site at http://pictures.legart.dk/ Very comprehensive, very good, and a long way to walk - but very educational and a fun trip if you make it over the mountains -- Best Regards, Daniel[EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Thumbnail images on-the-fly
Your choices are basically GD or Image-Magick I've had good experiences with both. Image::Magick is more full featured but slower so if you're doing anything on the fly you should use GD, but if its just a one pass sort of thing (and I think that is what you're doing) then Image::Magick is better suited. There are at least a couple online tutorials for both but I learned how to use them from O'Reilly's "Programming Web Graphics with Perl & GNU Software". That book is starting to get dated since there have been some significant changes in the GD module regarding GIF support but its still a great reference. - Johnathan -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Thumbnail images on-the-fly
This is how I do it on a FreeBSD boxpath is different on linux etc, but works the same and straight from the command line...dunno if it helps. for a in *; do /usr/ports/graphics/ImageMagick/work/ImageMagick-5.3.8/utilities/convert -geometry 128x96! $a thn-$a; done Cheers P. On Wed, 16 Jan 2002, Scott R. Godin wrote: > I've got an idea kicking around in my head .. > > any pointers? I'm happy to toddle off and download and read my face off > -- that's not a problem.. I'd just like to have some indication on which > direction to start walking. :-) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Thumbnail images on-the-fly
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Scott R. Godin) wrote: Many thanks to all of you who responded. :-) One of the things I love the most about these lists -- that one can get so many different perspectives on a problem and solution, because it gives one so much more of an idea of the scope of it. print pack "H*", "4a75737420416e6f74686572204d61635065726c204861636b65722c0d"; -- Scott R. Godin| e-mail : [EMAIL PROTECTED] Laughing Dragon Services |web : http://www.webdragon.net/ It is not necessary to cc: me via e-mail unless you mean to speak off-group. I read these via nntp.perl.org, so as to get the stuff OUT of my mailbox. :-) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]