Adding a layer mask with "Transfer layer's alpha channel" or "Layer's alpha channel" to an alpha-less layer make it transparent
Environment/Versions
- GIMP version: 2.99.11 (commit 0cff1ebe)
- Package: Self-compiled
- Operating System: Kubuntu 20.04
Description of the bug
Adding a layer mask with "Transfer layer's alpha channel" or "Layer's alpha channel" to an alpha-less layer makes it transparent, while is was fully opaque to start with (mask initialized to black, likely all zeroes):
Alpha-less before:
Alpha-less after:
The same operation on a layer with an alpha channel doesn't change the opacity of the layer:
Alpha-equipped before:
Alpha-equipped after:
Reproduction
Is the bug reproducible? Always
Reproduction steps:
- Create a layer without an alpha channel (the initial
Background
layer will do) - Add a mask and initialize to "Transfer alpha channel"
…
Expected result: layer+mask remains opaque
Actual result: layer+mask is transparent
Additional information
Don't know if a bug or a quirk.
Also present in 2.10, but in 2.10, you can only add masks to layers one by one, so these cases are possibly overlooked because people initialize the mask to full opacity anyway.
In 2.99, matters are different since you can add masks to multiple layers at the same time, so all the layers should behave the same way with all the options (this is the first time I notice the problem, but this is also the first time I play seriously with 2.99).
IMHO, the proper behavior is either to thrown an error because there is no alpha channel, or to add an alpha channel on the fly, in which case, as for an explicit addition, that alpha channel is initialized to full opacity...