RGB values are not preserved in fully transparent areas, when exporting with one visible and at least one invisible layer
GIMP version: 2.10.18
Note: bug reporters are expected to have verified the bug still exists either in the last stable version of GIMP or on updated development code (master branch).
Operating System: Windows 10
Package: Installer from gimp.org?
Description of the bug
When having exactly one visible layer, which contains fully transparent (alpha=0) colored areas, and at least one invisible layer, fully transparent areas are exported as transparent black, regardless of the colors of visible or invisible layers.
Exported PNG (see red channel):
This is reproducible with various formats (I've mostly tested PNG but also BMP and TGA) and even occurs with the option "Save color values from transparent pixels" checked, when exporting to PNG.
This does not happen,
- when more than one layer is visible; the color values of the lower one will be used where alpha=0 in both layers
- when the visible layer is made invisible and selected
- when the invisible layers are deleted
- where alpha>0
Is the bug reproducible? Always
- create layer 1: fully colored, partly transparent, visible
- create layer 2: invisible
- export to PNG
- import said PNG -> areas with alpha=0 are now black
Expected result: Areas with alpha=0 are still transparent and color is preserved.
Actual result: Areas with alpha=0 are transparent, but black.