|
|
| There's more than one way to do things | |
| PerlMonks |
Re: Making jpg thumbnailsby duct_tape (Hermit) |
| on Aug 26, 2003 at 15:54 UTC ( [id://286839]=note: print w/replies, xml ) | Need Help?? |
This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.
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
|
|
||||||||||||||||||||||||