Differences between Elle Stone's "GIMP-CCE" and default GIMP-2.10 — unless you have a really good reason to the contrary, use default GIMP-2.10

My "CCE" version of GIMP is an interim version of GIMP that allows to edit in RGB color spaces other than sRGB. Please be aware that GIMP-CCE is strictly an interim project and hasn't been updated since August of 2017. Now that GIMP 2.10 has been released and the conversion to GIMP 3.0 and GTK 3 is well underway, work has already begun on on adding full support for editing in user-chosen RGB color spaces to default GIMP. Once this work is finished, there will be no reason at all for anyone to want to use my "CCE" version of GIMP.

Written June 2016. Updated August 2018.

Introduction and targeted users This article goes over some of the major differences between default high bit depth GIMP and my patched versions of babl/GEGL/GIMP from github, aka "GIMP-CCE". GIMP-CCE is strictly an interim project targeted at users who want to use GIMP for editing in color spaces other than sRGB "right now", before default GIMP finishes adding full support for editing in any user-chosen RGB working space. GIMP-CCE is also useful for helping to test changes that are being made in default GIMP code. As of August 2018, default GIMP 2.10 does still have hard-coded sRGB parameters. So if you want to edit in RGB working spaces other than sRGB, these parameters will produce wrong results for quite a few — though not all — editing operations. GIMP-2.10 takes care of switching the TRC encoding back and forth between linear and perceptualy uniform, so that you, the user, don't have to think about such things. GIMP-CCE allows you to edit in any well-behaved RGB working space, but does require an ICC profile conversion whenever you, the user, want to edit on linear vs perceptually uniform RGB. This article explains some of the differences between default GIMP 2.10 and "CCE" GIMP. Even if you've never used default GIMP you still might want to skim through sections B (where to find well-behaved RGB working space profiles) and C (color management preferences), and then read sections D (LCH color-managed color picking tools) and E (concerning radiometrically correct editing) a little more carefully. For anyone running 64-bit Windows or MacIntosh, Partha very kindly makes "Color Corrected Experimental" versions of my patched GIMP ("Color Corrected" just means you can edit in any well-behaved RGB working space instead of only in the sRGB color space). If you run Linux, Carmelo_DrRaw provides Linux CCE AppImages over on the PIXLS.US website, and of course you can compile GIMP-CCE yourself.

Which RGB working color space(s) can you use? When using default GIMP-2.10, because the code uses hard-coded sRGB parameters, you should only edit sRGB images. This is true as of August 2018 and might not be true at any date later than August 2018. In GIMP-CCE, you can edit in any well-behaved RGB working space, although many editing operations won't produce technically correct results unless you edit in a linear gamma version of your preferred RGB working space. For most editing purposes I recommend that you convert your image to one of the linear gamma RGB working space profiles from my github ICC profiles. My github ICC profiles include the following RGB working space profiles, with TRC variants for each profile (including of course the linear gamma TRC): ACES and ACEScg, Rec.2020, ProphotoRGB, AdobeRGB1998, and sRGB, plus several less commonly RGB working spaces. A well-behaved ICC RGB matrix profile is the kind of ICC profile that we use for normal image editing. These profiles are defined by their white point, colorants and TRC. In the current context we don't need to worry about profile white points. But understanding the two major differences between default and patched GIMP does require a discussion of colorants and TRCs. So here's a quick overview: What are colorants? An ICC RGB matrix profile's "colorants" define locations in the XYZ reference color space that carve out the profile's color gamut. XYZ is a three-dimensional color space, so showing RGB colorant locations in XYZ is not as easy as showing colorant locations on the xy plane of the xyY transform of the XYZ color space. Don't worry about the terminology in the preceeding sentence! Just look at the picture above/to the right for a visual representation of the different colorants for the sRGB and Rec.2020 color spaces. I chose these two color spaces because they are standard display color spaces that are also used for image editing. The respective colorants are located at the corners of the sRGB and Rec.2020 triangles indicated by the blue arrows. The above image was made from these two Wikipedia images: File:CIExy1931 Rec 709.svg (sRGB uses same XYZ values as Rec.709) and File:CIExy1931 Rec 2020.svg, and the Wikipedia copyrights apply. What is a TRC? "TRC" stands for "Tone Reproduction Curve" (sometimes referred to as "Tone Response Curve"). An ICC RGB matrix profile's TRC defines how fast the RGB colors progress from dark to light as the RGB channel values progress from 0.0 to 1.0 floating point (0 to 255 for 8-bit integer, 0 to 65535 for 16-bit integer): A linear gamma (gamma=1.0) TRC reflects the way light behaves out there in the real world.

