Saving single quant. table JPEG file with different Q gives bad JPEG
Submitted by Galland
Link to original bug (#613938)
Description
Created attachment 157091 JPEG file with single quantization table and 4:4:4 subsamp. produced by HP Document Manager (from HP scanner)
Source file: JPEG file produced by an HP scanner using HP Document Manager software. Their JPEG implementation uses subsampling 4:4:4 and has the singularity that it uses a single Quantization table (with all coeffs.=2) for both luminance (Y) and chrominance (Cb and Cr).
To reproduce problem in GIMP:
- Open attached JPEG file (produced from an HP scanner by HP Document Manager) in GIMP
- Go to Save As... and save it as a JPG with some other name, the "Save As JPEG" dialog appears: then just change Quality to some other value and hit Save
Problem: Analyze output JPG file (very good tool: http://www.impulseadventure.com/photo/jpeg-snoop.html ) you will see that it now has two Quantization tables, as usual, one for luminance and the other for chrominance components.
While the second table has the coefficients for the Quality factor selected in the save as JPEG dialog, the first table (for luminance) is, here is the error: still the very same Quantization table from the source file (that is all coeffs=2), instead of the corresponding luminance table calculated for the selected Quality factor.
This happens always with single Quantization table input JPEGs, no matter the Quality factor selected in GIMP with "Save As...".
If you need any more information or more files, please do not hesitate to ask.
Thank you very much for your time and the great tool GIMP is. Regards!
Attachment 157091, "JPEG file with single quantization table and 4:4:4 subsamp. produced by HP Document Manager (from HP scanner)":
Version: 2.6.8