GNOME Bugzilla – Bug 691579
PNG Export doesn't save transparent color values
Last modified: 2015-12-27 07:53:38 UTC
Docs for PNG export say: "Save color values from transparent pixels: With this option is checked, the color values are saved even if the pixels are completely transparent." I have a GIMP image with two layers. The bottom layer is an image and has a layer mask. The top layer has no layer mask and is the same as the layer mask, but is set invisible with the eye icon in the layers dialog. The docs are correct ONLY if the image has only one layer. With two layers, the color values from transparent pixels are NOT saved regardless of this setting. (Transparent pixels are saved as black.) I saved the two layer image and did a binary compare of the image output with both values of the setting and the files show as binary identical. For corroboration see answer 2 step 8 here: http://answers.unity3d.com/questions/59388/how-do-i-import-alpha-textures-with-gimp.html
I can confirm this bug, but IMO it's a GIMP bug: GIMP just fails to save the color values under certain circumstances. I'll (try to) assign this bug to GIMP. BTW, looks like this bug is related to bug #678484.
It is not just the saving that makes it black because you can set the alpha channel to fully visible to preview what filters turned fully transparent pixels into black pixels. Unsharp masks usually does that because their effect on neighbouring pixels are multiplied by their visibility so that pixels with no visibility can't affect the biased average.
*** Bug 678484 has been marked as a duplicate of this bug. ***
This is a documentation bug, when a multi layer image gets exported to a single-layer file format, there is no way GIMP could preserve the color values in the transparent pixels. We can only ever preserve color values in transparent pixels of a *single* layer, not of a merged composition.
*** Bug 573703 has been marked as a duplicate of this bug. ***