Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

So how the heck do you convert CMYK to RGB to make CoreImage happy?

2 views
Skip to first unread message

SM Ryan

unread,
Nov 1, 2006, 4:15:56 AM11/1/06
to
So how the heck do you convert CMYK to RGB to make CoreImage happy?

I don't have a problem with Core Image requiring RGB nor with
having to convert the CMYK before feeding it into a CI pipeline.

But how the hell do you convert a CMYK with attached color profile
into RGB using the profile? I can get rotten RGB by
[representation setColorSpaceName: NSDeviceRGBColorSpace]
but it simply discards the profile. Somebody at Apple knows how to do
it because Preview.app does this, but Apple doesn't seem to want
to share this information.

--
SM Ryan http://www.rawbw.com/~wyrmwif/
TEMPORARILY CLOSED
BE OPENED AFTER FIRST PERIOD

glenn andreas

unread,
Nov 1, 2006, 9:59:54 AM11/1/06
to
In article <12kgpec...@corp.supernews.com>,
SM Ryan <wyr...@tango-sierra-oscar-foxtrot-tango.fake.org> wrote:

> So how the heck do you convert CMYK to RGB to make CoreImage happy?

Naively, you do:
r = 1.0 - (c + k);
g = 1.0 - (m + k);
b = 1.0 - (y + k);

which is plenty fast but the results aren't that great (since it assumes
a "perfect" CMYK and "perfect" RGB color space), but might work f.

The better answer is to use ColorSync, which has all sorts of routines
for converting pixels between different color spaces.

>
> I don't have a problem with Core Image requiring RGB nor with
> having to convert the CMYK before feeding it into a CI pipeline.
>
> But how the hell do you convert a CMYK with attached color profile
> into RGB using the profile? I can get rotten RGB by
> [representation setColorSpaceName: NSDeviceRGBColorSpace]
> but it simply discards the profile. Somebody at Apple knows how to do
> it because Preview.app does this, but Apple doesn't seem to want
> to share this information.


ColorSync is hardly something that Apple is trying to hide...

0 new messages