[mapserver-users] Using IMAGECOLOR to create a transparency mask

Glenn Waldron gwaldron at gmail.com
Thu Feb 5 12:03:05 PST 2009


Hi Steve,

I am trying to achieve the transparency effect as described in the
documentation:
"IMAGECOLOR [r] [g] [b]Color to initialize the map with (i.e. background
color). When transparency is enabled (TRANSPARENT ON) for the typical case
of 8-bit pseudocolored map generation, this color will be marked as
transparent in the output file palette. Any other map components drawn in
this color will also be transparent, so for map generation with transparency
it is best to use an otherwise unused color as the background color."Perhaps
I'm not clear on what constitutes "8-bit pseudocolored map generation". I am
using the AGG/PNG driver with TRANSPARENT ON.


Glenn Waldron : Pelican Mapping : http://pelicanmapping.com :
+1.703.652.4791


On Thu, Feb 5, 2009 at 2:04 PM, Steve Lime <Steve.Lime at dnr.state.mn.us>wrote:

> IMAGECOLOR just sets the background color for an image.
>
> Steve
>
> >>> On 2/5/2009 at 1:02 PM, in message
> <70fbea790902051102p52a8067ar643666f0562642f3 at mail.gmail.com>, Glenn
> Waldron
> <gwaldron at gmail.com> wrote:
> > Hi Thomas,
> >
> > In that case maybe I am misunderstanding the purpose of IMAGECOLOR. What
> is
> > it supposed to do, if not make all pixels of the specified color
> > transparent?
> >
> >
> > Glenn Waldron : Pelican Mapping : http://pelicanmapping.com :
> > +1.703.652.4791
> >
> >
> > On Thu, Feb 5, 2009 at 1:24 PM, thomas bonfort
> > <thomas.bonfort at gmail.com>wrote:
> >
> >> On Thu, Feb 5, 2009 at 14:43, Glenn Waldron <gwaldron at gmail.com> wrote:
> >> > Stephen,
> >> >
> >> >  However, I am trying to
> >> > get the pixels in the final composited image to be completely
> >> transparent.
> >> >
> >>
> >> There's no way you can set pixels to become transparent once the image
> >> is saved with the AGG outputformat.
> >>
> >> regards,
> >> thomas
> >>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20090205/3fe6014f/attachment.htm>


More information about the MapServer-users mailing list