2009.12.10 18:28 "[Tiff] YCbCr", by Steve Mills

2009.12.10 19:19 "Re: [Tiff] YCbCr", by

Steve,

What should I expect to be get from a call to TIFFReadScanline when the TIFFTAG_PHOTOMETRIC tag is PHOTOMETRIC_YCBCR? It appears that we're getting rgb, but in the wrong channel order (should be rgb, but is bgr or vise versa). I only have one test document that is supposed to be solid red. It's coming out blue. I don't know how the file was made or how to make another one, otherwise I'd use a file with more colors so I knew for sure what was going on.

Are you using the JPEG_COLORMODE pseudo-tag?

It may also be related to a define in LibJpeg, that specifies the channel order of RGB. It may be that in your own copy of LibJpeg, that define is tuned, whilst LibTiff does not expect that. I don't remember from the top of my head the name of the define, but it should be straightforward to find it in a LibJpeg config file.

Best regards,

Joris