[mapserver-users] How to get transparent image on 6.0.1

Janeks Kamerovskis janeks.kamerovskis at silvita.lv
Fri Nov 4 02:58:40 PDT 2011


Not so simple - I had to use also
FORMATOPTION "QUANTIZE_FORCE=ON"
But now I do not like the rendered result it is far from GIF result:
PNG

GIF

Fragments of my map file:

             LABEL
                 SIZE 12
                 TYPE TRUETYPE
                 FONT rimgaram
                 COLOR 0 0 0
                 OFFSET 3 3
                 POSITION cr
                 STYLE
                     GEOMTRANSFORM labelpoly
                     SIZE 12
                     ANTIALIAS true
                     BACKGROUNDCOLOR 241 251 143
                 END
             END

     OUTPUTFORMAT
         NAME "png"
         DRIVER AGG/PNG
         MIMETYPE "image/png"
         IMAGEMODE RGBA
         EXTENSION "png"
         FORMATOPTION "GAMMA=0.75"
         FORMATOPTION "INTERLACE=true"
         FORMATOPTION "QUANTIZE_NEW=ON"
         FORMATOPTION "QUANTIZE_FORCE=ON"
         FORMATOPTION "QUANTIZE_DITHER=ON"
         FORMATOPTION "QUANTIZE_COLORS=256"
         FORMATOPTION "TRANSPARENT=ON"
         TRANSPARENT ON
     END

What is still wrong in my OUTPUTFORMAT definition?

Thanks in advance,
Janeks

On 2011.11.04. 11:06, Janeks Kamerovskis wrote:
> I had to add:
> FORMATOPTION "TRANSPARENT=ON"
> into OUTPUTFORMAT definition.
>
> brgds
> Janeks
>
> On 2011.11.03. 16:00, thomas bonfort wrote:
>> Either your asp page is selecting the wrong (i.e. a non-transparent)
>> imagetype, or you have a layer that is drawn ontop of the transparent
>> background, thus making the final image non transparent. The
>> outputformat you have shown is correct and produces trasnparent
>> images.
>>
>> -- 
>> thomas
>>
>> On Thu, Nov 3, 2011 at 14:46, Janeks Kamerovskis
>> <janeks.kamerovskis at silvita.lv>  wrote:
>>> Hi,
>>>
>>> I recently moved to 6.0.1, but stumped to getting transparent image.
>>>
>>> I used following syntaxis in my map file:
>>>
>>>     IMAGECOLOR 255 255 255
>>>
>>>     OUTPUTFORMAT
>>>         NAME "png"
>>>         DRIVER AGG/PNG
>>>         MIMETYPE "image/png"
>>>         IMAGEMODE RGBA
>>>         EXTENSION "png"
>>>         FORMATOPTION "GAMMA=0.75"
>>>         TRANSPARENT ON
>>>     END
>>>
>>>     IMAGETYPE png
>>>
>>> But my request is still getting nontransparent image:
>>> http://10.162.129.14/MapApp/wms_rs.asp?LAYERS=rs&TRANSPARENT=true&FORMAT=image%2Fpng&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&SRS=EPSG%3A25884&BBOX=166509.5,6040766.7857144,908910.5,6571053.2142856&WIDTH=1050&HEIGHT=750 
>>>
>>>
>>> What could be wrong?
>>>
>>> brgds&  thanks in advance
>>> Janeks
>>> _______________________________________________
>>> mapserver-users mailing list
>>> mapserver-users at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>>
>>
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>




More information about the MapServer-users mailing list