[EMAIL PROTECTED] (Raphael Quinet) writes:
> 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".
For some obscure reason the same discussion came up again yesterday
when Mitch and me started to work on the framework necessary to redo
the layers dialog. The fact that the background is special cased adds
a lot of ugliness to the code and provides no real advantage.
Our conclusion was that The GIMP should probably automatically add an
alpha channel if:
- the user creates a second layer in the same image
- the user adds a mask
- the user changes the layers opacity from 100%
- ... [ more cases we forgot to consider ]
> Consider the following cases, which should all produce a file with
> transparency, if the File->Save plug-ins were working as the user
> would expect:
> - Create a new image, use Image->Canvas Size to increase the size of
> the canvas (some transparent areas appear), then save as PNG.
IIRC, changing the Canvas Size does not alter the saved result at all
since most file plug-ins save the current layer, not the whole image.
I don't see why the user would expect an alpha channel here.
> - 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.
Same reasons apply here.
> - Create a new image, use the Opacity slider in the L,C&P dialog to
> make it partially transparent, then save as PNG.
Correct, see my notes above.
> Wouldn't this be another reason to get rid of the default RGB-only
> background layer?
Yes. But I don't think we should always add the alpha channel. Just
do it automatically as soon as there is more than a single layer in
> 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).
IMHO unnecessary since the user can always use Flatten to get rid of
the alpha channel before saving.
Gimp-developer mailing list