[mapserver-users] Mapserver rendering with 24 bit colour

Thomas Bonfort thomas.bonfort at camptocamp.com
Wed May 6 01:31:06 EDT 2009


If your mapserver is compiled with --enable-experimental-png, you can
change QUANTIZE_FORCE to QUANTIZE_NEW to use a slower but higher
quality quantization algorithm that usually fixes these problems.

best regards,

thomas

www.camptocamp.com
+33 4 79 26 57 97



On Wed, May 6, 2009 at 05:52, David Nugent <davidn at datalinktech.com.au> wrote:
> Greetings all,
> Once I completed upgrading to mapserver 5.4, I decided I'd give the new AGG
> renderer a try.
> To date I have been using the GD renderer in 8 bit color mode.
> One problem I had with it the renderer, and my main motivation to use the
> AGG renderer (apart from what appears to be an overall improvement in
> appearance) was that any layer containing "ANGLE FOLLOW" within a class
> label definition caused php/mapscript to crash rendering meta tiles (for
> ka-map, if that matters). The AGG renderer solved that problem immediately
> and it works flawlessly in that respect.
> However, as a by-product of changing renderer, the metatiles produced by
> mapserver differ slightly in colour. Some agree exactly to the RBG colours I
> am providing, others are rendered with slight variations, and when viewed on
> the web it becomes fairly obvious where the meta tile borders are.
> I have tried both
>   OUTPUTFORMAT
>     NAME                'AGG_Q'
>     DRIVER              AGG/PNG
>     IMAGEMODE       RGB
>     FORMATOPTION  "QUANTIZE_FORCE=ON"
>     FORMATOPTION  "QUANTIZE_DITHER=OFF"
>     FORMATOPTION  "QUANTIZE_COLORS=256"
>   END
> and
>   OUTPUTFORMAT
>     NAME            'AGG'
>     DRIVER          AGG/PNG
>     IMAGEMODE  RGB
>   END
> but both produce the same results.  I have even tried fiddling with the
> FORMATOPTIONs in the AGG_Q block to no effect.
> I've double-checked the mapscript used to render the tiles to make sure that
> the correct output format is being selected.
> Is there a known solution to this? How can I force all tiles produced to use
> the exact same colour settings?  I would have thought the quantize option
> would resove it, although obviously this would have a slight detrimental
> side-effect for anti-aliasing.
> My map file does include various "ANTIALIAS" options (which the document
> states are ignored in AGG mode) so I can fall back to GD rendering should I
> ever get "ANGLE FOLLOW" working again.
> Regards,
> --
> David Nugent (davidn at datalinktech.com.au)
> Software Engineer
> datalink technologies pty ltd
> Mobile GPS/GPRS business process solutions
> http://www.datalinktech.com.au/
>
> _______________________________________________
> 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