[Openicc] [cairo] Creating CMYK and spot colors using Postscript backend

Bill Spitzak spitzak at thefoundry.co.uk
Tue May 15 13:18:06 EEST 2007


I don't think this is as complicated as people are making out.

Worrying about ICC profiles, etc, is wrong. The backend *can* use them, 
or not. What is true is that the Cairo must pass all these color types 
through, with NO interpretation, to the backend. The backend can do 
whatever it wants, including calling some simple converters that are 
provided by Cairo.

The simple converters provided by cairo will turn CMYK into RGB using 
the 1-c, etc style of conversions. THIS FUNCTION IS FIXED, it never ever 
ever ever changes, no matter how many ICC profiles or color calibrations 
your computer has. A backend can of course implement it's own conversion 
from CMYK to RGB, or keep track of 4 or more channels itself (and thus 
also convert RGB to it's own CMYK).

The simple converter provided by cairo will turn a "spot color" into 
CMYK by throwing away the spot color name. Then the CMYK color is 
converted as above. A backend can instead try to remember the spot 
color, or make it another channel, or (most likely I think) only use it 
directly if it is being set as the source color (drawing a spot color 
into another surface and using that as a source would produce the cmyk 
color.

Also if you have color types, PLEASE add "8 bits each of rgba". This is 
necessary so users of Cairo don't have to reverse-engineer the floating 
point conversion and thus lock the cairo implementation into a possibly 
incorrect conversion. Users can detect 1 bit of difference in an 8-bit 
display when colors are adjacent, so any attractive api requires the 
ability to be absolutely certain that the current color is equal to a 
certain pixel in an image.


More information about the openicc mailing list