Page 1 of 1

Posted: 2006-08-10T10:57:38-07:00
by ridera
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.

Posted: 2006-08-10T12:27:59-07:00
by Bonzo
I do not know how to do it in ImageMagick but I think you need to go to 8 bit and have index transparency or something.

Posted: 2006-08-10T16:32:31-07:00
by SharkD
You can also embed the PNG image in an SVG document.

Posted: 2006-08-10T21:37:28-07:00
by SharkD
rain wrote: If I embedded it in an svg would my users then need a plugin for svg?


Yes; but then it would work in all browsers.

Posted: 2006-08-10T23:44:05-07:00
by anthony
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.

Posted: 2006-08-11T14:16:01-07:00
by Bonzo
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

Posted: 2006-08-11T17:26:46-07:00
by GiantRabbit
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.