[thelist] PNG and alpha channel ?

Liorean Liorean at user.bip.net
Sun Jan 20 07:00:47 CST 2002


At 09:26 2002-01-20 +0100, Alliax wrote:
>Hello,
>I've never used PNG on my websites, to do transparent background I was using
>GIF but limited to 256 colours.
>
>and this morning I said to myself, why not trying this PNG format for doing
>transparent background on a 24bits image ?
>I tried and on the webpage, the transparent bit has a grey colour.
>IE6 WIN98
>
>So I reverted to my GIF..
>
>But wanted to know if that's normal/intended behaviour of PNG displayed in
>browsers?

IE for Windows still lack full support for PNG. There is a hack that you 
can use to get them to display correct as img tags, but when you're trying 
for background you're out of luck.
<http://youngpup.net/?request=/snippets/sleight.xml>


IE does the following when it handles PNG:
- If the PNG is 24 to 48 bpp, neither transparency nor 
alpha-channels  work. The image is instead rendered with a background 
colour, making all parts display against whatever background colour it 
choses. Background color is the same over the same version on different 
comps, but different versions such as IE5/5.5/6 chose different background 
colours.
- If the PNG is 1-8 bpp, all alpha channel and transparency is handled as 
were it fully transparent.


See my PNG testpages (one older and one newer site)
<http://liorean.tripod.com/pngtest/index.html>
<http://www20.brinkster.com/liorean/pngtest/index.html>


// Liorean





More information about the thelist mailing list