db2admin has asked for the wisdom of the Perl Monks concerning the following question:
Does anyone know how to reduce the image file size using image magick. It seems when I use the Scale method the dimensions are reduced but the file size does not get reduced enough. For instance, a 400k image is only reduced to 160k which is not acceptable for web download. I have tried using the Sample method but do not see any difference when compared to the Scale method. I would like to take a 400k+ image and resample to 35 to 40k. The image is JPG format. Below is a snippet of how I am trying to sample:
Thank you for your input.$imgfile = "photo.jpg"; $geometry = ($newwidth x $newheight); $im->Sample(geometry => $geometry); $im->Write("JPG:../images/$imgfile");
David K.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Image Magick - Sample vs. Scale
by steves (Curate) on Mar 01, 2003 at 10:15 UTC | |
by db2admin (Acolyte) on Mar 01, 2003 at 20:39 UTC | |
by mood (Initiate) on Dec 12, 2008 at 17:45 UTC | |
|
Re: Image Magick - Sample vs. Scale
by caedes (Pilgrim) on Mar 01, 2003 at 13:22 UTC | |
by db2admin (Acolyte) on Mar 01, 2003 at 20:38 UTC | |
|
Re: Image Magick - Sample vs. Scale
by shotgunefx (Parson) on Mar 01, 2003 at 22:32 UTC |