It can be done, but, it's messy.
IE7 will fix the problem. All decent browsers handle pngs.
I handle it by generating a gif version just for IE6. Then I check if the client's browser is IE6. If so, I send the gif version.
transparent png in Internet Explorer
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
IE6 will only handle PNG transparency in a very limited format, basically the same as a GIF image.
Your solutions
Convert images to GIF or JPEG
This may require you to 'flatten' any semi-transparency pixels onto a background that is suitable for your web pages, using method described in IM examples for GIF Image Handling
http://www.cit.gu.edu.au/~anthony/graph ... ats/#trans
Add some sort of PNG image handler for IE6.
This is tricky and a number of variations exist. Usally they use soem java code that overlays the image onto the page so that semi-transparency works.
For one example (and other links) see http://www.cit.gu.edu.au/~anthony/wwwlab/pngtest/
Require users to get a decent browser IE7, firefox, etc etc etc
This will be the solution in a few years, but it is a little much to expect from a general user at this time.
That is your choices, take your pick.
Your solutions
Convert images to GIF or JPEG
This may require you to 'flatten' any semi-transparency pixels onto a background that is suitable for your web pages, using method described in IM examples for GIF Image Handling
http://www.cit.gu.edu.au/~anthony/graph ... ats/#trans
Add some sort of PNG image handler for IE6.
This is tricky and a number of variations exist. Usally they use soem java code that overlays the image onto the page so that semi-transparency works.
For one example (and other links) see http://www.cit.gu.edu.au/~anthony/wwwlab/pngtest/
Require users to get a decent browser IE7, firefox, etc etc etc
This will be the solution in a few years, but it is a little much to expect from a general user at this time.
That is your choices, take your pick.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Anthony here is a link to an image somebody did for me to prove you could get IE to display a png with transparency. The quality of the edges is not as good as the pngs normaly are due to losing the semi-transparent pixels. Basicly as you said it is a gif.
The guy would not tell me how he did it ( he didn't use ImageMagick ) but hinted that you should not use the alpha layer for the transparency. I have searched the net and thats where I found the referance to using an 8bit image.
Thats 2 options to look into; how would you go about it? I had a play around but did not really know what I was doing and so could not get a result.
I could not get identify to work either so can not see the image information.
http://www.rubblewebs.co.uk/imagemagick ... re_png.php
The guy would not tell me how he did it ( he didn't use ImageMagick ) but hinted that you should not use the alpha layer for the transparency. I have searched the net and thats where I found the referance to using an 8bit image.
Thats 2 options to look into; how would you go about it? I had a play around but did not really know what I was doing and so could not get a result.
I could not get identify to work either so can not see the image information.
http://www.rubblewebs.co.uk/imagemagick ... re_png.php
It's possible to work with 24 bits PNG's (RGBA) in IE, that is by referencing a "behavior" script.
See http://webfx.eae.net/dhtml/pngbehavior/pngbehavior.html for the script and a description.
Besides that, by generating a 8bits (== 256 colors == indexed color image) for IE from a 24bits PNG is not a true option, except when using the pngbehavior method. Because IE does not do proper color correction (color management) on displayed PNG's.
So, in IE don't use PNG at all, unless you use the pngbehavior.htc script. Else use GIF, PNG or BMP.
*edit*
Crap I just saw Anthony was already pointing u to that direction.
See http://webfx.eae.net/dhtml/pngbehavior/pngbehavior.html for the script and a description.
Besides that, by generating a 8bits (== 256 colors == indexed color image) for IE from a 24bits PNG is not a true option, except when using the pngbehavior method. Because IE does not do proper color correction (color management) on displayed PNG's.
So, in IE don't use PNG at all, unless you use the pngbehavior.htc script. Else use GIF, PNG or BMP.
*edit*
Crap I just saw Anthony was already pointing u to that direction.