Subject: bug#37153: 26.1; some png images scrambled

From: Eli Zaretskii <[email-masked]>
Date: Sat, 24 Aug 2019 09:22:34 +0300

> Date: Fri, 23 Aug 2019 22:17:58 -0500
> From: "Roland Winkler" <[email-masked]>
> Cc: [email-masked]
> 
> The problem with my test png image is that it has transparent parts
> that need to be displayed with a light color so that one can
> recognize the nontransparent dark parts.  But the image uses fully
> transparent black as background.  The behavior in such a case is not
> strictly defined by the png standard, see
> 
> https://sourceforge.net/p/png-mng/mailman/message/36747189/
> 
> Emacs displays such fully transparent background with its original
> color specified by the image.  But I believe it would make more
> sense if emacs used instead a background color that the user can
> choose (the background color of the frame), similar to, for example,
> eog.

Please take a look at image.c in the PNG area: it includes quite a few
references to "transparent" and what we should be/are doing with that.

> Should I submit a separate feature request for this?

I don't think I understand the feature you want to request.  Please
don't forget that the same PNG image can be displayed on places that
have different background colors.  I also don't think I see the use
cases for such images in Emacs.