[Mapserver-users] colouring problems when serving 24 bit rasters in 8 bit output mode

Bart van den Eijnden bartvde at xs4all.nl
Sat May 29 10:10:27 EDT 2004


Hi list,

for anybody wanting to serve 24 bit rasters and not wanting to use 24 bit 
output in Mapserver, it is possible that by default the colours will 
change. I had this problem and in an e-mail from December 2003 Frank 
Warmerdam suggested it might be possible to trick Mapserver into using the 
most common colours in your raster by using a dummy layer with as many 
CLASS objects as colours needed.

Frank has now looked into this in more detail, and it seems this option is 
not possible.

So it is best practice for everybody in the same situation to preprocess 
their rasters to 8 bit mode. Their is a great utility available for this 
in GDAL called rgb2pct.py (you can e.g. download it with OpenEV_FW).

For anybody wanting to read the full bug report with all the information 
in it, see:

http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=684

Thanks again Frank!

Best regards,
Bart



More information about the mapserver-users mailing list