Using Imager module to resample images
- From: Jason Carlton <jwcarlton@xxxxxxxxx>
- Date: Tue, 29 Jan 2008 03:08:11 -0800 (PST)
I've been forcing my visitors to resample their images manually to
keep them below 50kb, but this has only had so-so results. A lot of my
visitors don't understand how to resample their image, so I'm getting
high-resolution images that are something like 20px x 20px, but still
take up 50kb!
So, I've been thinking about resampling the images on the fly. The
images would be restricted to JPG, JPEG, GIF, and PNG.
I was planning to use a combination of Image::Resize and Imager, which
I've never used before, but since the load on the server is ALWAYS
high, I had a few questions first:
1. Will the use of Imager take up a lot of CPU resources?
2. How do I recognize an animated GIF from a static GIF?
3. Does Imager compress JPG images automatically? I didn't see an
option to set a compression level in the docs, but it may be called
something else that I'm not recognizing.
4. I assume that I'll need to use Image::Resize to get the current
width and height, and if it exceeds the maximum that I input then I'll
use Imager to resample it. Is there a smarter (read: simpler and/or
less resource-heavy) option that this?
TIA,
Jason
.
- Follow-Ups:
- Re: Using Imager module to resample images
- From: Martien Verbruggen
- Re: Using Imager module to resample images
- From: zentara
- Re: Using Imager module to resample images
- Prev by Date: Posting Guidelines for comp.lang.perl.misc ($Revision: 1.8 $)
- Next by Date: Re: Using Imager module to resample images
- Previous by thread: FAQ 9.21 How do I use MIME to make an attachment to a mail message?
- Next by thread: Re: Using Imager module to resample images
- Index(es):
Relevant Pages
|
Loading