From: Chong Yidong <cyd@stupidchicken.com>
Subject: Re: [dooglus@gmail.com: problem with transparent PNG image display]
Date: Wed, 17 Jan 2007 23:24:04 -0500 [thread overview]
Message-ID: <87ps9drmhn.fsf@stupidchicken.com> (raw)
In-Reply-To: E1H4iSz-0007Rf-IZ@fencepost.gnu.org
> From: Chris Moore <dooglus@gmail.com>
>
> 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
next prev parent reply other threads:[~2007-01-18 4:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-10 18:46 [dooglus@gmail.com: problem with transparent PNG image display] Richard Stallman
2007-01-10 21:18 ` Chris Moore
2007-01-18 4:24 ` Chong Yidong [this message]
2007-01-18 19:01 ` Chris Moore
2007-01-19 1:09 ` Richard Stallman
2007-01-19 1:29 ` Chong Yidong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ps9drmhn.fsf@stupidchicken.com \
--to=cyd@stupidchicken.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.