Several months ago, there was a discussion about RGB vs RGBA images,
and why the background layer was "special" and required the option
"Add Alpha Channel". IIRC, the conclusions were:
- because it saves memory -- which is useful for huge images, but it only
makes sense if you disable undo and if you do not use most plug-ins;
- because other programs do it like that;
- because it makes things easier for some file plug-ins: they do not have
to check if the alpha channel is empty before saving an image.
On the other hand, the problems with the current approach are:
- This requires several special cases in the code, and this is not nice.
- It confuses many users who do not understand why "Add Layer Mask" is
grayed out until you select "Add Alpha Channel" or why the up and
down arrows in the L,C&P dialog are grayed out when you want to move
a new layer below the old background layer (again, until you add the
- Many operations on a new image require an extra step.
While writing a novel^H^H^H^H^H bug report (#51114), I realized that
the line between RGB and RGBA images is even more blurry than I
Consider the following cases, which should all produce a file with
transparency, if the File->Save plug-ins were working as the user
- Create a new image, use Image->Canvas Size to increase the size of
the canvas (some transparent areas appear), then save as PNG.
- Create a new image, use the Move tool to move a part of the layer
out of the canvas, then save the result as TGA or TIFF.
- Create a new image, use the Opacity slider in the L,C&P dialog to
make it partially transparent, then save as PNG.
All of these test cases (and more) are described in bug #51114:
Wouldn't this be another reason to get rid of the default RGB-only
If someone really wants to use as little memory as possible when
loading an image, we could add an option in the user preferences, such
as "automatically add an alpha channel when loading an image" (default
would be ON). The users who want to save memory already know how to
disable the undo stack, so they could also toggle this option. But
then some of the special cases would have to stay in the code. Is
this a good idea?
Also, the file plug-ins would have to be modified to check if the
alpha channel is empty or not before saving the image. This could be
another option in the user preferences: "automatically strip an empty
alpha channel when saving an image" (default would be ON). There could
be another option, similar to the one used in the "Clear Alpha" script:
"minimum value needed to declare an alpha channel non-empty" (default
would be around 10%, or maybe 0).
Gimp-developer mailing list