Differences between default high bit depth GIMP 2.9 and Elle Stone's patched "GIMP-CCE"

My patched GIMP is targeted at users who want to edit in RGB color spaces other than sRGB and have acquired (or want to acquire) a working understanding of ICC profile color management and the basics of radiometrically correct editing. In addition, my patched GIMP contains enhanced editing capabilities such as expanded LCH editing options, the very important Luminance blend mode, and selected additional unclamped layer blend modes, that haven't yet been incorporated into default GIMP 2.9.

Written June 2016. Updated September 2016.

Introduction and targeted users

GIMP-CCE is an interim project targeted at users who want to edit in color spaces other than sRGB

Default GIMP 2.9/2.10 has hard-coded sRGB parameters. If you want to edit in RGB working spaces other than sRGB, these parameters will produce wrong results for quite a few editing operations. Also default GIMP 2.9/2.10 has hard-coded defaults regarding whether any given editing operation is done on linearized or perceptually uniform RGB. These hard-coded defaults usually produce good results, but don't allow you to make deliberate creative departures from the default choices.

My patched GIMP is targeted at users who want to edit in RGB color spaces other than sRGB and have acquired (or want to acquire) a working understanding of ICC profile color management and the basics of radiometrically correct editing. In addition, my patched GIMP contains enhanced editing capabilities such as expanded LCH editing options, the very important Luminance blend mode, and selected additional unclamped layer blend modes, that haven't yet been incorporated into default GIMP.

Please be aware that GIMP-CCE is strictly an interim project and will be discontinued as soon as default GIMP provides full support for editing in user-chosen RGB working spaces. Once GIMP 2.10 is released and the conversion to GIMP 3.0 and GTK 3 is well underway, work can begin on adding full support for editing in user chosen RGB color spaces. You can help "future GIMP" arrive faster by volunteering your time and/or by making financial contributions to individual babl/GEGL/GIMP developers (money donated directly to GIMP is not used to compensate individual GIMP developers). Default high bit depth GIMP 2.10 is still a work in progress, so contributions of code or cash can make the difference between GIMP 2.10 having or not having particular features that you as a GIMP user might consider to be very important.

Where to find information on GIMP-CCE

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". My apologies for asking you to read through this document before using GIMP-CCE. But if you've been using default GIMP there are some differences you should be aware of. You'll get "farther, faster" if you take the time to note these differences.

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.

User's Guide to High Bit Depth GIMP provides an overview of the major differences between previous (8-bit only) versions of GIMP and default high bit depth GIMP 2.9. Most of the information in the User's Guide is relevant for using my patched version of high bit depth GIMP. In particular (and unlike many image editors with which you might be familiar), high bit depth GIMP offers unbounded floating point processing, which opens up new possibilities for editing and also present new pitfalls that you need to be aware of.

Tutorials and notes for using Elle Stone's patched "GIMP-CCE" has links to tutorials on using my patched GIMP for various editing tasks, plus notes on using third-party plug-ins such as the PhotoFlow raw processor and G'MIC for GIMP.

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; "Experimental" means the code is a work in progress). 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?

In default GIMP, because the code uses hard-coded sRGB parameters, you should only edit sRGB images.

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.

sRGB and Rec. 2020 chromaticitiesXYZ 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 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 brightness.

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.

As already noted, "only sRGB colorants" vs "any RGB working space colorants" is the first major difference between default and patched GIMP: Default GIMP is hard-coded to use the sRGB colorants (XYZ values), whereas GIMP-CCE has code that retrieves the colorants from your image's embedded RGB working space.

Even though GIMP-CCE allows you to edit in any 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 decides for the user "behind the scenes" whether any given editing operation should be done using linearized RGB, whereas GIMP-CCE leaves this critically important editing decision up to the user.

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 (and many proprietary) image editors 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.
  • 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.

  • Opening OpenEXR files

    Default GIMP assigns a built-in linear gamma sRGB profile to OpenEXR files that don't have embedded chromaticities. The patched GIMP assigns the regular sRGB profile, which very likely is the wrong profile as most OpenEXR files are in a linear gamma color space (which might or might not be linear gamma sRGB). So when using GIMP-CCE to open an OpenEXR file almost always you'll need to assign the correct ICC profile from disk.

    Be careful when opening OpenEXR files with embedded chromaticities: OpenEXR files don't support embedding ICC profiles, but they do have an optional "chromaticities" tag from which an ICC profile can be constructed. GIMP has code for embedding and reading chromaticities in OpenEXR files, but whether you are using default or patched GIMP, this code doesn't appear to be completely reliable. It's safer to assign the correct ICC profile from disk than to rely on GIMP to construct the right profile from embedded chromaticities that might not have been correctly calculated by whatever editing software embedded the chromaticities in the first place.

