FHPythonUtils/GimpFormats

Bug: Layers with alpha translucency darker when flattened

Closed this issue · 5 comments

Describe the bug

Using the head of the master branch, if layers have alpha channels, any alpha value less than 1 will end up darker than it should (based on the export from Gimp)

variable-alpha.zip

Expected outcome

expected

Actual outcome

actual

The issue actually appears to be what GIMP is exporting for the layers. When I export the individual layers they noticeably more transparent.

Closing this out because it's not a bug in GimpFormats and might not even be a bug. I'm getting inconsistent results in my tests.

This does seem to be gimp being weird. 50% white over 100% black = 73% grey, not 50% as you would expect. I am still trying to figure out why it does this, and precisely what calculation it is doing.

https://graphicdesign.stackexchange.com/questions/132001/opacity-formula-in-gimp-2-10-0 seems to be the answer: in short, set your layers to legacy, and then gimp will produce the same result as gimpformats. But this will change how your image looks in GIMP.

You can also keep on using Default layers and change the composite space to perceptual (right click the layer).