Subject: Re: bug#22253: Background of transparent PNG images uses default background color, instead of current one

From: Lars Ingebrigtsen <[email-masked]>
Date: Thu, 01 Aug 2019 18:59:55 +0200

Clément Pit--Claudel <[email-masked]> writes:

> When no :background is specified for a transparent PNG, the background color of the 'default face is used. This causes aliasing effect to appear then e.g. the image is highlighted (transient-mark-mode).
>
> To reproduce (on latest emacs-25):
>
> * Save https://i.stack.imgur.com/BqrLK.png as ~/rooster.png
> * emacs -Q
>   M-: (insert #(" 🐤" 1 2
> 	  (display
> 	   (image :type imagemagick :file "~/rooster.png" :ascent center :mask heuristic :height 150))))
> * Notice that the picture looks perfectly antialiased against the default white background
> * C-x h
> * Notice the aliasing

The only way to fix this would be to re-generate the images whenever the
background colour of the image changes, I guess?  Or to support alpha
channels directly in the display engine, and I don't think we have
support for that?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no