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

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


Stephen,

Thanks for the tip. I believe your approach may set the shape layer to be
transparent, letting lower layers to show through. However, I am trying to
get the pixels in the final composited image to be completely transparent.


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


On Wed, Feb 4, 2009 at 10:57 PM, Stephen Woodbridge <woodbri at swoodbridge.com
> wrote:

> gwaldron wrote:
>
>> I'm trying to use IMAGECOLOR to try to force all pixels of a certain color
>> to
>> become fully transparent, but I am not having any luck getting it to work.
>>
>> My output format it AGG/PNG, RGBA, TRANSPARENT ON.
>>
>> I have a shapefile layer set to COLOR 0 50 100, and my map-level
>> IMAGECOLOR
>> set to the same. I was hoping all the polys in the shapefile would render
>> as
>> transparent pixels, but no luck; they just show up as blue polygons.
>>
>> What am I doing wrong here? Thanks.
>>
>
> Transparency is tricky indeed. I always have to experiment with setting to
> get it to work. I should document it for my one good, next time I work it
> out. Which doesn't really help you, but you might try the following.
>
> COLOR -1 -1 -1
>
> or leaving the COLOR off totally on a polygon should prevent it from
> filling, You probably want to use OUTLINECOLOR to cause it to draw the
> polygon border.
>
> Or are you trying to draw a color the will overwrite the pixels below it
> and make them transparent?
>
> -Steve W
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20090205/1099444f/attachment.htm>


More information about the MapServer-users mailing list