#60806Gifbuilder: Allow image-mask-functionality without specifying a mask
Description
Currently you need to specify both an bgImg (the one to overlay) as well as a mask that masks which parts should be overlayed. That mask is converted to a grayscale-image.
If you for example use a png with transparency as bgImg you are free to use a mask that instructs to use “all” pixels with full opacity. When the mask is applied the included transparency of the png still has an effect.
So when using a bgImg which has an alpha-channel itself or if you want to apply a simple “stamp” onto your image (square-image, no transparency at all) then it would make sense to be able to leave out the mask-parameter completely.
For basics how to use/test with bgImg and mask for example see #59392.
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
Related issues 1
History 4
-
Riccardo De Contardi changed category <span data-processor="relativetime" data-value="2015-11-01T19:19:01+00:00" > 11/01/15, 19:19 </span>
-
Susanne Moog changed category <span data-processor="relativetime" data-value="2017-10-26T15:50:34+00:00" > 10/26/17, 15:50 </span>
-
Simon Schaufelberger changed Related to #59392 <span data-processor="relativetime" data-value="2022-03-29T13:27:04+00:00" > 03/29/22, 13:27 </span>
-
Georg Ringer commented and changed status
NewClosed <span data-processor="relativetime" data-value="2026-10-03T07:27:21+00:00" > 10/03/26, 07:27 </span>
I checked this against current
main, and the mask is no longer needed for either use case described here.If an
IMAGEobject has nomask, GIFBUILDER copies the image onto the canvas with GD’s alpha blending:I verified this with a functional test: a 30×10 PNG with an opaque, a half-transparent (alpha 64) and a fully transparent area was placed on a red canvas without
mask. The results were blue for the opaque area, a blend of about(127,0,128)for the half-transparent area, and red for the fully transparent area.maskis only needed if an additional grayscale mask should be applied.