From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: PNG image files with alpha channel Date: Thu, 08 May 2008 07:48:25 -0400 Message-ID: <87ve1pdnjq.fsf@stupidchicken.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1210247324 12685 80.91.229.12 (8 May 2008 11:48:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 8 May 2008 11:48:44 +0000 (UTC) Cc: emacs-devel@gnu.org To: Miles Bader Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu May 08 13:49:19 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Ju4cg-0002ZO-Gj for ged-emacs-devel@m.gmane.org; Thu, 08 May 2008 13:49:18 +0200 Original-Received: from localhost ([127.0.0.1]:51481 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ju4by-0005ra-Do for ged-emacs-devel@m.gmane.org; Thu, 08 May 2008 07:48:34 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ju4bu-0005q0-JC for emacs-devel@gnu.org; Thu, 08 May 2008 07:48:30 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ju4bs-0005nd-Rw for emacs-devel@gnu.org; Thu, 08 May 2008 07:48:29 -0400 Original-Received: from [199.232.76.173] (port=48577 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ju4bs-0005nI-Ke for emacs-devel@gnu.org; Thu, 08 May 2008 07:48:28 -0400 Original-Received: from c-98-216-111-182.hsd1.ma.comcast.net ([98.216.111.182]:14800 helo=furry) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Ju4bs-0000x8-FC for emacs-devel@gnu.org; Thu, 08 May 2008 07:48:28 -0400 Original-Received: by furry (Postfix, from userid 1000) id AA4C8C049; Thu, 8 May 2008 07:48:25 -0400 (EDT) In-Reply-To: (Miles Bader's message of "Thu, 08 May 2008 13:46:28 +0900") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:96767 Archived-At: Miles Bader writes: > Is Emacs supposed to properly handle an alpha channel in a PNG file? Yeah. See the png_load function in image.c. > I vaguely recall that it used to do something halfway reasonable (even > if just merging in the default bg color), but now it seem to simply > ignore an alpha channel. It merges in the :background spec if there is one; otherwise, it uses the frame background color. > If you don't have an alpha-channel-bearing image, try this: > > http://download.savannah.gnu.org/releases/emacs/icons/emacs5-256.png > > The "background" around the sphere has an alpha channel that's mostly zero. Hmm, I'm not sure what's wrong with this image. For an example of a png image with alpha background rendered correctly in Emacs, see http://www.w3.org/Graphics/PNG/alphatest.png