This site has been retired. For up to date information, see handbook.gnome.org or gitlab.gnome.org.


[Home] [TitleIndex] [WordIndex

1. Colour Management in X/GNOME

We need unified colour management in GNOME, so that applications can correct images for display. Otherwise photos look dull and washed out, and designers print their work to find the colours are wrong.

1.1. Current Status

The first release of the ICC Profiles In X specification is now available. (the latest spec)

GIMP 2.4 and Krita (a KDE drawing app) use this specification and there are patches for Eye of Gnome, while Scribus is considering adding support (bug report)

1.2. GdkPixbuf stuff

gdk-pixbuf should either provide the profile embedded in an image in a generic way, or transform images to a standard colour space when they are loaded (say sRGB). I'm torn over this at the moment, if someone has a monitor with a wide gamut or is printing the images from the pixbuf, if the image was transformed to sRGB it could have lost data.

Currently, GdkPixbuf loads image data plainly; it does not apply any gamma correction or do other transformations. The resulting RGB data in memory is "as is".

gnomebug:304253 is about reading the gamma information from a PNG file and correcting the RGB data appropriately. Also, BMP version 4 has extra fields in the header that give curve data for each channel.

The data stored in GdkPixbuf or by Cairo is considered to be sRGB. (Note that for an ARGB image, the alpha channel is however linear.) Currently, compositing in GdkPixbuf or Cairo is not gamma-corrected but this is considered to be something that we'll want to improve in the future when we can do it with reasonable efficiency.

The reason for using sRGB rather than a gamma=1.0 format is partly matching existing practice and working OK when fed without correction to a monitor, but it is also because sRGB is simply a better format for representing image data: since sRGB approximately matches the response of the human eye, to get equivalent quality to 8-bit sRGB requires 10 or more bits for gamma=1.0. (gamma=1.0 images have two many levels near white and too few near black.)

One obvious downside to using sRGB for images is that sRGB with RGB in the range [0,1] doesn't have a very big gamut (hence formats like Adobe RGB). So, eventually, we may want to support additional image formats for Cairo: for example some of the floating point formats that are becoming common now. There is no problem with the specification of colors for functions like cairo_set_source_rgb() because we take floating point arguments so we can use RGB values out of the [0,1] range to get colors not representable in sRGB.

1.3. Other Implementations

Apple uses the ColorSync APIs for this, see the overview or the API reference.

1.4. Current ideas

I (HubertFiguiere) would like to throw up a few ideas here:

1.4.1. ICC profiles

Just because a CMS without profile is useless, we should list available sources:

1.4.2. UI


2024-10-23 10:58