[ka-Map-users] PNG transparency in IE - some conclusions

Ehud Shabtai eshabtai at gmail.com
Sun Apr 9 09:11:37 EDT 2006


Hi all,

I just spent some hours playing with different PNG variants using
ka-map and displaying them on IE.

Here's what I learned:

1. IE supports PNG transparency for indexed color PNGs (i.e. not true
color PNGs).
2. Using the famous hack, IE can display RGBA PNGs (the hack only
works on true color with alpha channel PNG).

ka-map point of view:

The png files of ka-map's icons should be converted to indexed color
to be displayed correctly. I converted the sun_white.png icon file and
now it displays fine on IE.


Displaying PNG layers with transparency on IE:

This is possible if you use RGBA PNG (24 bits for colors + 8 bit for
alpha channel).
Some changes are required in ka-map:

1. tile.php - when it cuts a meta tile into the smaller tiles it does
not copy the alpha channel. This should be changed so if the generated
mapserver PNG image contains alpha channel it is copied to the tiles.

2. Currently the IE hack is never called in ka-map even for png files.
In addition the actual hack must be issued after the image has been
loaded (i.e. in kaMap_imgOnLoad), otherwise panning is really bad in
IE.


If there's interest i can provide my diffs.


--
Ehud Shabtai
http://www.freemap.co.il/map/



More information about the ka-Map-users mailing list