AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2007.05.14 20:19 "[Tiff] converting YCbCr to RGB", by
2007.05.15 08:46 "Re: [Tiff] converting YCbCr to RGB", by Joris Van Damme

2007.05.15 08:46 "Re: [Tiff] converting YCbCr to RGB", by Joris Van Damme

Elaine,

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.

Best regards,

Joris Van Damme
info@awaresystems.be
http://www.awaresystems.be/
Download your free TIFF tag viewer for windows here:
http://www.awaresystems.be/imaging/tiff/astifftagviewer.html