[cairo] Spot colors (and CMYK)

Kai-Uwe Behrmann ku.b at gmx.de
Sun Feb 14 11:56:31 PST 2010

Am 12.02.10, 14:12 -0800 schrieb Carl Worth:
> On Wed, 20 Jan 2010 16:53:41 -0500, Chris Murphy <lists at colorremedies.com> wrote:
>> We do not have the same kind of similarity in device primaries for
>> displays we did with CRT where there were a limited number of
>> primaries
> ...
>> what we need is to get vendors to include reasonably good
>> estimates of their primaries in the display's EDID, and have operating
>> systems automatically build an ICC display profile on-the-fly based on
>> polled EDID information, and set the display profile and perform
>> display compensation across the board.
> That all sounds very good to me. But doesn't change anything I think
> about what belongs in cairo's API. And that's the part I'm most
> concerned about getting right.
> All of the display-device details described would go into the
> implementation of cairo (or below) and need not impact the way users
> specify colors to cairo.

The all is sRGB rule means, cairo can only produce sRGB or smaller output 
and that not even tagged with the according ICC profile, say for PNG, PDF 
or Xlib.

What about print documents, photographs ...? Printers are not sRGB and the 
output for them has to appear in PDF. Cameras offer a wide variety of 
output spaces other then sRGB. To clamp them to sRGB is often 
enough undesireable. Output to PNG in sRGB is often too limiting.

The weak point of the sRGB only rule is, that it does not fit very 
well to cairo's one drawing API on multiple output surfaces feature.

One workaround is to let Cairo belive it obtains sRGB, render the usual 
stuff in cairo but only to the image surface. Pick the image buffer and 
create your own PNG, PDF, Xlib. But do not use cairo for that.
Thats because cairo can not pass the ICC profile data to the PNG or PDF or 
Xlib renderer. It means for work in colour managed applications, all 
except of one cairo output surface is fairly unuseable. But faking cairo 
for a legitime task feels not very well for serious programming.
Please tell if you know better workarounds to the problem of relyably 
passing ICC metadata to cairo output.

Of course one can write a wrapper library to output cairos image surface 
to PNG, Xlib or PDF while preserving the ICC metadata. Then vectors are 
fairly our of scope. That all means duplicating a lot of what cairo 
already does. Would it have to be be a fork or is it easier? I do not know 
exactly. But I guess its much more work then doing the right changes in 
cairo itself.

kind regards
Kai-Uwe Behrmann
developing for colour management 
www.behrmann.name + www.oyranos.org

More information about the cairo mailing list