After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 765178 - Decomposed to LAB images have the wrong ICC profile assigned
Decomposed to LAB images have the wrong ICC profile assigned
Status: RESOLVED OBSOLETE
Product: GIMP
Classification: Other
Component: Plugins
git master
Other All
: Normal normal
: ---
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2016-04-17 14:02 UTC by Elle Stone
Modified: 2018-05-24 16:18 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
correct vs gimp 2.9 (now 2.10-rc2) decompose, drag, and drop L channel (47.75 KB, image/jpeg)
2018-04-22 23:25 UTC, Elle Stone
Details
the difference between the lab and srgb companding curves (124.35 KB, image/png)
2018-04-22 23:26 UTC, Elle Stone
Details

Description Elle Stone 2016-04-17 14:02:30 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.
Comment 1 Michael Natterer 2016-04-17 16:23:02 UTC
Thanks, have you also seen bug 499794 ?
It's not the same but clearly related.
Comment 2 Elle Stone 2018-04-22 23:20:11 UTC
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 .
Comment 3 Elle Stone 2018-04-22 23:25:39 UTC
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.
Comment 4 Elle Stone 2018-04-22 23:26:14 UTC
Created attachment 371249 [details]
the difference between the lab and srgb companding curves
Comment 5 Elle Stone 2018-04-22 23:35:15 UTC
(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 .
Comment 6 GNOME Infrastructure Team 2018-05-24 16:18:34 UTC
-- 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.