GIMP-2.99 space-invasion, sometimes wrong results for Colors/Hue-Chroma
Post space-invasion, sometimes "Color/Hue-Chroma" produces correct results, and sometimes not. I tried four different XCF files, each created from scratch, all at 32f precision:
-
Linear precision, built-in linear sRGB 4-dots-linear-built-in-sRGB.xcf
-
Non-linear precision, built-in regular sRGB 4-dots-non-linear-built-in-sRGB.xcf
-
Linear precision, Rec.2020 with gamma=1.0 TRC 4-dots-linear-Rec2020-with-linear-trc.xcf
-
Non-linear precision, Rec.2020 with sRGB TRC 4-dots-nonlinear-Rec2020-with-srgbtrc.xcf
Each file has a background layer with four color dots on a white background. Each color dot has L=60 and C=40. The hues are, respectively, 0/360, 60, 120, and 180.
For each file I duplicated the background layer and gave the duplicate layer a Hue-Chroma adjustment of L: -10, C: -20, h: +60. So for the duplicate layers, post Hue-Chroma adjustment, L should equal 50, C should equal 20, and each dot's hue should be +60 from the original hue, that is, 60, 120, 180, and 240.
For files 1, 2, and 3 listed above, actual results exactly matched expected results. But for the fourth file, "Non-linear precision, Rec.2020 with sRGB TRC", L ranged from 48.9 to 50.9, C ranged from 1.9 to 23.4, and the hues were 41.9 (should be 60), 141.0 (should be 120), 179.5 (should be 180), and 221.3 (should be 240).
Other combinations of files created from scratch, that I didn't test (and that I absolutely don't want to test, as the combinations proliferate endlessly) include bit depths other than 32f, using or not using the babl transforms, and situations such as:
- "gamma" precision with a linear gamma non-sRGB color space profile.
- "linear" precision with a color space profile with the sRGB TRC.
- "gamma" precision with a color space profile that's not sRGB and doesn't have the sRGB TRC or a linear TRC, such as AdobeRGB with gamma=2.2 or ProPhotoRGB with gamma=1.8.
- "linear" precision with a color space profile that's not sRGB and doesn't have the sRGB TRC or a linear TRC, such as AdobeRGB with gamma=2.2 or ProPhotoRGB with gamma=1.8.
Other stuff not tested is what happens when doing various color space conversions from the original files given above, as created from scratch in GIMP, to some other color space primaries, possibly with some other TRC.