Just another Perl shrine | |
PerlMonks |
Re: Making jpg thumbnailsby duct_tape (Hermit) |
on Aug 26, 2003 at 19:54 UTC ( [id://286839]=note: print w/replies, xml ) | Need Help?? |
Perhaps use the Imager module since you can not use Image::Magick. It doesn't look like anyone else has recommended that yet. Here is some sample code for resizing a JPEG with Imager.
Also, as other people have said, if you need to generate the thumbnails on the fly, at least do some caching of them. Check if a thumbnail exists and perhaps even compare the timestamps of the thumbnail and the actual image so that you only have to generate the thumbnail when it is absolutely necessary. When I was originally playing around with Imager I found it to be a bit slower than Image::Magick. Unfortunately I do not have any benchmarks... but it is something to keep in mind. Hope that helps. Good luck with your application.
In Section
Seekers of Perl Wisdom
|
|