[cairo] Adding a color management interface to GTK
hughsient at gmail.com
Thu Jan 21 03:46:07 PST 2010
2010/1/21 Jon Cruz <jon at joncruz.org>:
> So, does the W3C position of defaulting to sRGB come into play?
Quite often. If the image doesn't have an embedded profile, then we
treat it as sRGB. If there is no output profile, then we treat it as
sRGB also. If we're doing sRGB -> sRGB then it's a NOP.
If you do gtk_color_transform_pixbuf_in_place (profile, NULL) then the
NULL implies sRGB, as it's such a common space.
> One other aspect to keep in mind would be to try to make things easy to use defaults for yet still easy to override
Sure, currently I'm thinking applications just need to set a
gtk_image_use_embedded_profile() type function, and default to OFF for
most pixmaps. This ensures we don't try to correct the image twice (in
the case of eog), or that we're wasting cycles trying to color manage
a 'tick' in a check button.
> However for those apps who do need some more control it would be nice to keep the API away from an all-or-nothing approach and more towards an easy to hook successive levels sort of API.
I've tried to do that by exposing the Profiles and Transforms
separately. If you've got any API ideas, I would welcome
More information about the cairo