[mapserver-users] Mapserver rendering with 24 bit colour

David Nugent davidn at datalinktech.com.au
Tue May 5 20:52:32 PDT 2009


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/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20090506/c2a1669b/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20090506/c2a1669b/attachment.sig>


More information about the MapServer-users mailing list