The quality setting is used to create a quantization table which is then used by the compression algorithm. There's no pre-defined mapping between quality and the contents of the quantization table for JPEG (different implementations do different things), but some applications attempt to guess by comparing the quantization tables in the file with known mapping algorithms. I'm not aware of any such code for Python.
If you want to tinker with this, you can access the quantization table of an opened JPEG file via the "quantization" attribute. </F> On Mon, Sep 28, 2009 at 9:08 AM, qiaohl <qia...@ucweb.com> wrote: > Hi,all > Is there any function in PIL to get the value of JPEG quality(1-100)? I > know there are functions to set this value, But I found no function to get > this value of an existing JPEG file. > > Thanks! > > > 2009-09-28 > ________________________________ > qiaohl > _______________________________________________ > Image-SIG maillist - image-...@python.org > http://mail.python.org/mailman/listinfo/image-sig > > _______________________________________________ Image-SIG maillist - Image-SIG@python.org http://mail.python.org/mailman/listinfo/image-sig