[mapserver-users] Mapping a raster colour to Transparent

Frank Warmerdam warmerdam at pobox.com
Thu Nov 21 12:53:29 PST 2002


Tweedy, Scott wrote:
> Is there any way to use MapServer to map a specific colour value in an input
> file to end up being transparent in the output PNG or GIF?
> 
> What I am trying to do is take all the pixel values of "white" from an input
> TIFF image and map those values so that they are transparent when they are
> viewed in a mapping application.
> 
> If anyone knows if this is possible, or how to do it, I would appreciate it
> very much.

Scott,

If the input file is RGB (24bit) then I think this is only supported in 3.7
where you would say "OFFSITE red_value green_value blue_value".  If it is a
pseudo-colored or greyscale file then you can use "OFFSITE n".

Good luck,
-- 
---------------------------------------+--------------------------------------
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





More information about the MapServer-users mailing list