2010/12/10 Cédric MOULLET <cedric.moul...@gmail.com>:
> Hi,
> We are using MapServer to generate tiles and the following ouptut format is
> used:
>
> OUTPUTFORMAT
>  NAME "pnga"
>  MIMETYPE "image/pnga"
>  DRIVER "AGG/PNG"
>  EXTENSION "png"
>  IMAGEMODE "RGBA"
>  TRANSPARENT TRUE
>  FORMATOPTION "INTERLACE=OFF"
> END
>
> We observe that the size of the tiles can be reduced by a at least factor 2
> if we use a tool like optipng.
> Is it possible to configure MapServer in order to optimize the file output
> (and for example use optipng)  ? Or do you see another way to optimize the
> image (I'd like to do that on the MapServer side in order to avoid a
> postprocessing) ?
> Thanks in advance for any hints.
> Cédric

Hi Cedric,
when You compile Your Mapserver with "–with-experimental-png" option
You can have very nice quantized PNG images, which can be much more
smaller. We are using this option for all our projects for few years
now.

Configuration example:

        IMAGETYPE 'AGG_PNG'
        OUTPUTFORMAT
                NAME 'AGG_PNG'
                DRIVER 'AGG/PNG'
                MIMETYPE 'image/png'
                IMAGEMODE RGBA
                FORMATOPTION 'QUANTIZE_FORCE=ON'
                FORMATOPTION 'QUANTIZE_DITHER=OFF'
                FORMATOPTION 'QUANTIZE_COLORS=256'
                FORMATOPTION 'INTERLACE=OFF'
                EXTENSION 'png'
        END

More here: http://mapserver.org/mapfile/outputformat.html

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

Reply via email to