[mapserver-users] MS 6.0 beta6 and faulty image/png; mode=8bit output if source image has overviews

Erik Gustafson gustafson.erik at gmail.com
Tue Apr 19 05:01:17 EDT 2011


On Tue, Apr 19, 2011 at 10:51 AM, thomas bonfort
<thomas.bonfort at gmail.com> wrote:
> ok, I see where the issue is arising from: in 5.x you were using gd's
> quantization algorithm, which to put it frankly, sucked badly (i.e.
> note the duplicate entries in the color table which are a waste of
> quality).
> the current quantization algorithm is much higher quality, and thus
> produces heavier images. If you want to return to something like GD,
> try lowering the number of colors , e.g. QUANTIZE_COLORS=64 . Although
> I'm not sure if by doing that the zlib compression will be able to
> squeeze the final size down. As before, please post back your findings
> if you try!

With quantize_colors 64 the size is reduced to 101kb, with 32 colors
the size is 87kb and the quality i still good.
I think this should be mentioned in migration.txt! Also, the
documentation for 5.6 says
http://mapserver.org/mapfile/outputformat.html:
“QUANTIZE_COLORS=256” used to specify the number of colors to be used
when applying quantization. Maximum value is 256. Specifying anything
between 17 and 255 is probably a waste of quality as each pixel is
still encoded with a full byte. Specifying a value under 16 will
produce tiny images, but severly degraded.

I think it will be hard to specify good values for quantize_colors as
this is really dependent of the scale used (thinking WMS). An
enhancement for Mapserver 6.1 would be some sort of auto tuning?

Thanks for the support!

 /Erik


More information about the mapserver-users mailing list