[ka-Map-users] PNG transparency in IE - some conclusions
eshabtai at gmail.com
Tue Apr 11 02:54:55 EDT 2006
Attached is a patch against the current CVS snapshot.
After applying this patch, to enable alpha transparency you need to
add an explicit "imageformat ALPHA" entry in the METADATA section of a
layer you want to be transparent.
You will also need to make sure that mapserver generates PNGs with
alpha channel transparency, use something like:
Here's an example of some anti aliased lines drawn over a landsat
image. Each is drawn as a different layer:
On 4/10/06, Shoaib Burq <hydromap at gmail.com> wrote:
> Well done Ehud, yea please can post the diffs... is there any reason
> why the PNG's not created with alpha channel currently -- perhaps
> On 4/9/06, Ehud Shabtai <eshabtai at gmail.com> wrote:
> > 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/
> > _______________________________________________
> > ka-Map-users mailing list
> > ka-Map-users at lists.maptools.org
> > http://lists.maptools.org/mailman/listinfo/ka-map-users
More information about the ka-Map-users