AW: [UMN_MAPSERVER-USERS] Transparent raster layer
Frank Warmerdam
warmerdam at POBOX.COM
Thu Aug 31 07:40:44 PDT 2006
Pleyer, Walter wrote:
>
> Thanks, Flavio!
>
> The TRANSPARENCY Parameter worked - kind of.
> Now when I set the TRANSPARENCY parameter of the layer object to varying
> values, the resulting image gets paler or less pale, but unfortunately
> not transparent in the sense, that I see the underlying image through.
> Do you have any ideas, hints?
Walter,
Are you wanting to return an image from mapserver where the final
image includes alpha type transparency? What is your output format?
I suspect you will need custom OUTPUTFORMAT declaration indicating a
32bit RGBA PNG output format if you want partial raster transparency.
I'd encourage you to read up on the OUTPUTFORMAT declaration, but something
like this at the MAP level might work.
IMAGETYPE png32
OUTPUTFORMAT
NAME png32
DRIVER "GDAL/PNG"
IMAGEMODE RGBA
TRANSPARENT ON
END
Good luck,
>> Example:
>>
>> LAYER
>> NAME "Switzerland Relief"
>> MINSCALE 100000
>> TYPE RASTER
>> TRANSPARENCY 50
>> STATUS ON
>> DATA "Relief.tif"
>> PROCESSING "RESAMPLE=AVERAGE"
>> PROJECTION
>> "init=world:CH1903"
>> END
>> END
>
>
--
---------------------------------------+--------------------------------------
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 | President OSGeo, http://osgeo.org
More information about the MapServer-users
mailing list