Extracting JPEG quantization tables
Extracting JPEG quantization tables
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
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
Where can I find this library?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.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Extracting JPEG quantization tables
Search google for libjpeg. or see http://www.imagemagick.org/download/delegates/findus wrote:Where can I find this library?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.
-
- Posts: 1944
- Joined: 2010-08-28T11:16:00-07:00
- Authentication code: 8675308
- Location: Montreal, Canada
Re: Extracting JPEG quantization tables
Code: Select all
djpeg -verbose -verbose -verbose input.jpg junk.tga
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.