New Forum | Previous | Next | (P-PDF) Developers
Topic: Converting CMYK JPEGs to RGB
Conf: (P-PDF) Developers, Msg: 123259
Date: 12/3/2004 06:41 AM
I have some CMYK JPEGS which are actually (YCbCr) and I am trying to
convert the values (having decompressed the DCT) to RGB.
I am using the formulae definied in the JPEG spec below. It seems to
work very well on most values, but fail spectacularly on a couple
,mapping white to black.
Any ideas, please?
r = checkRange(Y -CENTER+ 1.402*(Cr-128));
g = checkRange((Y -CENTER) - 0.34414*(Cb-128) - 0.71414*(Cr-128));
b = checkRange((Y-CENTER) + 1.772 * (Cb-128));