GNOME Color Manager, preliminary review

GNOME Color Manager, preliminary review

Today we are doing an early review of GNOME Color Manager—a set of free tools to make color management in GNOME and Linux just work™.

GNOME Color Manager project was started by Richard Hughes in late October this year after he had discovered that there was no easy way to make colors on his T61 laptop and his 28" display match. Some other guy would probably stop there, but for a DeviceKit maintainer it was probably just a new interesting challenge.

Is the mission statement clear for you? Not quite? Well, let me try to explain in few words what takes less self-confident people a whole book — why we need color management. Every display in the world has unique color reproduction characteristics which also change over the years. This means that if you edit your holiday photos at home and try to view them at work, they will most likely look different, And if you go to a photolab to print them, the output will look in some third different way, because every printer also has unique color reproduction characteristics that change from paper to paper an from ink to ink. And so on.

To compensate this existential imperfection color management was introduced. It would take forever to explain the principle in all details and nuances, and no single person in the world could probably say he or she knows everything about color management. Well, maybe Bruce Fraser could, but the Great Scott passed away three years ago. In short, key objects in color management are ICC profiles which in one way (LUT) or another (matrix) describe color reproduction characteristics of a device (display, printer, scanner and so on) via device-independent color model like CIE LAB or CIE XYZ.

Scared already? Which is why Richard started the GNOME Color Manager project with aim, in his own words, to help 90% of people to do 90% of what they need to do. Indeed, if you need all the expert options, you'd rather use dispcalGUI for calibration and profiling and ICC Examin for inspecting profiles.

Building GCM

