[cairo] [RFC] Color space API (partial proposal)

Kai-Uwe Behrmann ku.b at gmx.de
Sun Feb 28 04:51:27 PST 2010

Am 27.02.10, 00:45 +1030 schrieb Adrian Johnson:
> Chris Murphy wrote:
>> And to put a clearer point on this, I think you are fine implementing case 
>> #1 and case #2. I don't think you need to beat yourselves up supporting 
>> DeviceN output profiles, and such complex designs from applications. If you 
>> first get to CMYK, and then CMYK +
>>  2 spots. I think that's the vast majority of printing going on, where 
>> special objects (like logos or vector art) are the only objects that 
>> utilize either of the two spots. This would not disallow artists from 
>> forcing interaction of all six colorants, and
>>  producing valid PDF. Previewing and printing them is another matter
>>  and while I'd like the PDF to be self-documenting how to properly preview 
>> and print it, that's presently not the case as far as I'm aware.
>> The Hexachrome workflow, with six primaries, is challenging even with 
>> existing professional applications so I'd get the CMYK + spot stuff working 
>> before even considering 5+ channel color separations with DeviceN output 
>> profiles.
> For case #1 (CMYK). The API proposed at [1] should handle
> this. Is there anything incorrect or missing? An example of usage would be:
> /* Create a PDF surface and cairo context */
> surface = cairo_pdf_surface_create ("file.pdf", 595, 842);
> cr = cairo_create (surface);
> /* Set a CMYK profile to be used as the page color space
> * (and blending space)
> */
> dest_col_space = cairo_color_space_create_icc_from_file
>                                   ("my_cmyk_profile.icc");
> cairo_surface_set_color_space (surface, dest_col_space);

Is this a once only call to each surface? Then it probably could be nicely 
interwoven into the create surface call?

If not it would be trivial to switch the blending space. As mentioned, the 
cost of such a switch should, in my opinion, be expressed in more 
development work, like requiring a new surface with the new blending 
colour space. The cost of such a switch is not only a computational one.
A single blending space space per document mean less complitcation else 
where. API wise I think a single blending space per surface makes 
the concept of blending spaces in cairo even stronger and better

I must admit I have not much glue about spot colours and can only hope 
the blending space concept maps well to spot colours.

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

More information about the cairo mailing list