GNOME Bugzilla – Bug 765178
Decomposed to LAB images have the wrong ICC profile assigned
Last modified: 2018-05-24 16:18:34 UTC
When an image layer is decomposed to LAB or LCH, currently the resulting grayscale layer stack is not assigned the correct grayscale profile. Instead: * If the RGB layer stack is at "Linear light" precision, the GIMP built-in Linear RGB grayscale color space is assigned. * If the RGB layer stack is at "Perceptual gamma" precision, the GIMP built-in sRGB-Gamma grayscale color space is assigned. Regardless of the precision of the source RGB layer stack, when decomposed to LAB or LCH, the resulting grayscale layer stack should be decomposed to "Perceptual gamma" precision and should have a grayscale profile with the LAB companding curve assigned. Otherwise results of dragging and dropping the decomposed grayscale layers back to the RGB layer stack will be incorrect (http://ninedegreesbelow.com/photography/lab/gimp29/correct-vs-gimp29-decompose-drag-drop.jpg). Composing/recomposing from the LAB layer stack back to RGB seems to work just fine regardless of what grayscale ICC profile is assigned to the LAB layer stack. The above summary was copied from Description below was coopied from https://bugzilla.gnome.org/show_bug.cgi?id=756389#c20. Also see https://bugzilla.gnome.org/show_bug.cgi?id=755376 and https://bugzilla.gnome.org/show_bug.cgi?id=756389 comments 43 and 44.
Thanks, have you also seen bug 499794 ? It's not the same but clearly related.
I've been updating the articles on my website that have to do with GIMP. A sticking point is that some of the articles mention this particular bug: * https://ninedegreesbelow.com/photography/users-guide-to-high-bit-depth-gimp.html See section D2 "In high bit depth GIMP, decomposing an sRGB image to LAB does produce mathematically correct results. But as of GIMP 2.9.4, if you use "drag and drop" to pull the decomposed grayscale layers over to your sRGB layer stack, there is still a small error in the resulting RGB layer. Figure 3 below illustrates the problem . . ." Actually the error is large if the decomposed layer stack is at linear precision. * https://ninedegreesbelow.com/photography/lab-lightness-to-black-and-white-gimp29-photoshop.html See section B2 ""Decompose, drag, and drop" in GIMP 2.9: Very different results from GIMP 2.8" . . . Compared to "decompose, drag, and drop" results using GIMP 2.8, GIMP 2.9's "decompose, drag, and drop" produces an image that's actually pretty close to correct. But it's still not quite right . . ." And as above, the error is large if the decomposed layer stack is at linear precision. "Components/Extract" used to extract L, C, h, A, or B has similar issues - Bug 75537 .
Created attachment 371248 [details] correct vs gimp 2.9 (now 2.10-rc2) decompose, drag, and drop L channel This error doesn't just affect the "L" channel. It also affects the A, B, C and h channels. The problem is worse if the image is at linear precision. The workaround is to change the precision to perceptual (if it isn't already perceptual), and then assign the correct gray profile from disk (with the LAB companding curve), and *then* drag the layer(s) over to the RGB layer stack from which the "decomposed to LAB/LCH" layer stack was made.
Created attachment 371249 [details] the difference between the lab and srgb companding curves
(In reply to Elle Stone from comment #2) > "Components/Extract" used to extract L, C, h, A, or B has similar issues - > Bug 75537 . Sorry, that's Bug 755376 .
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gimp/issues/883.