Transparent Pixmap Symbol

Randy How rhow at I3.COM
Mon Aug 27 16:43:08 EDT 2007


Thanks Thomas that worked.
 
For the record to get a transparent image fill in place for watermarking
purposes:
 
Image Creation Instructions
 
    * Format = PNG
    * Transparency = TRUE
    * Width & Height can vary (255 x 255 works)
    * Photoshop Instructions
          o Open a blank RGB canvas page with a transparent background
          o Create the text that you want for the watermark, angle
appropriately
          o Save out a PNG format with interlace on 
 
Example symbol File definition 
 
  SYMBOL
    NAME "logo_company"
    TYPE PIXMAP
    IMAGE "h2o_logos/company.png"
  END
 
Example of the LAYER definition
 
LAYER
   NAME "Watermarking Layer"
   DATA "\\path\directory\polygon.shp"   # worldwide or limit to coverage
area
   STATUS DEFAULT
   TYPE POLYGON
   PROJECTION
     "proj=longlat" "ellps=WGS84" "datum=WGS84" "no_defs"
   END
                                                   # Use MINSCALE or
MAXSCALE for specific coverage area visibility
   TRANSPARENCY 75                       # TRANSPARENCY 0 = full
transparency
   CLASS
     STYLE
       SYMBOL "logo_company"
       COLOR 0 0 0
     END
   END
END
 

  _____  

From: thomas bonfort [mailto:thomas.bonfort at gmail.com] 
Sent: Saturday, August 25, 2007 3:59 AM
To: Randy How
Subject: Re: [UMN_MAPSERVER-USERS] Transparent Pixmap Symbol


I've checked with what withe the svn version and transparency is working
with gd and agg for pixmap (with a png image, haven't tried gif) and
truetype polygons fills.
the layer definition is simply
...
OPACITY 50 
....
    CLASS
     NAME "States/Provinces1"
     STYLE
        SYMBOL 'truetype-symbol'  #or SYMBOL 'pixmap-symbol'
       COLOR 0 0 0
     END
...

for png pixmaps, no need for the TRANSPARENT keyword 

thomas


On 8/25/07, Randy How <rhow at i3.com> wrote: 

Thanks for the response Steve,

I've tried all sorts of variations for PNG and GIF, and it hasn't been
successful.

Any other options for "logo water-marking" maps from MapServer?  I was
excited about this approach, but I can't get a transparency for the fill.

Thanks again,
Randy

-----Original Message-----
From: Steve Lime [mailto:Steve.Lime at dnr.state.mn.us
<mailto:Steve.Lime at dnr.state.mn.us> ]
Sent: Friday, August 24, 2007 4:35 PM
To: rhow at I3.COM; MAPSERVER-USERS at lists.umn.edu
Subject: Re: [UMN_MAPSERVER-USERS] Transparent Pixmap Symbol 

Randy: I'm thinking we have a documentation issue here. I'm not sure that
the TRANSPARENT option is even supported anymore. Typically MapServer
respects the transparency of the image itself, so you need to create a 
transparent GIF for that to work. Give that a shot and I'll check the source
(and update the docs) to make sure.

Steve


>>> Randy How <rhow at I3.COM> 08/23/07 9:09 PM >>> 
I'm attempting to set the background transparency for a symbol that I've
created, but with no success.

My symbol definition

  SYMBOL
    NAME "logo"
    TYPE PIXMAP
    IMAGE "h2o_logos/logo.GIF" 
    TRANSPARENT 0
  END

According to the reference setting a color index in the GIF sets the
transparency (i.e. TRANSPARENT 0).  Color index is 0 is black, and the
output map layer symbol is not transparent! 
http://mapserver.gis.umn.edu/docs/reference/symbology/referencemanual-all-pa
ges

I've looked over this page and it only discusses PNG files.  I can't get any

of my PNG file variations to work either.
http://mapserver.gis.umn.edu/docs/howto/cartosymbols

Any help would be greatly appreciated,
Randy 




-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20070827/7be18eff/attachment.html


More information about the mapserver-users mailing list