Bug 422479 - B&W picture, with only B&W layers, will produce colors from nowhere after Grayscale to RGB colorspace conversion
Summary: B&W picture, with only B&W layers, will produce colors from nowhere after Gra...
Status: RESOLVED NOT A BUG
Alias: None
Product: krita
Classification: Applications
Component: Layer Stack (show other bugs)
Version: 4.2.9
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-05 11:16 UTC by Tonja
Modified: 2020-06-05 12:11 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
A workfile showing the issue : made from a base white layer, and a layer group containing a black layer, everything with regular blending mode, it shows plain yellow color in the canvas. (2.97 MB, application/x-krita)
2020-06-05 11:16 UTC, Tonja
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tonja 2020-06-05 11:16:24 UTC
Created attachment 129070 [details]
A workfile showing the issue : made from a base white layer, and a layer group containing a black layer, everything with regular blending mode, it shows plain yellow color in the canvas.

SUMMARY
I had a work file using a grayscale color space (can't remember which one exactly), that I needed to convert to RGB color space. After that, canvas showed colors, exported color, etc, despite workfile containing only grayscale values (down to only black and white regular layers).

It seems like colorspace conversion corrupted some layer groups (???) to make them output colors, because creating layers with value of grey inside these layer groups will lead to color values (plain color like yellow if layers inside are black) at the end. Newly created layer groups don't have the issue.

Also saw it happen when moving a grayscale layer stack from a grayscale work file into a RBG color file (target file was 16 bits floating point precision at this time)
Appears on Parabola Linux, on a Thinkpad x230 with a Intel chipset.

STEPS TO REPRODUCE
1. Open YellowBug.kra and see the result : canvas is yellow. But the workfile itself only contains a white layer used as a background, a layer group ("PBR") on top blended with Normal mode, and a black layer blended with Normal mode in it.

2.Change the color of the layer inside PBR, or create a new layer in it after emptying it and put any color in it : result will be somewhere between yellow and white.

3.Disable PBR, create a new layer group on top of the bottom layer, and put things in it (or even move the content of "PBR" inside the new layer group) : everything behaves the way it should. 

OBSERVED RESULT
Any color used in the "PBR" layer group is displayed as a tint of yellow.

EXPECTED RESULT
Any color used in the "PBR" layer would be displayed as it has been set inside the layer, because it's on top of the stack

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Parabola
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Halla Rempt 2020-06-05 11:29:02 UTC
Could you also attach the original file? If I create an 8 bit grayscale/alpha image with the default profile and then convert to 16 bits integer RGB with scRGB (linear) I don't see this problem.

Are you using distributions packages, snap, flatpak or the appimage?

It might also be useful to attach the two files from Help->System Information and Help->Krita log to the bug report.
Comment 2 Halla Rempt 2020-06-05 11:31:07 UTC
Oh, never mind about that. You somehow disabled the Green and Red channels in the toplevel group layer.
Comment 3 Tonja 2020-06-05 12:11:52 UTC
Oh- didn't thought of checking that (I usually never use the channels docker, and it seemed to appear randomly each time... )

Really looked like some kind of bug to me... Sorry for the waste of time.