[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: PNG image files with alpha channel
From: |
Miles Bader |
Subject: |
Re: PNG image files with alpha channel |
Date: |
Fri, 09 May 2008 00:02:29 +0900 |
Jason Rumney <address@hidden> 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.
- PNG image files with alpha channel, Miles Bader, 2008/05/08
- Re: PNG image files with alpha channel, Chong Yidong, 2008/05/08
- Re: PNG image files with alpha channel, Jason Rumney, 2008/05/08
- Re: PNG image files with alpha channel,
Miles Bader <=
- Re: PNG image files with alpha channel, Jason Rumney, 2008/05/08
- Re: PNG image files with alpha channel, Miles Bader, 2008/05/08
- Re: PNG image files with alpha channel, Jason Rumney, 2008/05/08
- Re: PNG image files with alpha channel, Chong Yidong, 2008/05/08
- Re: PNG image files with alpha channel, Chong Yidong, 2008/05/08
- Re: PNG image files with alpha channel, Miles Bader, 2008/05/08
- Re: PNG image files with alpha channel, Chong Yidong, 2008/05/08
- Re: PNG image files with alpha channel, James Cloos, 2008/05/08
- Re: PNG image files with alpha channel, Miles Bader, 2008/05/08