<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Message</TITLE>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.16705" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=067430005-24092008><FONT face=Arial size=2>I am using a pixmap 
symbol to mark a point using Python MapScript v. 5.2.&nbsp; </FONT></SPAN></DIV>
<DIV><SPAN class=067430005-24092008><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=067430005-24092008><FONT face=Arial size=2>The image has a 
transparent background.&nbsp; When I use the symbol with MapServer CGI, I the 
transparency works.&nbsp; When I use the symbol in MapScript, I get a black 
background for the symbol, no transparency.&nbsp; </FONT></SPAN></DIV>
<DIV><SPAN class=067430005-24092008><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=067430005-24092008><FONT face=Arial size=2>Here is how I am 
creating the symbol:</FONT></SPAN></DIV>
<DIV><SPAN class=067430005-24092008><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=067430005-24092008><FONT face=Arial size=2>img = 
mapscript.imageObj(/symbols/redcross.png', 'GD/PNG')</FONT></SPAN></DIV>
<DIV>&nbsp;</DIV>
<DIV><SPAN class=067430005-24092008><FONT face=Arial size=2># create the symbol 
using the image<BR>symbol = mapscript.symbolObj('from_img')<BR>symbol.type = 
mapscript.MS_SYMBOL_PIXMAP<BR>symbol.setImage(img) <BR>symbol_index = 
mymap.symbolset.appendSymbol(symbol)&nbsp; </FONT></SPAN></DIV>
<DIV><SPAN class=067430005-24092008><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=067430005-24092008><FONT face=Arial size=2>I also tried to add 
this to the layer, but it made no difference either:</FONT></SPAN></DIV>
<DIV><SPAN class=067430005-24092008><FONT face=Arial 
size=2>inline_layer.transparency = mapscript.MS_GD_ALPHA</FONT></SPAN></DIV>
<DIV><SPAN class=067430005-24092008><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=067430005-24092008><FONT face=Arial size=2>Here is a gdalinfo 
report on the symbol image:</FONT></SPAN></DIV>
<DIV><SPAN class=067430005-24092008><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=067430005-24092008><FONT face=Arial size=2>Driver: PNG/Portable 
Network Graphics<BR>Files: redcross.png<BR>Size is 32, 32<BR>Coordinate System 
is `'<BR>Image Structure Metadata:<BR>&nbsp; INTERLEAVE=PIXEL<BR>Corner 
Coordinates:<BR>Upper Left&nbsp; (&nbsp;&nbsp;&nbsp; 0.0,&nbsp;&nbsp;&nbsp; 
0.0)<BR>Lower Left&nbsp; (&nbsp;&nbsp;&nbsp; 0.0,&nbsp;&nbsp; 32.0)<BR>Upper 
Right (&nbsp;&nbsp; 32.0,&nbsp;&nbsp;&nbsp; 0.0)<BR>Lower Right (&nbsp;&nbsp; 
32.0,&nbsp;&nbsp; 32.0)<BR>Center&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (&nbsp;&nbsp; 
16.0,&nbsp;&nbsp; 16.0)<BR>Band 1 Block=32x1 Type=Byte, 
ColorInterp=Red<BR>&nbsp; Mask Flags: PER_DATASET ALPHA <BR>Band 2 Block=32x1 
Type=Byte, ColorInterp=Green<BR>&nbsp; Mask Flags: PER_DATASET ALPHA <BR>Band 3 
Block=32x1 Type=Byte, ColorInterp=Blue<BR>&nbsp; Mask Flags: PER_DATASET ALPHA 
<BR>Band 4 Block=32x1 Type=Byte, ColorInterp=Alpha<BR></FONT></SPAN></DIV>
<DIV><SPAN class=067430005-24092008><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=067430005-24092008><FONT face=Arial size=2>Any ideas on how to 
get a pixmap symbol with a transparent background using python mapscript?&nbsp; 
</FONT></SPAN></DIV>
<DIV><SPAN class=067430005-24092008><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=067430005-24092008><FONT face=Arial size=2>Thanks, 
</FONT></SPAN></DIV>
<DIV><SPAN class=067430005-24092008><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=067430005-24092008><FONT face=Arial 
size=2>David.</FONT></SPAN></DIV>
<DIV><SPAN class=067430005-24092008><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=067430005-24092008><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=067430005-24092008><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV></BODY></HTML>