Friday, April 13, 2007

CMYK and Grayscale graphics contexts

You may think that Cocoa fully supports RGB, CMYK and Greyscale pixel formats. In fact it doesn't.
OK, you are able to load and display various file and pixel formats.
But if you'd plan to write a pixel format converter, you will find out that Quartz does not support CMYK+Alpha and Grayscale+Alpha in bitmap graphics contexts. This is documented correctly. See "Supported Pixel Formats" for details.
That means a pixel format conversion by drawing a RGB+A image into a CMYK+A image context is simply impossible. You'd have to do it by hand.

These unsupported pixel formats also cause another gap:
You cannot create a CMYK+A or Grayscale+A bitmap context to draw objects directly to it.

I filed an enhancement request to apple in August 2005 ( Problem ID: 4225167).

No comments: