[mapserver-users] question about TRANSPARENT ON

Richard Greenwood richard.greenwood at gmail.com
Fri Oct 16 17:45:55 EDT 2009


Thanks Stephen, I tried with and w/o the "=", but no joy.

Daniel - thanks for your suggestion to use the AGG RGBA mode, but
still no luck there either.

Varun - thanks for the reply, but opacity isn't exactly what I'm
after. That effects everything in the layer, I just want a transparent
background.

It seems like my OUTPUTFORMAT is being ignored. I have it just at the
MAP level, not within the WEB section or within a LAYER definition,
which I believe to be correct. I am using this layer to highlight
selected features in an OpenLayers interface. So it lies above another
(background) layer and needs to be transparent so that the background
layer is visible. I'm pretty confident that I'm getting a PNG image,
because that's what FireFox tells me. I'm using MODE=MAP, but I also
tried MODE=BROWSE and saved the images and examined them in Photoshop.
When I set  TRANSPARENT ON  in the MAP section of my map file I get
what I want - a PNG in which the background is transparent, but when I
set FORMATOPTION "TRANSPARENT=ON" in an OUTPUTFORMAT  definition, I
get a PHG with a non-transparent white background.

Thanks for all of your replies,
Rich



On Fri, Oct 16, 2009 at 3:17 PM, Stephen Woodbridge
<woodbri at swoodbridge.com> wrote:
> Richard,
>
> Try:
>
> FORMATOPTION "TRANSPARENT=ON"
>
> -Steve W
>
> Richard Greenwood wrote:
>>
>> I have been using  TRANSPARENT ON  in the MAP section of my map file,
>> but the documentation says that is deprecated and to use the
>> FORMATOPTION. I'm trying to do this, but not getting transparent
>> images back. I am creating PNG images with MapServer 5.4.2. My output
>> format is as follows:
>>
>> OUTPUTFORMAT
>>        NAME png
>>        DRIVER "GD/PNG"
>>        MIMETYPE "image/png"
>>        IMAGEMODE PC256
>>        EXTENSION "png"
>>        FORMATOPTION "TRANSPARENT ON"
>> END
>>
>> What am I missing?
>>
>> Thanks,
>
>



-- 
Richard Greenwood
richard.greenwood at gmail.com
www.greenwoodmap.com


More information about the mapserver-users mailing list