transparent hatch

Richard Greenwood richard.greenwood at GMAIL.COM
Thu Aug 4 18:46:46 EDT 2005


On 8/4/05, Frank Warmerdam <fwarmerdam at gmail.com> wrote:
> On 8/4/05, Richard Greenwood <richard.greenwood at gmail.com> wrote:
> > Since Mapserver 4.4, when I want to output jpegs, if I want a simple
> > vector hatch to be transparent (for underlying layer to show thru) I
> > have to set IMAGEMODE PC256:
> >
> > OUTPUTFORMAT
> >   NAME jpeg
> >   DRIVER "GD/JPEG"
> >   MIMETYPE "image/jpeg"
> >   IMAGEMODE PC256
> >   EXTENSION "jpg"
> > END
> >
> > If I use IMAGEMODE RGB, the space between the vector lines is opaque white.
> >
> > My symbol definition:
> >
> > Symbol
> >         NAME 'Diag_NE_SW'
> >         TYPE VECTOR
> >         POINTS
> >                 0 1
> >                 1 0
> >         END
> > END
> >
> > And my class definition:
> >
> > CLASS
> >         NAME "FEMA 500 Year Flood Zone SHX"
> >         EXPRESSION 'SHX'
> >         STYLE
> >                 COLOR 112 186 248
> >                 OUTLINECOLOR 0 0 255
> >                 SYMBOL 'Diag_NE_SW'
> >                 SIZE 20
> >         END
> > END
> >
> > Am I overlooking anything? I would prefer to use IMAGEMODE RGB.
> 
> Rich,
> 
> Try adding a "TRANSPARENT ALPHA" line in your layer definition.
> Amoung other things this enables the alpha blending needed for
> raster symbols with transparency.
> 
> I'm not really satisfied with this requirement, though it is organized
> this way partly to avoid extra work in the common case where there
> is no transparency.
> 
> Best regards,
> 
> --
> ---------------------------------------+--------------------------------------
> I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
> light and sound - activate the windows | http://pobox.com/~warmerdam
> and watch the world go round - Rush    | Geospatial Programmer for Rent
> 

Thank you Frank, you always have the answer!

For the record; it is "TRANSPARENCY alpha" (not TRANSPARENT).

Best regards,
-- 
Richard Greenwood
richard.greenwood at gmail.com
www.greenwoodmap.com



More information about the mapserver-users mailing list