[mapguide-internals] RFC60 - PNG8 color palette improvements pleasecomment

Jason Birch Jason.Birch at nanaimo.ca
Sun Mar 1 22:37:05 EST 2009


Hi UV,
 
I'm not a graphics guru, but I have a few comments:
 
I really think that this work should be preceded by moving the definition of the tile / base layer image format out of the serverconfig.ini file and into the MapDefinition.  One size definitely does not fit all here.
 
The palette to use should be defined at the base map scale range level, not at the map level.  It's quite possible that maps will use signifigantly different colour palettes at different scale ranges; look at Google Maps.
 
There should be an option for the user to hard-code the palette by attaching a PNG via resource data and reference it somewhere in the base map definition's extended data XML.
 
I don't think that parsing the layer definitions for colours is going to be adequate.  Both antialiasing and transparency will lead to situations where important colours are not explicitly defined in the layer definitions.  I believe that in production scenarios, it will be worthwhile to have a way of seeding the entire scale range at PNG24 and then analyzing the resulting images to generate an optimal 8 bit palette (and then attaching that to the map resource).
 
Jason

________________________________

From: mapguide-internals-bounces at lists.osgeo.org on behalf of UV
Sent: Sun 2009-03-01 5:59 PM
To: MapGuide Internals Mail List
Subject: [mapguide-internals] RFC60 - PNG8 color palette improvements pleasecomment



Hello,

there is RFC60 place in the list and needs some commenting.
Currently, we are looking into a serverconfig.ini parameter
UseColorPalette in the TileServiceSection.
upon init of the tile cache this parses the map definition and produces
a palette with the map colors.
Those are then used in some 100 extra line of C code in AGGImageIo.cpp
to force those colors in
the map used for the PNG8 created from the truecolor tile passed in by
the rendering service.

1- which memory strategy is recommended for the color quantization? (3
options in the RFC (stack, fast heap, efficient heap))
2 - is the ServerTileService the right place to put the code to collect
the map colors?
3 - any suggestions regarding the naming and location of the color
palette within the map definition?

Comments are welcome!
Also a few guiding remarks concerning the integration of the
configuration code would make extremely helpful
as just knowing where to start looking saves day of wasted code studies.
These things are missing in the architecture
docs so far.

This is work in progress as there is a sponsor for it.
Thanks for your support.
UV

_______________________________________________
mapguide-internals mailing list
mapguide-internals at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-internals




More information about the mapguide-internals mailing list