Page 1 of 1

How does ImageMagick know JPEG Quality

Posted: 2009-11-17T09:01:56-07:00
by polakos
Where does ImageMagick get the JPEG quality from? This is not stored anywhere in the file. Any help would be much appriciated.

Thanks

Re: How does ImageMagick know JPEG Quality

Posted: 2009-11-17T09:43:03-07:00
by magick
ImageMagick determines the JPEG compression quality from the quantization tables. In some cases its approximate. Add -debug coder to the command line and it will tell you whether the quality is exact or approximate.

Re: How does ImageMagick know JPEG Quality

Posted: 2009-11-18T06:44:51-07:00
by polakos
Excellent! I just found the code block that is used. It would be nice if the identify program had an option for obtaining as much information as it could without actually decompressing the file. We use ImageMagick to scan millions of images at a time just to check JPEG quality. This can end up running for 3 weeks. I have used the method imagemagick uses to check the quality and can now scan much faster. In either case, excellent work!