Fw: [Mapserver-users] transparent background raster (tif)

Frank Warmerdam warmerdam@pobox.com
Tue, 27 May 2003 15:30:30 -0400


Rosangela Silva wrote:
>  Hi,
>  My images are 8-bit TIFF, and they are peaces of sattelite
>  images (Landsat - RGB composit).
>  Part of these images has valid information,
>  but another part is complemented with deep black color.
>  I think that I couldn't specify a black collor pixel (0)
>  like "transparent" because some lakes and rivers are black too.
>  I'd like to show only the valid information.
>  I'll try to send a tiff like an example.
>  Thanks
>  Rosāngela

Rosāngela,

Your image has exactly 0,0,0 for large areas, but some of the southern areas
are not exactly black.  With MapServer 3.7 (err 4.0?) you could set an OFFSITE
value of 0,0,0 and all the exactly black areas would be transparent.  However
if you want to mask all water areas as transparent you would need to do
something else.

Generally speaking, at that point you should take the image to some sort
of image processing software to mask and convert to a more suitable form to
display in mapserver.  You could use GRASS, or some commercial software,
or even write a Python script on GDAL to do the processing.

Best regards,

-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent


_______________________________________________
Mapserver-users mailing list
Mapserver-users@lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users