[thelist] ImageMagick and convert

Juha Suni juha.suni at sparecom.fi
Tue Oct 3 07:52:24 CDT 2006

Bob Meetin wrote:
> The command seems to work, but I don't understand the results.   At
> best I would expect quality of 100(%) to get me an image about the
> same size as the original, but no, it is approximately double,
> turning a 182k image into 406k.  Adjusting to 50(%) results in 94k
> and 30(%) results in 69k with 10% to 35k and a worthless file.
> What am I missing, why does 100% more than double the file size?

Without delving too deep into the issue, or the way ImageMagick handles the 

I assume you are talking about jpeg-images. Jpeg is a lossy algorithm, and 
therefore re-saving over and over again is already a pretty bad idea. Every 
save, no matter the quality setting, will decrease the actual quality of the 
image, while not necessarily decreasing file size.

Example image, a semi-large photograph, for example 1280x1024 pixels. When 
you save it as jpeg with, for example, 80% quality setting, you might end up 
with a file of 100KB. The quality is pretty good, although zooming closer 
would reveal the jpeg compression artifacts. Now reopen that jpeg in the 
editor of your choice. For the image-editor, for most purposes, this is just 
another 1280x1024 file, which is assumed to be full quality just the way it 
is, along with its jpeg artifacts. Save the image again as jpeg with the 
quality set to 100%, and it is pretty much as saving any other 1280x1024 
pixel image with a 100% quality - the file size will propably be over 200KB. 
With the second operation you have just more than doubled the file size 
without improving quality at all. Had you used 90%, you would have actually 
degraded the quality while still making the filesize larger.

In general opening and resaving jpegs is a very very bad idea quality-wise. 
You should always open the original, and with a single operation save it 
with the quality you wish to use.

Some photo editors propably have ways to fight this problem to a degree, and 
most likely there is some ImageMagick-weirdness happening here also. As a 
rule of thumb, however, don't do jpeg resaving, not many times anyway.


More information about the thelist mailing list