[mapserver-dev] OUTPUTFORMAT with AGG and IMAGEMODE PC256?

Daniel Morissette dmorissette at mapgears.com
Tue Aug 12 10:39:19 EDT 2008


Dev's,

Is there a way that we could allow the use of IMAGETYPE PC256 with the 
AGG/PNG driver, in the interest of reducing the size of the output 
images? i.e. an OUTPUTFORMAT like this:

OUTPUTFORMAT
     NAME                  "png"
     DRIVER                "AGG/PNG"
     MIMETYPE              "image/png"
     IMAGEMODE             "PC256"
     EXTENSION             "png"
     FORMATOPTION          "PALETTE_FORCE=TRUE"
     FORMATOPTION          "PALETTE=/path/to/palette.txt"
     FORMATOPTION          "INTERLACE=OFF"
END

I realize that AGG requires RGB buffers internally to do its 
antialiasing, but could we not post-process the image to convert it from 
the internal RGB representation to PC256 before generating the output? 
With a very simple test that I made, producing the same (very simple) 
map in PC256 mode instead of RGB makes it pass from 38kb to 5kb... that 
is quite a gain, well worth the extra CPU time.

Or is this possible already and if yes what is the OUTPUTFORMAT 
definition to use?

Thanks

Daniel
-- 
Daniel Morissette
http://www.mapgears.com/


More information about the mapserver-dev mailing list