Color Management Preferences

The screenshot above shows GIMP-CCE Preferences/Color Management dialog, which has fewer entries than default GIMP:

  1. 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.

  2. 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.

  3. 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.

Color picking and modifying: LCH vs HSV/HSL

Most of the HSV/HSL code has been removed from GIMP-CCE

All babl/GEGL code for the old HSV/HSL color spaces has been disabled and/or removed from GIMP-CCE, along with much of the corresponding code in GIMP. This means most of the HSL/HSV operations are no longer available through the GIMP UI. This may sound a bit drastic, but the goal is to produce a cleaner code base to which more physically meaningful LCH-based operations can eventually be added. The patched GIMP already provides LCH color sliders and the LCH-based hue-chroma tool as replacements for the old HSV color sliders and hue-saturation tool.

The patched GIMP LCH color picking tools

The LCH color sliders:

At first glance the LCH color sliders look more or less like the old HSV color sliders. In the screenshot above:

  1. On the left is a photograph of a wooden statue of a hot air balloon. To the right of the balloon in the middle of the blue sky is color sample point #1.
  2. The color picker (top right) shows the RGB and LCH channel values for the color of the sky at sample point #1.
  3. The LCH color sliders in the Foreground/Background tool (bottom right) show the corresponding LCH and RGB color sliders:
    • LCH Hue is measured in degrees from 0 to 360, just like HSV Hue. But the percent signs after LCH Chroma and Lightness don't actually mean anything (and have since been removed from the GIMP-CCE UI).
    • The LCH Chroma scale runs from 0 (gray) to an arbitrary maximum chroma of 200.

      I picked 200 as the maximum chroma because you aren't likely to ever encounter chromas higher than 200 in the digital darkroom, though the WideGamutRGB's spectral Green primary does have a chroma somewhat higher than 200. Chromas this high are not printable and not accurately captureable by today's digital cameras. So if you produce colors with chromas higher than 200 in your digital darkroom, then likely there is something wrong with your workflow.

    • The LCH Lightness scale runs from 0 (solid black) to 100 (solid white), with middle gray being at 50.

      In linear gamma RGB working spaces the equivalent "middle gray" RGB values are (0.184187, 0.184187, 0.184187) floating point, and (47,47,47) 8-bit integer. In the regular sRGB working space, the equivalent 8-bit integer "middle gray" values are (119,119,119) and not (127,127,127) as you might expect. This is because the sRGB TRC is only approximately perceptually uniform.

In the above screenshot, notice that depending on the selected color, the LCH color sliders will display some areas that are in color and other areas that are solid black. The black areas indicate colors that are out of gamut with respect to the image's RGB working space. The corresponding RGB slider values will have at least one slider pegged at either 0 or 255.

To bring a dialed-in color back into gamut, if an RGB slider is pegged at zero, increase that slider to 1, and if an RGB slider is pegged at 255, decrease that slider to 254.

The maximum "in-gamut" range for various Hue/Chroma combinations are when the Lightness slider is set somewhere between 50 and 60.

The LCH color sliders are a "color education in a box". For any given Lightness, as you increase the Chroma the range of LCH Hues that are in gamut with respect to the RGB color space begins to decrease. At Lightness=0 and Lightness=100, the only "in gamut" colors are black and white, with Chromas of 0. It's well worth spending some time playing with the LCH color sliders in your preferred linear gamma RGB working space to familiarize yourself with the available LCH colors.

Note: The above two images are somewhat out of date because they show color slider scales that run from 0 to 255. Eventually I'd like to make the color slider readout be floating point. But in the meantime, 255 "increments" to select colors is far too few increments to allow for accurately selecting colors in the shadow areas of a linear gamma image. So currently (as of August 30, 2016), the color sliders run from 0 to 100000 (mentally divide the slider readout by 100000 to get the equivalent floating point value).

Missing color picker panels:

Default GIMP has panels for the FG/BG Color dialogs that are missing from GIMP-CCE. These missing Color panels (CMYK, Watercolor, and Wheel) all use HSV instead of LCH. Hopefully eventually I'll find the time to recode some or all of these panels to use LCH.

