[thelist] ImageMagick and convert

Brent Eades beades at almonte.com
Thu Oct 5 05:15:37 CDT 2006

Bob Meetin wrote:

>> Wouldn't it just be enough to resample the images to certain dimensions 
>> (800x600?) and save them as 80% jpeg, for example. On average you should get 
>> image sizes that are average for images that size (for the example given I 
>> think we are looking at the range of about 60K to 200K).

Interesting. I had never used the -quality option with ImageMagick, and 
assumed there was something anomalous with either your installation or 
your source photos, to obtain such unintuitive results.

But I tested your scenario on both my Win and Linux installs of 
ImageMagick and got similar results. My source image was a JPEG photo, 
2048x1068, straight from my digital camera.

Using your command -- convert $file -density 72x72 -quality 100 -- 
increased the size of the file from 600K to about 1M, on both Win and 
Linux. There did seem to be a very slight increase in quality (less 
pixellation here and there), but that could be my imagination.

The 'resize' option, however -- convert $file -resize 800x600 -- brought 
the size down to about 110K, while producing quite a decent resampled 
version of the   original. (ImageMagick automatically applies a 
resampling filter when the -resize option is used. Its choice of filter 
depends on the format of the source image, and on whether its dimensions 
are being increased or decreased.)

So... it's not just you :)

BTW, here's an example of one of my '-resize 800x600' tests:


Brent Eades	
Almonte, Ontario

More information about the thelist mailing list