[ic] Interchange should make thumbnails
Gyepi SAM
gyepi at palmdigitalmedia.com
Fri Dec 5 14:42:52 EST 2003
On Fri, Dec 05, 2003 at 01:14:44PM -0500, tom friedel wrote:
> It could use Netpbm utilities to resize an image when it is upoaded.
> I've done that in the custom shopping carts I've written. I think
> thumbnails are best as jpegs as most people have truecolor displays (as
> opposed to 256 colors).
> The code I have converts to 'pnm', calls pnmscale, and then calls
> ppmtojpeg (for example). If I had more time I would undertake this. If
> anyone has any questions feel free to contact me.
You can do this quite easily with Image::Magick, which, of course,
requires the C ImageMagick libraries to be installed also. We use it at
palmdigitalmedia.com for book cover images.
use Image::Magick;
p = new Image::Magick;
p->Read("imagefile");
#You can specify one or both of height and width.
p->Scale(height => $thumbnail_height);
p->Write("thumbnail-imagefile");
modulo error checking and sizing policies.
-Gyepi
--
They know enough who know how to learn. --Henry Adams
More information about the interchange-users
mailing list