[ka-Map-users] GIF transparency - fixed

Jacob Delfos jacob.delfos at maunsell.com
Mon Aug 8 23:54:53 EDT 2005


Ok, figured it out.

If the "imagetype" in the mapfile is not set to GIF, then a GIF created by php_mapscript/GD will not have its transparency set correctly. I think I remember running into that problem once with chameleon.....

All is solved now....... got my transparent tiles above my full-coloured ones in IE.

regards,

Jacob 



--------------------------------------------------------------------------------
From: ka-map-users-bounces at lists.maptools.org [mailto:ka-map-users-bounces at lists.maptools.org] On Behalf Of Delfos, Jacob
Sent: 9 August 2005 11:22
To: ka-map-users at lists.maptools.org
Subject: [ka-Map-users] GIF transparency


Hi List, 

Just experimenting with ka-map, making it output GIF images for all layers that are assumed not to be full-colour (raster), so that I can have transparency in AND 24bit colour in IE without the PNG hack. All works well, and I get the right imagetype. Only thing is.... My GIF's are not transparent. Even if I use Ka-map the normal way (no magic), specifying GIF as imagetype, I don't get transparency. 

In tile.php, it says: 

------------------------------------------------------------------ 
$nTransparent = imagecolorallocate($oTile, $oMap->imagecolor->red, $oMap->imagecolor->green, $oMap->imagecolor->blue); 
imagecolortransparent( $oTile,$nTransparent); 
------------------------------------------------------------------ 

When I request the GIF properties in Irfanview, it tells me the transparent colour is "0". I assume that is 0, 0, 0. But transparency is set to the imagecolour of my map, which is 255,255,255 (correctly picked up in tile.php, I checked that).

I'm using php_mapscript_46. Any ideas? 

Regards, 

Jacob 



JACOB DELFOS
SPATIAL INFORMATION ANALYST
Maunsell Australia Pty Ltd
629 Newcastle Street, Leederville, WA 6007 
PO Box 81, Leederville, WA 6902 
Western Australia 
ABN 20 093 846 925

Tel     + 61 8 9281 6185
Fax    + 61 8 9281 6297
jacob.delfos at maunsell.com 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/ka-map-users/attachments/20050809/f6bebe52/attachment.html


More information about the ka-Map-users mailing list