2001.08.18 04:10 "jpeg in tiff", by Joris Van Damme

2001.08.18 05:12 "jpeg in tiff", by Joris Van Damme

Sorry to get back so soon. Really haven't made any progress on this for over two days, but writing about the problem seems to have helped rephrasing it...

What if I wanted complete raster data (not downsampled output) from libjpeg from within libtiff? Meaning that I do not want libjpeg to convert to RGB, but I do want it to output complete scanlines.

I have obtained this by setting the YCbCrSubSampling tags to 1 after reading the tiff header, and commenting out the sanity check in tiff_jpeg (after the remark /* Component 0 should have expected sampling factors */, where sp->cinfo.d.comp_info[0].x_samp_factor and sp->x_sampling are compared).

The normal interface to LibJpeg gets used this way (JPEGDecode instead of JPEGDecodeRaw), alloc_sarray is never used but I do get the unconverted YCbCr I'm after. So this does help. And leaves me with just one question: is the commenting out of the sanity check going to hurt me on some files?