Color-managed LCH color picking/selecting tools:

Until recently GIMP color picking tools weren't color-managed. This has become increasingly a problem as users have switched to wide gamut monitors. With the release of GIMP 2.9.4, default GIMP now has code that makes the color picking tools be color-managed, albeit with a color gamut limited to the sRGB color space, and with slider values always based on the sRGB chromaticities. As default GIMP users really should only be editing sRGB images, this isn't a problem for default GIMP users.

The new default GIMP color-managed color-picking code was easy to port over to GIMP-CCE. But the new code made my LCH color sliders produce wrong results because the code sent regular sRGB channel values to the color sliders, regardless of what color space the image was actually in. So I ended up rewriting a rather large amount of code to make the color picking tools in GIMP-CCE be color-managed. The current code works pretty well, though there are some residual issues that I hope to eventually fix:

  • As already noted, the LCH sliders only show correct results for images in linear gamma RGB working spaces, so keep this in mind as you read through the rest of the items in this list.
  • The FG/BG Color dialog ("Windows/Dockable Dialogs/Colors") is pretty much (hopefully completely and always) color managed, regardless of what linear gamma color space the image is in. Hopefully. Please let me know if you encounter any issues.
  • The Color Picker Info panel shows the correct numbers for Pixel and LCH. But the displayed color patch is only correct for images in the color space of the first image you picked a color from. For example:
    1. If you open GIMP and then open a linear gamma Rec.2020 image and click to pick a color, then the Color Picker Info panel will show the correct colors for any linear gamma Rec.2020 image you open.
    2. But if you then open a second image that's a linear gamma sRGB image and pick a color using the color picker, the Color Picker Info panel numbers will still be right, but the displayed color patch in the Info panel will be wrong.
  • The Toolbox "Show foreground & background color" that can be put in the Toolbox using Preferences/Interface/Toolbox behaves just like the Color Picker Info panel.
  • You can pick and paint the picked color even if the Info panel shows the wrong color — the right color will be painted. But you still can't pick a color in an image in one color space and then paint that color into an image in another color space.

To summarize — and as illustrated in the screenshot below — when using the color picking tools in my patched GIMP, if you open GIMP-CCE and all the images you edit are in the same linear gamma RGB working space, the color picking tools all work. But if you then open an image in another linear gamma RGB working space, some of the color picking tools won't work completely correctly — the displayed color will be wrong but the numbers will be right.

Of course if the image isn't in a well-behaved linear gamma RGB working space, the color picking tools won't work very well — the LCH numbers will be wrong, though probably the RGB numbers will be correct.

For images with LUT RGB profiles, I made the LCH sliders be solid black and these sliders don't do anything. For Gray images, the colorant Y values don't matter as long as the Y values add up to 1.0, so I used the sRGB colorants. At one point I put in the Identity colorants, but again for grayscale images it really doesn't matter.

