[mapguide-internals] RFC60 - PNG8 color palette improvements
please comment
Bruce Dechant
bruce.dechant at autodesk.com
Mon Mar 2 14:52:20 EST 2009
Uv,
This is a great idea for improving the quality of the base maps.
As Jason suggested having the color palette information defined in the map definition is nice. Ideally, a NEW ColorPalette resource could be added and then referenced by the Map Definition resource. This would allow them to be reused across multiple maps if needed and allow for quick editing/modifying by only having to adjust one palette that may apply to several maps.
As for which memory caching strategy to use I would suggest you make this configurable as it is very easy to add one and access it:
You could add a NEW property to the serverconfig.ini file under the [TileServiceProperties] section, ex: ColorPaletteCachingStrategy
The code below is some sample code for reading this setting from the ini file.
MgConfiguration* configuration = MgConfiguration::GetInstance();
configuration->GetIntValue(
MgConfigProperties::TileServicePropertiesSection,
MgConfigProperties::TileServicePropertyColorPaletteCachingStrategy,
colorPaletteCachingStrategy,
MgConfigProperties::DefaultTileServicePropertyColorPaletteCachingStrategy);
The above would give the most flexibility in fine tuning the caching for the color palettes without actually requiring much more coding effort.
Thanks,
Bruce
-----Original Message-----
From: mapguide-internals-bounces at lists.osgeo.org [mailto:mapguide-internals-bounces at lists.osgeo.org] On Behalf Of UV
Sent: Sunday, March 01, 2009 6:59 PM
To: MapGuide Internals Mail List
Subject: [mapguide-internals] RFC60 - PNG8 color palette improvements please comment
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