[cairo] Spot colors (and CMYK)
Kai-Uwe Behrmann
ku.b at gmx.de
Wed Jan 13 08:56:40 PST 2010
Am 13.01.10, 13:43 -0000 schrieb Chris Wilson:
> On Wed, 13 Jan 2010 23:51:43 +1030, Adrian Johnson <ajohnson at redneon.com> wrote:
>> 5) Add CMYK image format support to the image surface.
>
> The consensus always seems to be that we always do blending in RGB space,
> so what advantages does being able to specify colours in CMYK offer?
Consensus among colour people is that each colour needs to be specified.
Rgb says nothing about appearance. That would be a fine start for Cairo
and colour management.
Cmyk blending is often done while printing. As that is not supported
in Cairo, previews of prints will be more or less unsatisfying. But I am
not shure if that should be covered at once, while introducing colour
management.
The reference to a explicitely defined colour space would allow to
play with device and editing RGBs, CIE*XYZ, CIE*Lab, Yuv, ...
Simply use of ICC profiles in order to give a triple of numbers a
meaning.
With Cairo's feature, to flatten a vector graphic out, would come a
responsibility while adding colour space support. It must be clear which
are the colour spaces during the following stages:
* input,
* blending / compositing
* output
Adrian has suggested APIs to specify the input colour spaces on a per
component basis. Thats the best way. I would add to these the following:
/* explicitely specify a image color space */
cairo_public cairo_surface_t *
cairo_image_surface_create (cairo_format_t format,
cairo_color_space_t*color_space,
int width,
int height);
For the other stages:
/* specify traditionally provided input rgb(a) colors as a fallback */
cairo_set_assumed_color( cairo_t * cairo,
cairo_color_space_t * color_space );
/* specify for drawing / compositing operations */
cairo_set_compositing_color_space( cairo_t * cairo,
cairo_color_space_t * color_space );
/* specify for output */
cairo_set_output_color_space( cairo_t * cairo,
cairo_color_space_t * color_space );
cairo_color_space_t can be contructed and internaly used according to the
actual used colour management engine. The colour management system may
vary from platform to platform. It would make sense to pass available
platform specific colour space references as is to Cairo.
kind regards
Kai-Uwe Behrmann
--
developing for colour management
www.behrmann.name + www.oyranos.org
More information about the cairo
mailing list