Page 1 of 1

Extracting JPEG quantization tables

Posted: 2012-08-14T08:04:02-07:00
by findus
I would like to extract the quantization tables (also referred to as quantization matrices) from JPEG files, is it possible to do this with some imagemagick component?

Re: Extracting JPEG quantization tables

Posted: 2012-08-14T09:16:31-07:00
by magick
Consider calling the JPEG delegate library API directly to extract the JPEG quantization tables. ImageMagick accesses them in the coder/jpeg.c module but they are not exported.

Re: Extracting JPEG quantization tables

Posted: 2012-08-15T00:06:07-07:00
by findus
magick wrote:Consider calling the JPEG delegate library API directly to extract the JPEG quantization tables. ImageMagick accesses them in the coder/jpeg.c module but they are not exported.
Where can I find this library?

Re: Extracting JPEG quantization tables

Posted: 2012-08-15T10:44:33-07:00
by fmw42
findus wrote:
magick wrote:Consider calling the JPEG delegate library API directly to extract the JPEG quantization tables. ImageMagick accesses them in the coder/jpeg.c module but they are not exported.
Where can I find this library?
Search google for libjpeg. or see http://www.imagemagick.org/download/delegates/

Re: Extracting JPEG quantization tables

Posted: 2013-04-16T14:25:17-07:00
by NicolasRobidoux

Code: Select all

djpeg -verbose -verbose -verbose input.jpg junk.tga
will do that for you.
djpeg is part of the libjpeg and the libjpeg-turbo (often through the libjpeg-turbo-progs package in linux) libraries.
If your chip supports libjpeg-turbo, you are generally better off using it.
Warning: the libjpeg API is not as stable as one would wish. libjpeg-turbo's is more stable, and explicitly documented as matching specific versions of the libjpeg library. The features of libjpeg that libjpeg-turbo does not implement are not really useful.