[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: address@hidden: problem with transparent PNG image display]

From: Chong Yidong
Subject: Re: address@hidden: problem with transparent PNG image display]
Date: Wed, 17 Jan 2007 23:24:04 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.92 (gnu/linux)

> From: Chris Moore <address@hidden>
> Download this image and open it in Emacs:
> http://tango-project.org/static/cvs/tango-art-tools/palettes/Tango-Palette.png
> The image has lots of transparent pixels.  Using M-x
> set-background-colour RET and you'll see the background of the image
> changes with the background.

Umm, no it doesn't (check again).  Emacs 22 does not support
dynamically changing background colors, because that would involve
loading a new image object, and no one has gotten around to writing
the necessary code.  See image.c:6375.

Png images can specify what color to draw the background in if a
browser cannot handle arbitrary transparencies (this is the "Save
background color" option in Gimp).  The png code in Emacs fills in the
image background with the current frame background iff this background
color is unspecified.  This is why the `convert'ed png shows a white
background in Emacs, whereas the original png used whatever background
color your frame had---because imagemagick defaults to a white
background, whereas the original png did not specify it.  Again, note
that using M-x set-background-color RET will NOT change the background
color of the displayed image.

I think this bug should be removed from FOR-RELEASE.  Someone should,
however, work on this after the release.

> Now use 'convert' from ImageMagick to make a copy of the image:
>   $ convert Tango-Palette.png Tango-Palette-copy.png
> Open the new copy in Emacs and the transparent pixels show up as white
> pixels.  Open the copy in The GIMP or gqview and you can see that the
> background really is still transparent.
> I'm using this version of convert:
>   Version: ImageMagick 6.2.4 12/13/06 Q16 http://www.imagemagick.org
>   Copyright: Copyright (C) 1999-2005 ImageMagick Studio LLC

reply via email to

[Prev in Thread] Current Thread [Next in Thread]