Why does ImageMagick give different JPEG quality settings than PDFNet?

Q:

We’re using setJPGQuality during XOD conversion to specify the quality of JPEG compression of the images embedded in the output XOD file. We use a program called “identify” in Linux on the images that are created in the Xod file, and it tells us that the quality is 75, not 90. Why?

A:

JPEG does not encode a “quality” setting in the image file. ImageMagick’s “identify” utility guesses values of JPEG quality, using its own heuristic (http://superuser.com/questions/62730/how-to-find-the-jpg-quality). We use a different JPEG compression library than ImageMagick, and thus these quality metrics do not match.

The following article has more information about measuring JPEG compression quality (“There is no widely accepted method for specifying the JPEG quality…”):

http://fotoforensics.com/tutorial-estq.php#Algorithm