Roger <[EMAIL PROTECTED]> wrote: > Does anybody have a pointer to a Python library/utility that will > extract the chrominance and luminance quantization tables from > JPG images? > > I have been using the _getexif method from PIL, which works fine, > but doesn't extract the quantization data. I am a bit fuzzy on > the terminology, but the quantization data seems to be JPEG data > rather than EXIF data. One utility that extracts the > quantization tables is JPEGsnoop -- there is a link to download > the utility here: > http://www.impulseadventure.com/photo/jpeg-quantization.html > > The source code for the above isn't available and may not be > callable from a Python script even if it were available. > > Roger >
I don't know what the format is, etc, but jpegs I open with PIL have a quantization attribute, e.g: >>> im.quantization {0: array('b', [6, 4, 4, 5, 4, 4, 6, 5, 5, 5, 6, 6, 6, 7, 9, 14, 9, 9, 8, 8, 9, 18, 13, 13, 10, 14, 21, 18, 22, 22, 21, 18, 20, 20, 23, 26, 33, 28, <snip a bunch more numbers> max -- http://mail.python.org/mailman/listinfo/python-list