2007.05.15 08:46 "Re: [Tiff] converting YCbCr to RGB", by Joris Van Damme
I'm trying to convert a OJPEG compressed image from YCbCr to RGB.
I've seen that for JPEG compression you can set the JPEG color mode flag to have the jpeg library do the color conversion. Does anyone know if we can do a similar thing for OJPEG?
I've also been trying to use the TIFFYCbCrtoRGB function, but haven't had any luck with it.
No, there is no such pseudo-tag for the OJPEG decoder.
The easiest way to access an OJPEG image is through the RGBAImage functions. These do conversion from YCbCr to RGB, and also deal with subsampling. If you want to do it yourself, I suggest you temporarilly do it with the RGBAImage functions first and trace through them as that'll give you a good indication.
Joris Van Damme
Download your free TIFF tag viewer for windows here: