GNU bug report logs - #77104
31.0.50; Transparent png image background is ignored in frames with alpha-background

Previous Next

Package: emacs;

Reported by: Ihor Radchenko <yantar92 <at> posteo.net>

Date: Tue, 18 Mar 2025 18:05:02 UTC

Severity: normal

Found in version 31.0.50

Full log


Message #23 received at 77104 <at> debbugs.gnu.org (full text, mbox):

From: Alan Third <alan <at> idiocy.org>
To: Ihor Radchenko <yantar92 <at> posteo.net>
Cc: Po Lu <luangruo <at> yahoo.com>, dybfysiat <at> 163.com, Eli Zaretskii <eliz <at> gnu.org>,
 77104 <at> debbugs.gnu.org
Subject: Re: bug#77104: 31.0.50; Transparent png image background is ignored
 in frames with alpha-background
Date: Wed, 19 Mar 2025 20:45:37 +0000
On Wed, Mar 19, 2025 at 04:57:01PM +0000, Ihor Radchenko wrote:
> Alan Third <alan <at> idiocy.org> writes:
> 
> > I think the problem is that Emacs has never handled image
> > transparency, so it sets the transparent pixels of the image to the
> > frame's background colour. There's quite a bit of fiddling to manage
> > this with changing backgrounds and so on.
> >
> > I'm not sure what would be required for drawing transparent images to
> > the glass. On NS I think it would be near trivial as the toolkit will
> > handle it for us, but I don't know about others. For example I have a
> > memory of being told that some terms don't clear under images so
> > drawing a transparent image might show the previous pixels.
> 
> Then, how does :mask 'heuristic works? It somehow manages to set certain
> pixels to be truly transparent. If so, why is it a problem setting
> pixels that have transparent color in the image truly transparent in
> exactly the same way?

As I recall on X it uses a mask, so there's a second image that has
the transparent pixels marked (so probably a one bit bitmap) and the
image drawing function only draws the corresponding non-transparent
pixels from the main image.

Other terms may work differently. I don't think NS has native support
for masking bitmaps, for example. I can't remember how we work around
that.
-- 
Alan Third




This bug report was last modified 87 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.