[mapguide-internals] PNG8 color problems

Gabriele Monfardini gabrimonfa at gmail.com
Thu Feb 25 13:19:07 EST 2010

Hi all,

I'm using Mapguide 2.1 on Windows, with OGR Provider.

Using PNG format, output quality is very good but images are far too big.
Using JPG format, images are reasonably small but lines and small
symbols show some blocky artifacts.
Thus I'm playing with PNG8 that seems by far to be the best compromise.

How is PNG8 palette evaluated? Which color approximation algorithm is used?

In fact it appears that the same object changes its color depending on
the other colors on the scene.

For instance, turning on a blue point layer, gray objects become
bluish and dark pink areas became darker (see attached images, in the
same extent, with and without the point layer).
I don't think there are so many different colors on the original map
to justify such an evident color change when restricting to a fixed
size palette.

In my applications this change is not acceptable, since a lot of time
is spent in choosing correct colors and they are not allowed to vary
so much.
Moreover the visual effect is a little disturbing for users.

Is there any parameter that I can tune? Do you think this is a bug?


-------------- next part --------------
A non-text attachment was scrubbed...
Name: without_point_layer.png
Type: image/png
Size: 112248 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/mapguide-internals/attachments/20100225/cf1b606c/without_point_layer-0001.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: with_point_layer.png
Type: image/png
Size: 111224 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/mapguide-internals/attachments/20100225/cf1b606c/with_point_layer-0001.png

More information about the mapguide-internals mailing list