I am not sure if is it possible to reduce AGG PNG image to 8bit by 
"PALETTE_FORCE=TRUE" option and keep transparent background.
I went through all posts about this issue and it is not clear for me if I still 
need to compile mapserver with "--with-experimental-png" switch or it is 
currently not possible.

I have tested all possible parameters and combinations of RGB or RGBA in  
OUTPUTFORMAT and palette file with BLACK BACKGROUND as result.

/usr/lib/cgi-bin/mapserv -v
MapServer version 5.2.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP 
OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV 
SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT 
SUPPORTS=WCS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS INPUT=EPPL7 
INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE

I use mapserver as WMS server.

Currently I have this in mapfile:
        
        NTERLACE OFF
        TRANSPARENT TRUE
        IMAGETYPE AGG8
         OUTPUTFORMAT
                NAME "AGG8"
                DRIVER "AGG/PNG"
                MIMETYPE "image/png"
                EXTENSION "png"
                IMAGEMODE "RGBA" - #(IMAGEMODE "RGB" is working, nice result 
without transparent background)
                FORMATOPTION  INTERLACE=OFF
                FORMATOPTION "PALETTE_FORCE=TRUE"
                FORMATOPTION "PALETTE=/s/agg_8bit_pal.txt"
        END

And palette file:
        
        0,0,0
        255,255,255,255
        230,230,230,0
        174,17,52,255
        174,17,52,255
        242,221,190,255

Please, can anybody clarify this?
Thanks 
Ivan


_______________________________________________
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to