GNU bug report logs - #47040
27.1; PNG binary transparency is ignored

Previous Next

Package: emacs;

Reported by: ynyaaa <at> gmail.com

Date: Wed, 10 Mar 2021 10:47:02 UTC

Severity: normal

Found in version 27.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Alan Third <alan <at> idiocy.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, ynyaaa <at> gmail.com, 47040 <at> debbugs.gnu.org
Subject: bug#47040: 27.1; PNG binary transparency is ignored
Date: Wed, 10 Mar 2021 22:14:25 +0000
On Wed, Mar 10, 2021 at 05:14:09PM +0200, Eli Zaretskii wrote:
> > From: Lars Ingebrigtsen <larsi <at> gnus.org>
> > Date: Wed, 10 Mar 2021 16:05:25 +0100
> > Cc: 47040 <at> debbugs.gnu.org
> > 
> > > Red pixels in the both images have 0 for alpha value, so they should be
> > > transparent and invisible, but transparent1.png is displayed as a red
> > > square with a green frame in a emacs buffer.
> > >
> > > transparent2.png is displayed as a white square with a green frame as
> > > expected.
> > >
> > > When they are displayed in a chrome browser, inner squares of the both
> > > images are displayed as transparent.
> > 
> > I'm unable to reproduce this in Emacs 27.1 in Debian/bullseye, so this
> > may be a Windows-specific problem.  It may also be fixed in Emacs 28,
> > since the transparency code has gotten a lot of work.  Would it be
> > possible for you to check in Emacs 28 whether this problem is still
> > present there?
> > 
> > If not, can somebody else with Windows and Emacs 28 check whether the
> > problem is still present?
> 
> The problem is still present when using the default libpng, but not if
> I use the w32 native image API.

I see the same on NS, so it must be something wrong with the libpng
support code. Although I don't know why Lars doesn't see it on Debian.

I wonder if it's related to image.c:6909

    # ifdef PNG_tRNS_SUPPORTED

It looks like that is not defined here... I don't really understand
what the png code is doing with transparency.
-- 
Alan Third




This bug report was last modified 2 years and 342 days ago.

Previous Next


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