<!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. </FONT></SPAN></DIV>
<DIV><SPAN class=067430005-24092008><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=067430005-24092008><FONT face=Arial size=2>The image has a
transparent background. When I use the symbol with MapServer CGI, I the
transparency works. When I use the symbol in MapScript, I get a black
background for the symbol, no transparency. </FONT></SPAN></DIV>
<DIV><SPAN class=067430005-24092008><FONT face=Arial
size=2></FONT></SPAN> </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> </DIV>
<DIV><SPAN class=067430005-24092008><FONT face=Arial size=2>img =
mapscript.imageObj(/symbols/redcross.png', 'GD/PNG')</FONT></SPAN></DIV>
<DIV> </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) </FONT></SPAN></DIV>
<DIV><SPAN class=067430005-24092008><FONT face=Arial
size=2></FONT></SPAN> </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> </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> </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> INTERLEAVE=PIXEL<BR>Corner
Coordinates:<BR>Upper Left ( 0.0,
0.0)<BR>Lower Left ( 0.0, 32.0)<BR>Upper
Right ( 32.0, 0.0)<BR>Lower Right (
32.0, 32.0)<BR>Center (
16.0, 16.0)<BR>Band 1 Block=32x1 Type=Byte,
ColorInterp=Red<BR> Mask Flags: PER_DATASET ALPHA <BR>Band 2 Block=32x1
Type=Byte, ColorInterp=Green<BR> Mask Flags: PER_DATASET ALPHA <BR>Band 3
Block=32x1 Type=Byte, ColorInterp=Blue<BR> 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> </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?
</FONT></SPAN></DIV>
<DIV><SPAN class=067430005-24092008><FONT face=Arial
size=2></FONT></SPAN> </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> </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> </DIV>
<DIV><SPAN class=067430005-24092008><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=067430005-24092008><FONT face=Arial
size=2></FONT></SPAN> </DIV></BODY></HTML>