TIFF and LibTiff Mail List Archive

2009.11.20 17:01 "[Tiff] tiff 4.0 beta5 and YCbCr w jpeg compression question", by John Evans

I've a question about the code in tif_jpeg.c in beta-5. The function "TIFFInitJPEG" has changed from 3.9.2 to beta-5 in that 3.9.2 has its last line reading

         * Mark the TIFFTAG_YCBCRSAMPLES as present even if it is not
         * see: JPEGFixupTestSubsampling().

This is not present in beta-5, meaning that running tiffinfo in beta-5 against, say, "quad-jpeg.tif" will not print the YCbCr subsampling coefficients. The coefficients will print out, however, on "ycbcr-cat.tif" as that one has LZW compression instead of JPEG.

If that line of code is added back in, tiffinfo will again print out the subsampling coefficients for quad-jpeg.tif, so I'm wondering if leaving that last line out was intentional or accidental? If accidental, I'll be happy to file the bug report with patch.