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 21:00:28 -0400 Message-ID: <87ej8cnvf7.fsf@stupidchicken.com> References: <87ve1pdnjq.fsf@stupidchicken.com> <4822EC6F.6000703@gnu.org> <87zlr0yh2y.fsf@catnip.gol.com> <482319D6.1020308@gnu.org> <87tzh8yfdc.fsf@catnip.gol.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1210295167 14596 80.91.229.12 (9 May 2008 01:06:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 9 May 2008 01:06:07 +0000 (UTC) Cc: emacs-devel@gnu.org, Jason Rumney To: Miles Bader Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri May 09 03:06:41 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 1JuH47-0000QO-Ud for ged-emacs-devel@m.gmane.org; Fri, 09 May 2008 03:06:28 +0200 Original-Received: from localhost ([127.0.0.1]:53087 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JuH3P-0006Fp-Qj for ged-emacs-devel@m.gmane.org; Thu, 08 May 2008 21:05:43 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JuH3F-0006D1-SS for emacs-devel@gnu.org; Thu, 08 May 2008 21:05:33 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JuH3E-0006CH-1X for emacs-devel@gnu.org; Thu, 08 May 2008 21:05:33 -0400 Original-Received: from [199.232.76.173] (port=36296 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JuH3D-0006CC-S1 for emacs-devel@gnu.org; Thu, 08 May 2008 21:05:31 -0400 Original-Received: from cyd.mit.edu ([18.115.2.24]:47539) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JuH2y-0007Bp-Op; Thu, 08 May 2008 21:05:17 -0400 Original-Received: by cyd.mit.edu (Postfix, from userid 1000) id BD0DA4E585; Thu, 8 May 2008 21:00:28 -0400 (EDT) In-Reply-To: <87tzh8yfdc.fsf@catnip.gol.com> (Miles Bader's message of "Fri\, 09 May 2008 00\:39\:27 +0900") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2.50 (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:96841 Archived-At: Miles Bader writes: > Upon looking closer, I see on very odd attribute: while the original > image I wrote was RGBA, 8-bits per channel, the decimated versions > written by imagemagick are RGBA, 16-bits per channel... The Emacs > PNG-reading code asks libpng to convert 16-bit-per-channel images to > 8-bits per channel, but as such images are fairly rare, it may be that > libpng doesn't do it correctly. > > If I open the original RGBA 8-bits per channel image with Emacs, indeed, > it handles the alpha-channel correctly. It looks like Emacs doesn't handle 16-bit RGBA png images correctly, according to the images on this page: http://www.fnordware.com/superpng/pnggrad16rgba.png http://www.fnordware.com/superpng/pngtest16rgba.png The 8-bit RGBA test image on the same page works fine: http://www.fnordware.com/superpng/pngtest8rgba.png The weird thing, though, is that the image emacs5-256.png which you sent, whose alpha channel is also much up, is 8-bit! This can be verified by stepping through image.c in gdb, or using pngtools.