Color Managed Monitor I

Let’s get rolling: after we described the principles of CM (Color Management) and how they can be help us making our photographic experience less of a pain, let’s move on with the first practical step: the monitor.

Preamble (man, that sounds serious)

Now before moving further (well, before starting, really…), I just would like to make a couple of points:

  • There is no point color managing a monitor if you leave your printer “uncolormanaged”. That is why there is so much importance on CMS (for system). The CMS should include (or at least take into account) all the components of your graphic chain: camera, scanner, raw processing software, editing software, monitor, printer… See now why I started a blog on Linux Photography?
  • We will not deal with scanning in detail. We also assume that the image we got from the camera is in AdobeRGB (or sRGB), so there is nothing special to do on that side. The fun begins when you upload your pictures from the memory card onto your (Linux) computer.

Monitor – generalities (man, that sounds boring)

In the old times, we had CRT monitors: huge, heavy and bulky, but with excellent color rendition. The first generations of flat screens were really not up to par with their ancestors when it comes to color accuracy (remember, we still talk about photography here, not gaming…). It was that bad that they were considered impossible to use for photographic work. Things have evolved since and apparently, the current technology is fine for a photographic usage – I still have an old CRT :)

The French magazine Chasseur d’Image started testing (flat) monitors and, while some models do better than others, most of them (even cheap ones) are decent enough. However, a cheap laptop screen is out of the game…

Another warning: screens are sold to look nice and deliver a flattering image. When you go through the process of calibration (putting your screen in a color management ready state) the image will look a lot less flattering. Usually yellow and unappealing.

  • First, remember that even if less flashy, that is closer to “true colors” which is what we are after (if not, then you should have stopped reading long ago).
  • Second, you will get used to it: when the screen changes from its nice, contrasty, blueish colors to a yellowish unappealing image, it hurts the eyes. Now look elsewhere for 2 minutes and go back to it: without direct comparison, your eyes adapt.

Monitor calibration: getting an ICC profile

We said earlier that what we need is an ICC profile (or ICM for Monitor, but it is essentially the same thing) that describes how the monitor displays colors. The idea is to “ask the monitor to show a pure red and measure what we get”. Do the sames for different colors and intensities and you get a table that says how this specific monitors displays color. Yes, the table is the ICC profile.

Now since things can never be simple, your ICC profile will match that monitor with these settings. Change your brightness and you need to redo the operation. It is advised to redo it anyway every month (or so) to take into account the aging of the monitor…

In order to do the measurement, you need a piece of hardware – our eyes are not measuring instruments… The price starts at about $80 up to several hundreds. I have the cheap version (the first one that was affordable) a Colorvision Spyder. Unfortunately, there is currently no driver for Linux for the device, so I have to generate my profile in Windows. Some models are supported by Argyll CMS (we will talk about Argyll later), but mostly top of the range (ie, more expensive) models.

So after you stick your colorimeter on the screen, you are asked to tune your brightness and contrast parameters (remember not to touch them anymore…) and the software starts drawing color patches on screen that are measured by the hardware. All of that takes a few minutes and you end up with an ICC (or ICM) profile.

That is the simple version. If you take a more pro approach, you will need to chose your gamma, white point, and possibly further tweaks… Let’s just say that 2.2 gamma and 6500 K white point (the defaults for PC) is all right, unless you know what you are doing and why.

You can get your Profile in C:/Windows/System32/spool/drivers/color (?!??) and reboot in Linux.

Using the profile in Linux

The profile we just created contains 2 things:

  • information for the video card about how it should display colors by default. That is called calibration: brining the monitor to a known default state of displaying colors. This part is loaded by the video card and makes a difference on how everything is displayed on your monitor (makes it yellowish).
  • information for color management aware programs about how to fine tune color rendition. This part is only used by the specific software (most recent version of The Gimp, Cinepaint, Scribus and others)

We will just talk about the first step for now. Basically you need to tell your video card to display colors according to the monitor profile. There are two utilities that do that for you: xcalib and dispwin (part of Argyll).

Basically, you just enter:

xcalib /path/to/iccprofile.icc

in a terminal and you should see your screen turning yellowish (that is a good sign, remember). An equivalent would be:

dispwin /path/to/iccprofile.icc

xcalib (web) is a little utility that only loads your profile information into the video card. dispwin is part of a very broad range of (command line) utilities for CM called Argyll CMS (web). Argyll CMS allows (for the parts I understand):

  • to profile a monitor with selected hardware
  • to load profile information in the video card (dispwin)
  • to generate a vrml file representing the gamut of one or more ICC profile or the colors used on one image (more on that later)
  • to transform images from one profile to another (more on that later, too)