If you intend to build GCM from sources, you really want having GNOME 2.28 installed on your system. You will also need libgudev, libunique and their packages containing header files. But if you are feeling less geeky, there are builds for both Fedora 12 (see here) and Ubuntu 9.10 (in Pascal de Brujn's repo).

How it works

First of all let's have a look at applications that are part of GCM.

The gcm-prefs applet lives in "System > Options > Color profiles" menu and allows controlling everything related to color management in GNOME: assign profiles to devices, create new devices using measurement devices, define ways to apply display's profile. It also displays a standard CIE diagram that shows color gamut triangle (which colors can be stored in color space defined by the profile) and a tone reproduction curve (TRC) diagram.

A small application called gcm-import that you can call from Nautilus to read profile's metadata, display CIE diagram and import the profile to use it from gcm-prefs.

The gcm-session application is an on-demand loaded D-BUS service which allows e.g. fetching information, what working color space is preferred and so on. The app should be feeling pretty lonely right now, because it's not quite used yet. Two applications that might use it soon are GIMP, which uses D-BUS to a very small extent since 2.4, and Inkscape, which will soon feature D-BUS support thanks to work by Soren Berg as part of his Google Summer of Code 2009 project.

The gcm-apply applications is a hack-around that allows restoring changes broken by dehibernation and screensaver dim.

There are several more smaller utilities which you most likely will never have to use. Let's not concentrate on them right now

So now that we know, what's inside, let' have a look at what happens when you launch Color profiles applet. The applet uses udev to detect available devices of the following types:

  • displays, any supported by XRandR;
  • printers, only HP and via HPLIP;
  • scanners, supported by SANE;
  • digital still cameras, supported by gPhoto;
  • video cameras, supported by video4linux.

There are three remarks I have to make here. First of all, applying an ICC profile to a printer doesn't work yet, basically because it requires collaboration with CUPS project, where color management support is not complete yet. Then, the limitation to HP printers exists only because this is what Richard has. If you can create udev rules, feel free to contribute support for devices by other vendors. Finally, you really want a pnp.ids file (from hwdata package), which is sadly absent e.g. in Ubuntu 9.10.

So after discovering devices the applet one way or another reads information about them. In case of displays, for example, gcm-prefs reads EDID and pnp.ids. After choosing device you can define a profile and finetune settings like gamma, brightness and contrast. The rest if easier to explain on a real example.

Calibrating profiling displays

Let's make it clear: what is usually called display calibration is in fact calibration and characterization (or profiling). Calibration itself is just bringing a display to a known typical state which usually corresponds to default factory settings. But the rest of work — measurement and profile creation — is called characterization.

For characterization GCM uses a utility called dispcal from Argyll CMS. Supported measurement devices as of v1.1.0RC4 are:

  • X-Rite/Gretag-Macbeth Eye-One Pro;
  • X-Rite/Gretag-Macbeth Eye-One Monitor;
  • X-Rite/Gretag-Macbeth Eye-One Display 1, 2 or LT;
  • X-Rite ColorMunki;
  • Pantone Huey;
  • MonacoOPTIX;
  • ColorVision Spyder 2 and 3;
  • Colorim?tre HCFR.

Spyder3 and ColorMunki are actually supported only in Argyll (1.1.0 RC4 at the moment of writing). Right now you can easily find Pantone Huey, i1 Display 2, Spyder3 and ColorMunki in its various versions (unless you are scared away by the price).

So you click the Create profile for device button and see a dialog which clearly explains what you need to do to calibrate your display.

Display setup dialog

Ideally this should be done automatically by sending special commands to display via DDC/CI. Unfortunately, the DDCcontrol project which would be quite helpful here, especially since it contains a GNOME applet, is rather developerless for a couple of years already.

The next step is to attach measurement device and place it in the middle of the screen (this will work even for netbook screens). One thing I need to mention here is that when building GCM you can specify --enable-hardware-detection option which demands a patched version of Argyll which can detect attached measurement devices. An already pacthed version can be found in Pascal de Brujn's repository for Ubuntu, and you can also install Richard's friendly fork called hargyllcms. You don't really have to use this option, because all it does is make the Create profile for device button automatically available when a device is attached.

Please attach device

The characterization itself is done in two stages. First — a preliminary measurement:

Getting default parameters

Then comes the second round of measurements:

Drawing the patches

Here is how it looks from the outside (pardon the office environment and reflections)

The squares are drawn above all windows, but mouse cursor will still be above, so it's best to cease mouse activity for the time being.

It takes about twelve minutes to get the job done. What you have in the end is a ready to use, automatically imported and applied ICC profile for your display:

The profile is created and applied

The ICC file is saved in $HOME/.color/icc/ directory. You can switch to Profiles tab to view metadata, CIE diagram and tone reproduction curves (TRC).

Profiles tab in the applet

The last tab contains default options and the display related part of them demands explanation perhaps.

Defaults tab in the applet

The loaded profile does exactly this: it reads the data from vcgt tag of a profile and saves it to the color lookup table of your video adapter. That way colors are corrected globally. But color managed applications need to know about it, so an _ICC_PROFILE atom is written to X server. There are just two applications that can read this atom right now (with a third one not yet officially released, more on that soon): GIMP and Inkscape.

In GIMP's Preferences dialog you need to enable this checkbox:

GIMP

And in Inkscape's one:

Inkscape

By the way, if you have a dual-head configuration, you need XRandR 1.3 supported, otherwise it won't work properly. For single-head configuration XRandR 1.2 is enough.

As for working space and rendering intent options in the Defaults tab, they are not working in the currently released version, but the next release is featuring them for sure as you can see on the screenshot far above.

Scanner and DSLR calibration

What you need here is scanned or photographed image of an IT8 target and a reference file for it.

From gcm-prefs you can create a profile for a scanner or a DSLR using Argyll tools. All you need is a 16 bit TIFF file of a reflective IT8 target IT8 in TIFF, cropped at white crop marks, and a reference file for it. A 5?7" target will be quite enough. The best way is to buy a target from Wolf Faust who sells them quite cheap and recently made reference files free as in speech.

The process of creating the profile is a no-brainer really: you pick a device, click the "Create profile for device" button and successively point the application to the image and the reference files. That's it.

However, right now there isn't much point in it, because none of XSane, Gnome Scan and the newly created Simple Scan can talk to GCM via D-BUS, and only the first of them is color managed. But at least Simple Scan's developer recently approached Richard with questions how to mate the two applications.

System-wide configuration

To make your preferences available to all users of a system you can use the Make Default button in the bottom of the dialog. What it will do is ask for superuser password and copy all the active display profiles to a system-wide directory (/var/lib/color) where the new filename matches the device-id. So when a new user logs in, if there is no device-profiles entry for the device, the system-wide profile is used.

Future plans

There is a number of features that are planned to be implemented. For example some currently disabled functionality like creating a simple profile without measurement devices demands LittleCMS2 which doesn't have stable API yet. There is also an interesting C class called GcmImage which can later be used instead of GtkImage, so that you have color managed images out of box in your application.

As for the rather distant future, there is supposed to be collaborative work with projects like CUPS, HPLIP, GIMP, Inkscape. Implementing printers profiling isn't really a technical issue: Argyll can handle a number of devices (mostly X-Rite DTPs) just fine. It's using profiles with HPLIP/CUPS that is a headache right now.

For a number of reasons Richard decided not to go for Oyranos framework which allows setting flexible centralized color management policies. Oyranos is currently used in color management applet for KDE4, but due to the applet's development pace it's unlikely for us to see the applet in upcoming KDE 4.4. As a matter of fact. GCM itself most probably won't make it to GNOME 2.30, but its inclusion into GNOME 3 is already quite realistic.

Since GCM allows setting working color space for applications and provides methods of requesting this information. Most likely tools to use these settings are GIMP, Inkscape, F-Spot and suchlike.

Finally, here is how you can contribute:

  • create udev rules for other printer vendors;
  • make your application talk to GCM via D-BUS;
  • send patches;
  • improve documentation;
  • translate GCM.

You will be able to talk to Richard Hughes in person at FOSDEM on February, 6th-7th in Brussels. His talk on GNOME Color Manager will be on 6th.

Was it useful? There's more:

2 Responses. Comments closed for this entry.

  1. Thanks for that great article!!!

    I was amazed to see that my Spyder 3 was recognised automatically by Gnome and that the calibration process went on so smoothly thanks to Gnome Color Manager and ArgyllCMS.

    For the record, I am using the latest Fedora 16 and I did install ArgyllCMS myself (it was not already installed). Shouldn’t it be a dependency of Gnome Color Manager?

  2. Alexandre Prokoudine 20 November 2011 at 7:57 am

    Thanks :) The review is rather outdated due to all kinds of changes. Ishould probably write a newer one.

    ArgyllCMS indeed should be a dep. I’ll tell Richard.