Dialing in a color using the LCH sliders in the FG/BG tools works as intended. Picking colors directly from an image by Composite, Red, Green, and Blue also works as expected. Versions of GIMP-CCE built using code pulled from my github repositories after August 22, 2016 also allow to pick colors using Lightness, Chroma, and Hue. However, earlier versions of GIMP-CCE would crash if you tried to pick colors directly from an image by Hue, Saturation, or Value (the "Select by Color" and "Fuzzy select" tools). My apologies for not realizing this sooner.

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, except for layer blending and painting modes (well, that's a fairly major "except for"!), 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.

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.
  1. 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.
  2. 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 image be in a true linear gamma color space. These operations include:

  • the LCH and Luminance blend modes
  • the LCH color picker sliders
  • the LCH-based Hue-Chroma tool
  • 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: Default and patched GIMP compared

For operations that affect just a single layer, default GIMP makes it simple for the user to get technically correct editing results (but only in the sRGB color space) by making all required conversions between linear and perceptually uniform RGB happen automatically, without the user having to know anything at all about the technical aspects of color management and the various editing algorithms. And for the most part users aren't given any choice in the matter.

However, default GIMP does provide the user with a choice of whether to paint and blend layers using linear or perceptually uniform RGB. This choice is exercised by using the "Image/Precision" menu to choose between "Linear light" precision and "Perceptual gamma (sRGB)" precision. "Linear light" precision blends the colors using linear gamma RGB. "Perceptual gamma (sRGB)" precision blends the colors using perceptually uniform RGB.

GIMP-CCE assumes the user does understand which operations should be performed on linear RGB and which should be performed on perceptually uniform RGB. GIMP-CCE also assumes that artistic vision trumps technically correct editing. 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. To continue our "camera" analogy, using default GIMP is like putting your camera in "point and shoot" mode and letting the camera take over the job of making technical decisions. Whereas using GIMP-CCE is like putting your camera in manual mode: getting the best results does require mastering some of the technical aspects of image editing.

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:

  1. 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.
  2. 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 the default GIMP UI linear precision vs gamma precision only determines how layers blend together and how paint strokes mix. For all other operations, in default GIMP the code for each operation determines whether the operation requests linear RGB (flip from the sRGB TRC to the linear gamma TRC) or requests RGB encoded using the sRGB TRC. The user doesn't have any control over whether the various operations are done on "linear" or "gamma" precision.

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. And 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.

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.

Code changes and use notes

GIMP-CCE code changes and removed operations and file format support

  1. In GIMP-CCE all hard-coded sRGB Y and XYZ parameters have been replaced with code that retrieves the image's ICC profile's Y and XYZ colorants.

    All operations that use hard-coded sRGB XYZ, that couldn't be rewritten to use XYZ retrieved from the image's ICC profile, have been removed from GIMP-CCE UI, as have all operations that use YCbCr.

  2. In GIMP-CCE the babl code that converts back and forth between the sRGB TRC and the linear gamma TRC (the "babl flips") has been removed. And all supporting code in GEGL and GIMP has also been removed.
  3. Indexed image support has been removed from GIMP-CCE.

    The indexed image code seriously complicates the default GIMP code base and was getting in the way of my efforts to untangle and remove the "babl flip" and "sRGB as PCS" code from my patched GIMP's color management code. Consequently all UI operations and tools that depend on indexed image support have been removed, and indexed-image-dependent plug-ins will not work with GIMP-CCE.

  4. Most of the old 8-bit GIMP plug-ins from the "plug-ins" folder are not currently (and probably won't ever be) compiled in GIMP-CCE.
  5. Many 8-bit-only file formats are no longer supported in GIMP-CCE. And some of the high-bit depth file formats have not yet been modified to work with GIMP-CCE code.
  6. The OpenCl code has been disabled in GIMP-CCE for the following reasons:
    • The GEGL OpenCl kernel incorporates GEGL code that repeats long portions of "TRC-flipping" and sRGB-specific code that I've removed from/modified in babl.
    • Even in default GIMP using or not using OpenCl sometimes produces different results.
    • I don't know how to read or write OpenCl code and so modifying and/or correcting bugs in such code is out of the question.
  7. The patched GIMP "decompose/compose" operations have been removed from the UI. Somewhere along the line I made code changes that make the decompose/compose operations segfault. I'm not planning to spend any more time than I already have trying to track down the problem. The GEGL "extract components" operation can be used to retrieve RGB, LCH, and LAB channels. However, for LCH and LAB the extracted channels are not correct unless the layer stack is in a linear gamma color space, and even then the extracted channels are not correct until you drag the extracted channel layer out as a new image and assign the "-labltrc.icc" version of your original image's ICC profile. Yes, this is complicated. Hopefully I'll find the time to fix this issue. FWIW default GIMP has a similar issue with decomposed and extracted LAB/LCH layers. For more information see LAB Lightness to black and white using GIMP 2.8 and LAB Lightness to black and white using GIMP 2.9 and PhotoShop. The second article builds on some very basic "color management/color science" information presented in the first article. So even if you've never used GIMP 2.8, the second article will be easier to understand if you've already read the first article.
  8. My patched GIMP doesn't display histograms for grayscale images. I don't normally edit grayscale images, so I didn't discover this bug until January, 2017. I'll see if I can figure out how to fix this problem, but I don't give it a very high priority.

Patched GIMP use notes

Here are some use notes that I thought might be helpful. If there's something elese that belongs here, please let me know.

  1. The Colors and Filters menus have been rearranged:
    • Colors Menu:

      I removed all the old submenus, placing all the Color tools in a top-level menu, except for the newly added GEGL Operation menu (moved from the Tools menu).

      The HSV-based hue-saturation tool has been replaced by the LCH-based hue-chroma tool, and the HSL-based Colorize and Color Balance tools are gone.

      The Brightness/Contrast tool is gone (use the GEGL tools Brightness/Contrast), and the c2g method of converting to black and white has been moved to Filters/Effects.

      The very useful RGB Clip and Component Extract tools have been moved out of the GEGL tools submenu and placed as top-level Colors tools.

      I made a few other changes to the Colors menu, but these are the most important changes.

    • Filters Menu:

      The Filters Menu is fairly radically rearranged. For example:

      All the old 8-bit filters are gone.

      The "Render" menu is relabelled as "Patterns" because that's what all the included filters do — they generate patterns (they don't render scenes or objects, which is the more usual meaning of "render").

      The "Artistic" menu is relabelled as "Effects".

      Box blur and Median blur have been moved from the GEGL tools to Filters/Blur.

      Filters that use HSL or HSV are gone, as are a couple of filters that don't actually seem to do anything.

      The Web and Animation menus are gone, though if you compile the appropriate plug-ins in your local copy of GIMP-CCE they might reappear.

    Feedback on the revised Colors and Filters menus is very welcome.

  2. Making "gbr" brushes works the same on default GIMP and GIMP-CCE. But making "gih" brushes in GIMP-CCE requires an extra step: Before exporting your brush go to "Image/Mode" and make sure that "Grayscale" is selected.

    There is a bug in GIMP-CCE that makes it such that grayscale images aren't always marked as being in grayscale "Mode". I'm still tracking down the source of this bug.

    Whether you are using default GIMP or GIMP-CCE, if you want to make a grayscale gih brush, make your layer stack using solid white layers, and paint the individual brush layers using shades of gray. If you make your layer stack from transparent layers (which seems like a natural thing to do), the resulting brush will just paint black squares.

    If you don't already know the difference, grayscale gih brushes are used for painting colors picked using the color picking tools. RGB gih brushes only paint the colors that were used to make the brush.

  3. Translation and documentation terminology and functions are not in step with the patched code.
  4. If you want to save an XCF file to disk from default GIMP and open it with GIMP-CCE, before saving the default GIMP XCF file to disk make sure the "precision" (the second meaning of precision) is set to "perceptually uniform (sRGB)".

    If the default GIMP precision is set to "linear light", then the RGB channel values are flipped from what is indicated by the XCF file's nominal ICC profile (which has the sRGB TRC) to the linear gamma TRC.

    It might be better to export a flattened version of the default GIMP to disk and open the exported file with GIMP-CCE, and vice versa. In other words just treat default GIMP and GIMP-CCE as two different editing programs, especially as eventually I might make changes to the layer blend modes that will break such compatibility as still remains.

  5. Before compiling and installing the latest code from my github repositories, you might want to (and you really should anyway) make a back-up copy of your patched GIMP config folder (if you've installed GIMP-CCE before).

    When you start GIMP-CCE, you might get some "sessionrc" complaints that look like this:

    GIMP-Error: Error while parsing '/home/elle/code/githubclone/install/config/sessionrc' in line 73: unexpected character ')', expected string constant - fatal parse error
    GIMP-Warning: There was an error parsing your 'sessionrc' file. Default values will be used. A backup of your configuration has been created at '/home/elle/code/githubclone/install/config/sessionrc~'.

    These (or similar, the numbers might vary) are the problematic lines in the sessionrc~ backup copy:

    (session-info "toplevel"
        (factory-entry "gimp-colorize-tool-dialog")
        (position 828 636))
    (session-info "toplevel"
        (factory-entry "gimp-color-balance-tool-dialog")
        (position 511 381))
    (session-info "toplevel"
        (factory-entry "gimp-hue-saturation-tool-dialog")
        (position 272 230)

    So close GIMP and open the sessionrc~ file and remove these (or similar) lines:

    session-info "toplevel"
    (factory-entry "gimp-colorize-tool-dialog")
    (position 828 636))
    (session-info "toplevel"
    (factory-entry "gimp-color-balance-tool-dialog")
    (position 511 381))

    and in these lines change "gimp-hue-saturation-tool-dialog" to "gimp-hue-chroma-tool-dialog":

    (session-info "toplevel"
    (factory-entry "gimp-hue-saturation-tool-dialog")
    (position 272 230)

    And then save sessionrc~ over the top of sessionrc and restart GIMP-CCE. If you have any other issues with files in your config folder, please let me know.