A perceptually uniform TRC reflects the way our eyes respond to changes in lightness. The LAB companding curve is exactly perceptually uniform. The sRGB TRC and the gamma=2.2 TRC (which isn't shown in the image above and to the right) are both approximately perceptually uniform. The gamma=1.8 TRC is neither linear nor approximately perceptually uniform, though it's closer to being perceptually uniform than it is to being linear. Even though GIMP-CCE allows you to edit in any well-behaved RGB working space, many editing operations only produce technically correct results if the RGB working space has a linear gamma TRC. This brings us to the second major difference between default and patched GIMP: As explained in Section E below, default GIMP has internal code that switches between linear and perceptual RGB, depending on the particular operation. All such code was removed from CCE, which means that when using CCE, you must convert the entire layer stack to another ICC profile color space whenever you want to change between operating on linear and perceptual RGB.

Color management preferences, options, and built-in profiles The built-in sRGB and Gray ICC profiles In an ICC profile color-managed image editor, images are displayed on your monitor using a Color Management System ("CMS"). Most free/libre image editors including GIMP use Little CMS ("LCMS"). A CMS can't display an image on your monitor screen without knowing what ICC profile to assign to your monitor and also what ICC profile to assign to your image. Unfortunately many images don't have an embedded ICC profile. For example many images downloaded from the web and many camera-saved jpegs don't have embedded ICC profiles. Also sRGB images exported from GIMP don't have embedded ICC profiles unless you've assign an sRGB profile from disk before exporting the image. And when you first open GIMP (whether default or patched), GIMP doesn't know what ICC profile to use for your monitor profile. The easiest solution to the problem of "what profile to use for image that don't have embedded ICC profiles" is to make a built-in ICC profile and assign it to any image that doesn't have an embedded ICC profile. The easiest solution to the problem of "what profile to use for the monitor if the user hasn't chosen a monitor profile from disk (whether by deliberately picking a profile from disk or by installing a system monitor profile and telling the image editor to use the system monitor profile) is to use this same built-in ICC profile as the monitor profile. For the built-in ICC profiles, default GIMP and GIMP-CCE both make a regular sRGB profile that has the sRGB colorants and the sRGB TRC, and a Gray ICC profile with the sRGB TRC. In both versions of GIMP, if the built-in profile that's automatically assigned to untagged images is not the correct profile for your untagged image, then you as the user are responsible for assigning the correct ICC profile to your untagged image. However, "the next step" differs considerably between default and patched GIMP: In default GIMP your best option is to promote the image precision to either 16-bit integer or 32-bit floating point, and then convert the image to default GIMP's built-in sRGB profile . If you don't, then because of the default GIMP hard-coded sRGB parameters your editing results will be incorrect for almost all editing operations.

your best option is to promote the image precision to either 16-bit integer or 32-bit floating point, and then . If you don't, then because of the default GIMP hard-coded sRGB parameters your editing results will be incorrect for almost all editing operations. In my patched GIMP, also promote the image precision to either 16-bit integer or 32-bit floating point, and then convert the image to your preferred RGB working space: For radiometrically correct color mixing, I recommend the linear gamma RGB working spaces from my github ICC profile repository, with Rec2020 and ACEcg being excellent all-around editing color spaces. There are various problems associated with editing in the very small sRGB color space, that you don't encounter when editing in larger color spaces; the trade-off of course is that your monitor can't show you "all the colors" when editing in larger color spaces. Color Management Preferences



The screenshot above shows GIMP-CCE Preferences/Color Management dialog, which has fewer entries than default GIMP: Under "Preferred Profiles", default GIMP provides options to select an RGB and a Grayscale profile, which options have been removed from GIMP-CCE. The options to select "preferred" RGB and Grayscale profiles have been removed from GIMP-CCE because selecting preferred RGB and Gray profiles doesn't actually do anything in GIMP-CCE. (In default GIMP the only functionality associated with the preferred RGB and Gray profiles is that they appear in drop-down boxes for assigning or converting to a new ICC profile.) In case you are wondering, there are two places in the default GIMP code where the CMYK profile makes a difference: In the Foreground tool color panel for CMYK readouts (currently disabled in GIMP-CCE, but I want to put this panel back at some point). And when opening CMYK jpegs if the embedded CMYK profile can't be used. I haven't yet tested this behavior and so can't verify whether opening CMYK jpegs using GIMP-CCE actually works. Default GIMP has a section for "Policies/File Open behaviour", which has been removed from GIMP-CCE. In GIMP-CCE images opened from disk are always assigned the embedded profile, if there is one. Otherwise a built-in profile is assigned. It's up to you, the user, to decide what to do next. There are no options for setting up automatic profile conversions and no dialogs to dismiss that offer to convert the image to a built-in profile. Whether in default or patched GIMP, it's better to not leave the "Monitor profile" box empty. If you leave this box empty, GIMP uses the built-in sRGB profile as the monitor profile, unless of course you check the "Try to use the system monitor profile" and you also actually installed a system monitor profile. If you run Linux, it's been my experience that some Linux color management software packages can install a system monitor profile without informing the user, either sRGB or an "edid" profile pulled from your monitor. Personally I use the ArgyllCMS "dispwin" utility for installing and uninstalling system monitor profiles. ArgyllCMS is available for Linux, Windows, and Mac. Two default GIMP Color Management options (in "Image/Color Management" and "File/New") have been removed from GIMP-CCE Default GIMP has a Color Management option under "Image/Color Management" that is prechecked to "Enable Color Management". All that unchecking the box does is assign the built-in sRGB profile to the image (even if the image is actually in some other color space). Color management isn't really disabled. This option has been removed from GIMP-CCE. Default GIMP has a Color Management option under "File/New" that allows you to uncheck a box that says "Color manage this image". All this does is assign the GIMP built-in sRGB profile to the image and create an image that says "not color managed" in place of displaying the actually assigned ICC profile. But the image is actually still color managed. This option has been removed from GIMP-CCE.

How to switch between linear and perceptually uniform RGB in default vs patched GIMP Most editing operations only produce technically correct results when performed on linear gamma RGB. But a few editing operations produce better results when performed on perceptually uniform RGB, and for some operations there simply aren't any grounds on which one could make decisions regarding "technically correct". In default GIMP, the user doesn't need to worry about switching between linear and perceptually uniform RGB as the code itself handles conversions between linear gamma and perceptually uniform RGB. In GIMP-CCE, the user is responsible for choosing the right RGB working space for the task at hand. This means if you want to edit using perceptually uniform RGB, and you are currently editing an image that's in an ICC profile working space that uses the linear gamma TRC, you have to do an actual ICC profile conversion to the entire GIMP-CCE XCF layer stack, followed by a second conversion if you want to go back to editing using a linear gamma TRC. Overview of which editing operations require linear vs perceptually uniform RGB Color mixing and layer blending: Radiometrically correct color mixing reflects the way light and colors combine out there in the real world and requires that the relevant editing operations be done on linear gamma RGB. Most of the commonly used RGB working color spaces have more or less perceptually uniform TRCs. Unfortunately colors simply don't blend correctly in nonlinear color spaces. Instead, in nonlinear color spaces operations that mix colors (which is to say just anything and everything you do in the digital darkroom) produce gamma artifacts, with the obviousness of the artifacts depending on the particular operation and also on the RGB working space's colorants and TRC, and of course on your monitor's color gamut (the scary thing is that your monitor might not show you an artifact that might be very obvious once the image is printed or displayed on a wider gamut display). An example of gamma artifacts is shown in the figure below: Large soft disks painted on a cyan background. Top row: Painted in the regular sRGB color space. Notice the darker colors surrounding the red and magenta disks, and the green surrounding the yellow disk: those are "gamma" artifacts from mixing colors in nonlinear color spaces. Bottom row: Painted in a linear gamma version of the sRGB color space. This is how lightwaves blend to make colors out there in the real world (well, the actual colors are made in our eyes and brains). In other words, this is radiometrically correct color mixing. So far we've been discussing operations that only affect the RGB channel values on one single layer in an XCF layer stack. But of course we also mix colors using blend modes to combine the colors on more than one layer. And we use these same blend modes to apply paint to a layer (think of painting as operating on a layer that is immediately merged with the underlying layer and this grouping of painting and layer blending will seem more intuitive). For more information on radiometrically correct color mixing/layer blending, see Linear Gamma vs Higher Gamma RGB Color Spaces: Gaussian Blur and Normal Blend Mode. The text is a bit dense, but looking at the pictures will convey 90% of the relevant information. Operations that require converting RGB values to Y or XYZ: Some editing operations require converting RGB values to XYZ, from whence one can convert to LAB and LCH. Other editing operations require converting to Luminance (for example making a radiometrically correct conversion to black and white) or to grayscale (for example, making a grayscale mask, for painting on a mask, and for changing the image mode from RGB to Gray). Correct conversions to Y and XYZ require operating on linear gamma RGB. Default GIMP flips the sRGB TRC to a linear gamma TRC for LCH, LAB, and Luminance-based operations. For correct editing results, in GIMP-CCE many editing operations require that the user convert the XCF layer stack to a well-behaved RGB working space that already has a linear gamma TRC. Operations that require converting RGB values to Y or XYZ include: the LCH and Luminance blend modes

the LCH color picker sliders

the LCH-based Hue-Chroma tool

GEGL Saturation

decomposition to LAB/LCH

extracting LAB/LCH channels using the GEGL "extract component" operation

converting from color to black and white using Luminance

making a grayscale copy of a layer to use as a mask Operations that involve measuring color differences: Not all editing operations are about color mixing or converting to the XYZ or LAB/LCH reference color spaces. A few editing operations depend on measuring the differences between colors. We humans are much more sensitive to changes in the shadows of an image than we are to changes in the highlights of an image. So tasks like selecting by color, finding edges, and posterizing an image usually produce more satisfactory results when performed on perceptually uniform RGB. Switching between linear and perceptually uniform RGB when using CCE GIMP-CCE assumes the user does understand which operations should be performed on linear RGB and which should be performed on perceptually uniform RGB. Accordingly it's left entirely to the user to choose an appropriate RGB working space for the task at hand and to choose whether to pick a perceptually uniform or linear gamma version of their chosen RGB working space. The meaning of "precision" in default GIMP vs GIMP-CCE GIMP (whether default or patched) depends heavily on babl and GEGL. In default babl/GEGL/GIMP "precision" means two very different things: The actual precision as used in normal discussion with people who aren't immersed in the babl architecture, that is, whether the image is stored or manipulated as 8-bit integer, 16-bit floating point, and so on. Whether code in babl should flip the original image's presumed sRGB TRC to the linear gamma TRC or not. This second meaning of precision is unique to default babl/GEGL/GIMP. It's not part of standard color management/color science terminology. The babl code that does the TRC flipping between the sRGB TRC and the linear gamma TRC in default GIMP has been removed from GIMP-CCE. Without babl's "TRC flipping" code, the distinction between "linear precision" and "gamma precision" simply vanishes. In GIMP-CCE the equivalent of switching to "linear light precision" in default GIMP is to convert the image to a linear gamma RGB working space. And the equivalent of default GIMP's "perceptual gamma precision" is to convert the image to an RGB working space with the sRGB TRC. However, this is only an approximate equivalence, because in default GIMP UI linear precision vs gamma precision actually mostly only affects how the image is held in RAM rather than what encoding is used for a specific editing operation. In GIMP-CCE the user can choose to convert the image to an RGB working space with any TRC they want — they aren't limited to the linear gamma TRC vs the sRGB TRC. None of the operations contain code that automatically converts the image back and forth between linear gamma and perceptually uniform RGB. Instead the operations just operate on the RGB data as encoded by the user's chosen ICC profile color space. As an aside, this allows to use CCE for testing to see how well default babl/GEGL/GIMP TRC code is actually working. In GIMP-CCE if the user wants radiometrically correct color mixing for things like blurring, scaling, Levels, and so forth, they must convert the image to a linear gamma RGB working space. And if the user wants perceptually uniform RGB for operations like finding edges, adding perceptually uniform RGB noise, or posterizing an image, I recommend using an RGB working space with the LAB companding curve (available in my ICC profiles that can be downloaded from github), because the sRGB TRC is only approximately perceptually uniform. But if the goal is checking to see whether the default babl/GEGL/GIMP code is working as expected, of course use an ICC profile with the sRGB TRC.