[Gimp-developer] darktable linear Rec709 doesn't match GIMP linear sRGB



The darktable plug-in linear Rec 709 chromaticities don't match the GIMP built-in sRGB chromaticities. This means the GIMP user must convert the image to the GIMP built-in ICC profile before some GIMP editing operations will give correct results.

The sRGB and Rec709 color spaces are defined in their respective color space specs by the exact same D65 white point and red, green, and blue xyY values (http://www.itu.int/dms_pubrec/itu-r/rec/bt/R-REC-BT.709-6-201506-I!!PDF-E.pdf, http://www.color.org/specification/ICC1v43_2010-12.pdf). So the resulting ICC profiles should have the same red, green, and blue ICC profile XYZ colorants (assuming of course that both profiles are made using Bradford adaptation).

sRGB and Rec709 only differ by the TRC, and of course when making linear gamma profile variants the two profiles should be identical.

Comparing GIMP and darktable ICC profile XYZ Colorants:

Here are the sRGB XYZ colorants from GIMP's internal built-in sRGB profiles (from iccToXml):

red:   0.43603516, 0.22248840, 0.01391602
green: 0.38511658, 0.71690369, 0.09706116
blue:  0.14305115, 0.06060791, 0.71392822

Here are the darktable XYZ colorants (from darktable's src/common/colorspace.c):

red:   0.436066, 0.222488, 0.013916
green: 0.385147, 0.716873, 0.097076
blue:  0.143066, 0.060608, 0.714096

Comparing GIMP and darktable Source White Points:

Here's the D65 xyY white point used to make GIMP's built-in sRGB profiles, exactly as specified in the sRGB color space specs (http://www.w3.org/Graphics/Color/sRGB, http://www.color.org/specification/ICC1v43_2010-12.pdf).
cmsCIExyY whitepoint = { 0.3127, 0.3290, 1.0 };

Here's the equivalent ICC profile XYZ values: 0.95045471, 1.00000000, 1.08905029

Here are the darktable source white point values, given in the darktable code as XYZ values: 0.95045, 1, 1.08905

The difference in precision in specifying the values to make the resulting ICC profiles means that darktable and GIMP aren't using the same built-in "Rec709/sRGB" linear gamma ICC profiles. However, "precision" isn't the only difference. The darktable XYZ colorants for the linear gamma Rec709 profile aren't just rounded to only six places, but actually differ from the GIMP XYZ colorants in the fifth and sixth decimal places. So the GIMP user can't just assign the GIMP built-in linear gamma sRGB profile (the resulting images are sometimes obviously visually very different), but instead must do an ICC profile conversion.

On a related note, I think it's going to cause confusion for GIMP users to see "linear gamma Rec709" in darktable and "linear gamma sRGB" in GIMP, so for compatibility with GIMP it might be good to change the name of darktable's "linear gamma Rec709" to "linear gamma sRGB".

Best,
Elle


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]