[mapserver-users] OFFSITE for RGB images with GDAL

Frank Warmerdam warmerdam at pobox.com
Mon Apr 15 16:14:35 EDT 2002


Simpson, Andrew wrote:
> What value should be used for the OFFSITE parameter when displaying 
> 24bit RGB images?
> 
>  
> 
> 0,0,0 is the color I would like to make transparent.
> 

Andrew,

Unfortunately, it does not currently appear to be possible to utilize the
OFFSITE capability with RGB (24bit) GDAL images in MapServer.  However, the
GDAL code does support alpha bands, so if you can produce PNG or TIFF files
with an Alpha layer, and set the alpha to 0 for areas you want to be
transparent, and if you ensure the files are treated by GDAL (not the builtin
PNG or TIFF drivers) then you can get transparency.

Of course, if you are bold you can easily hack the inner RGB loop to do what
you want in drawGDAL() in mapraster.c.

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





More information about the mapserver-users mailing list