unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Miles Bader <miles@gnu.org>
To: Jason Rumney <jasonr@gnu.org>
Cc: Chong Yidong <cyd@stupidchicken.com>, emacs-devel@gnu.org
Subject: Re: PNG image files with alpha channel
Date: Fri, 09 May 2008 00:02:29 +0900	[thread overview]
Message-ID: <87zlr0yh2y.fsf@catnip.gol.com> (raw)
In-Reply-To: <4822EC6F.6000703@gnu.org> (Jason Rumney's message of "Thu, 08 May 2008 13:05:03 +0100")

Jason Rumney <jasonr@gnu.org> writes:
>> 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
>
> Merely loading it into Gimp and saving it seems to be enough to fix the
> problem (even with the options "Save background color" and "Save color
> values from transparent pixels" ticked). So it must be something in the
> details of how Gimp saves transparency info vs the software Miles used.

As far as I can tell, it's a valid alpha channel -- firefox displays it
"correctly", as do all the image-display programs I've tried.

I wrote the software that wrote the image, so I have some handle on what
it's doing.  It uses libpng to do the actual writing (and reading),
which is the same library Emacs uses.

Perhaps there's some header info that emacs wants which isn't there?

I write the header like:

  png_set_IHDR (libpng_struct, libpng_info, width, height,
                8, PNG_COLOR_TYPE_RGB_ALPHA, PNG_INTERLACE_NONE,
		PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT);
  png_set_gAMA (libpng_struct, libpng_info, gamma_correction);

confusing...

[My software also reads back the alpha info with no problem.]

-Miles

-- 
Egotist, n. A person of low taste, more interested in himself than in me.




  reply	other threads:[~2008-05-08 15:02 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 [this message]
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
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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zlr0yh2y.fsf@catnip.gol.com \
    --to=miles@gnu.org \
    --cc=cyd@stupidchicken.com \
    --cc=emacs-devel@gnu.org \
    --cc=jasonr@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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).