Subject: bug#77104: 31.0.50; Transparent png image background is ignored in frames with alpha-background

From: Eli Zaretskii <[email-masked]>
Date: Wed, 19 Mar 2025 14:14:28 +0200

> Cc: gynamics <[email-masked]>
> From: Ihor Radchenko <[email-masked]>
> Date: Tue, 18 Mar 2025 18:03:23 +0000
> 
> Try the following starting from emacs -Q + the attached .png file:
> 
> 1.
> 
> (let ((ov (make-overlay 1 10)))
>   (set-frame-parameter nil 'alpha-background 90)
>   (overlay-put
>    ov
>    'display
>    (create-image
>     "/path/to/image.png"
>     nil nil :width 100)))
> 
> 2. Observe image background not being transparent, but instead using
> default face background.
> 
> 3.
> 
> (let ((ov (make-overlay 1 10)))
>   (set-frame-parameter nil 'alpha-background 90)
>   (overlay-put
>    ov
>    'display
>    (create-image
>     "/path/to/image.png"
>     nil nil :width 100 :mask 'heuristic)))
> 
> 4. With :mask 'heuristic, the background becomes transparent (mod
> "rough" edges due to clipping)
> 
> I believe that (1) is a bug.
> 
> See also https://list.orgmode.org/orgmode/[email-masked]/

Po Lu and Alan, is this a bug or a missing feature?