all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Chong Yidong <cyd@stupidchicken.com>
To: Miles Bader <miles@gnu.org>
Cc: emacs-devel@gnu.org, Jason Rumney <jasonr@gnu.org>
Subject: Re: PNG image files with alpha channel
Date: Thu, 08 May 2008 14:19:56 -0400	[thread overview]
Message-ID: <87od7gu08j.fsf@stupidchicken.com> (raw)
In-Reply-To: <87tzh8yfdc.fsf@catnip.gol.com> (Miles Bader's message of "Fri, 09 May 2008 00:39:27 +0900")

Miles Bader <miles@gnu.org> 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.
>
> I did step through the code, BTW, and as far as I can tell, Emacs is
> doing the correct things.
>
> So the problem may in fact be something with the libpng 16-to-8-bit
> conversion code...

One possibility is that libpng's png_set_strip_16 function only strips
the RGB channels down to 8 bits, while keeping the alpha channel at 16
bits.




  parent reply	other threads:[~2008-05-08 18:19 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-08  4:46 PNG image files with alpha channel Miles Bader
2008-05-08 11:48 ` Chong Yidong
2008-05-08 12:05   ` Jason Rumney
2008-05-08 15:02     ` Miles Bader
2008-05-08 15:18       ` Jason Rumney
2008-05-08 15:39         ` Miles Bader
2008-05-08 15:51           ` Jason Rumney
2008-05-08 18:19           ` Chong Yidong [this message]
2008-05-09  1:00           ` Chong Yidong
2008-05-09  1:10             ` Miles Bader
2008-05-09  2:35           ` Chong Yidong
2008-05-08 23:47         ` James Cloos
2008-05-09  0:43           ` Miles Bader

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=87od7gu08j.fsf@stupidchicken.com \
    --to=cyd@stupidchicken.com \
    --cc=emacs-devel@gnu.org \
    --cc=jasonr@gnu.org \
    --cc=miles@gnu.org \
    /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.