While neither xcalib nor ArgyllCMS are part of the readily installable software range of Ubuntu/Debian both provide binary versions for X86 on their site. They are not difficult to compile either, but need quite a lot of “dev” files (for Xorg, most notably). I have and AMD64, so I had to recompile.

Summary

When we are there, we have a screen under Linux that is calibrated. That is, the screen is ready to display “true colors”. More accurately, it is ready to display colors that are as close as possible to the “objective colors” of your camera image, defined in AdobeRGB standard. But in order to not just “be ready” but really to “go and do it”, it needs a “color aware” photographic software.

25 Responses to “Color Managed Monitor I”

  1. Valery Says:

    Hi,

    First, thanks for your site. Very clear and usefull.

    Second, I’ve downloaded xcalib (compiled). So I have this file: xcalib. Where did I put it in order to Ubuntu recognized it and that I can do: xcalib /path/to/iccprofile.icc

    Thank,

    Valery

  2. jcornuz Says:

    Hi there,

    If you have an xcalib file, you’re (almost) done. Just change xcalib’s permissions (in nautilus, right-click the file & choose allow execution like a program) and then copy it (as root) in /usr/bin with “sudo cp ./xcalib /usr/bin” assuming you are in the directory where your xcalib is. That’s it.

    Bonne journée

    Joël

  3. Valery Says:

    Thank you so much. That was it. It works. I had my answer in 30 minutes! Great!

  4. christopher andersson Says:

    I’m getting the following error when trying to make xcalib in ubuntu, any idea what the problem might be?

    pdirty@recycled:/usr/local/xcalib-0.8$ make xcalib
    cc -O2 -c xcalib.c -I/usr/X11R6/include -DXCALIB_VERSION=\”0.8\”
    xcalib.c:41:19: error: ctype.h: No such file or directory
    xcalib.c:42:19: error: errno.h: No such file or directory
    xcalib.c:43:19: error: stdio.h: No such file or directory
    xcalib.c:44:20: error: stdlib.h: No such file or directory
    xcalib.c:46:19: error: fcntl.h: No such file or directory
    xcalib.c:47:20: error: string.h: No such file or directory
    xcalib.c:48:23: error: sys/types.h: No such file or directory
    In file included from xcalib.c:52:
    /usr/include/X11/Xos.h:168:20: error: unistd.h: No such file or directory
    [...]

  5. jcornuz Says:

    Hi there,

    I replied in here

    Take care,

    Joel

  6. jcornuz Says:

    By the way… there is now a 64bit version of xcalib pre-compiled. It is available from xcalib website :
    http://www.etg.e-technik.uni-erlangen.de/web/doe/xcalib/xcalib64

  7. thomas Says:

    I have a Colorvision Spyder2 Express.

    Downloaded and tested Argyll Color Management Beta Release (V0.70 Beta 8) for Linux.
    http://argyllcms.com/downloadbeta.html
    http://www.freelists.org/archives/argyllcms/01-2008/msg00355.html
    http://www.argyllcms.com/argyllV0.70Beta8_linux_x86_bin.zip

    Run “./spyd2en -v /media/cdrom/setup/setup.exe”, which created “spyd2PLD.bin”.
    Run “./targen mytest1″, and then successfully was able to run “/dispcal -yc -c1 mytest1.ti1″, which created mytest1.ti1.cal.

    So Colorvision Spyder2 Express is working on Linux.

    /thomas

  8. julian Says:

    Hi. I’m using xcalib on Ubuntu to load a profile I’ve made in windows. Everytime I boot up or switch user, I need to run xcalib in the Terminal. Is there anyway to get this to run automatically during the boot process? I’m a linux newbie, so assume I know nothing!

  9. jcornuz Says:

    Hi Julian,

    There is a simple solution to do what you need. I’ll try to do a step-by-step howto :)

    1) open your text editor
    2) type in
    #!/bin/bash
    xcalib /path/to/your/icc_profile.icc
    3) save this file as loadicc.sh
    4) right click on it, under properties / permission, tick “allow executing file as program”
    5) Open System/Preferences/Sessions
    6) Chose add
    7) Name: load icc profile, command / browse to your loadicc.sh file
    8 ) Make sure the new entry is ticked

    This will allow you to load your monitor profile on login. There is a problem however with gnome screensaver that removes the profile when it activates. Simple solution: don’t use a screen saver. Better solution: check here and here for a script to circumvent the problem. Note also that clicking on the loadicc.sh file and choosing “run” will load your monitor profile.

    Hope this helps. Take care,

    Joël

  10. julian Says:

    wow, my hero!!! can you recommend a book or books so I can go from newbie to being able to do this stuff by myself?

  11. jcornuz Says:

    Hey Julian,

    Not very heroic. Any terminal command line can be combined into a file. google, ubuntuforums and a lot of time are your 3 best friends here :)

    Take care,

    Joel

  12. Hardy Heron is on its way « Linux Photography Says:

    [...] to load the profile. You can even write a bash script and have your icc profile loaded at session start-up – see a detailed tutorial here. [...]

  13. John Bryden Says:

    Thank you for taking the time to put this site together, it has been of great help. I am now using Linux for everything including photography.

    Take care

    John

  14. Vitor Rodrigues » Blog Archive » Monitor calibration in Linux Says:

    [...] to calibrate the monitor, then export the color profile and import it in Linux. There is an article here on how to do it. With help from one of the comments in that article, I found about Argyll Color [...]

  15. Download an ICC profile for your monitor « Linux Photography Says:

    [...] Numérique which offers freely downloadable icc profiles for some monitors and laptops. You can use them with xcalib on your Linux system. It assumes that you keep your monitor settings as from the [...]

  16. markos Says:

    Ok I import icm profile I created with my Spyder3 using xcalib easy and clear
    But I dont like the colors at all :) … Cant say they are correct.
    I hope argyllcms to bring us support for the new Spyder 3.
    Do you suggest any settings during Windows calibration in order to achieve better results on Linux later importing the icm profile?
    Maybe using different gamma value or what else … I am not an expert.
    thanks

  17. jan Says:

    this is an excellent guide, both tools work perfectly. however, i came to prefer xcalib as you can install it using apt-get. btw, is there a default location where one *should* put icc profiles?

  18. jcornuz Says:

    Hi Jan,

    Thanks for your comment.

    Users profiles should go in ~/.color/icc while system profiles should go in /usr/share/color/icc.

    dispwin also sets the xicc atom (so other color aware application such as eye of gnome, afaik, can pick the profile). I am not sure if xcalib does anything about xicc…

    Take care,

    Joel

  19. Paul Valley Says:

    I’ve loaded xcalib and tried xcalib /usr/share/color/icc/”profile.icc” but my monitor didnt switch to a yellowish color?

    Paul

  20. Monitor calibration: the dispcalGUI way « Linux Photography Says:

    [...] “y” or “any key” in the terminal, you will get an icc profile which you can load with dispwin or xcalib (for screen calibration) as well as your graphic application (for profiling – if the application [...]

  21. Andy B Says:

    Hello,

    Thanks for all the information, I’ve learnt a lot from this blog. I do have one question though. I have calibration my monitor have and have a icc profile. If I apply it to my computer (xubuntu) using xcalib do I also need to need to load the profile into my photography software (gimp, ufraw, raw studio), or will this apply the colour correction twice making the displayed colours incorrected?

    I hope that makes sense.

    Andy

  22. jcornuz Says:

    Hi Andy,

    Yes, you want to load your profile with xcalib and inside your photographic software. I take Cinepaint as an example here: http://jcornuz.wordpress.com/2007/09/27/color-managed-monitor-ii/

    Take care,

    Joel

    • David Edwards Says:

      Thanks for your guides, Joel. I’ve recently moved to Ubuntu from Windows and am just trying to figure out how to get everything set up how I want – and your guides have been a very helpful so far.

      However, I’m a bit confused on this question – where to load a display profile. If I load it for the display as a whole using xcalib or dispwin, it is loaded into the LUT of my video driver and is applied for every application I run, regardless of whether it is aware of colour management. That can be demonstrated visually by loading and unloading the profile while viewing various applications.

      So, why would I also need to tell a profile-aware application to use the display profile too? If the application converts from my working colour space using the display profile, then the colours will get converted again by the video driver. Or are applications such as Cinepaint clever enough to know the profile is already loaded into the video driver and not to do any internal conversion?

      But if what I think is correct – ie, it is not necessary to set the display profile in your graphics application if you’ve loaded it into the video driver, then what should the “display profile” be set to in applications that have a setting for it?

      In comparison, in Windows, I used to load my display profile using Adobe Gammer Loader and then in Photoshop I would work in Adobe RGB. The only other profile I would set in Photoshop was my printer profile, when printing and when soft-proofing.

  23. J-Hob Says:

    Thanks very much for this information, I’m a photographer looking to move over to linux and your blog answered a lot of my colour profiling questions, many thanks!

    I’m intending on running a windows VM from linux to run lightroom, will see how it goes!

Leave a Reply