On Mon, 2007-07-09 at 18:42 +0200, Raphaël Quinet wrote:

> Side note: as suggested by Sven in #gimp, I just had a look at
> ImageMagick to try and find out how they retreive or guess the quality
> settings from JPEG files.  The code is about 100 lines long and can be
> found in ImageMagick-6.3.5/coders/jpeg.c, around line 830.  It is
> based on a comparison of the difference produced by the quantization
> tables in the file with the 100 possible tables produced by libjpeg.
> If no exact match is found, then the closest one is selected.  They
> use pre-computed hashes and sums for the libjpeg tables in order to
> speed up the comparisons.  The license of ImageMagick is compatible
> with the GPL so we could even consider re-using their code.  We would
> only have to include their license with the jpeg plug-in.

If it can improve a common workflow, it's probably worth it. Please use
the code from ImageMagick then as it should be well tested already. And
please place this code into a separate file in the plug-ins/jpeg folder.


Gimp-developer mailing list

Reply via email to