[gdal-dev] MapServer's image quality stinks serving up these NOAA NRCs

Vincent Schut schut at sarvision.nl
Mon Apr 21 04:19:54 EDT 2008


Frank Warmerdam wrote:
> Gregor Mosheh wrote:

 >> * Color depth: gdalwarp on the KAPs generates 8-bit palleted TIFFs. 
 >> That may not be the best for quality.

^^This point might be your main issue.
As Frank mentioned it's a bit hard for us to guess about the source of 
your problem without actually seeing those images, but my first guess 
would be: don't use palette images, use rgb or rgba. You can control 
this with a mapserver output file format parameter, ('OUTPUTTYPE'? don't 
know anymore exactly what it's called, but it should state that you want 
something like PNG24 (24bit png's) or the like, not png8 or gif or 
whatever image that uses colortables/palettes internally). Otherwise, 
mapserver will semi-intelligently (read: bluntly) map your nice rgb 
input colors to some more-or-less fitting palette, thus greatly reducing 
output image quality (but also reducing file size, thus image loading 
times). If your output map is tiled (which it usually is if you use an 
interface like OpenLayers), mapserver will even use different palettes 
for each tile, which will make the overall output image look even 
stranger. So I'd say: first make sure you have mapserver to output rgb 
images, like jpg or 24bit png's. If image quality is still crap then, 
come back and call again :-)

Good luck!
Vincent.


More information about the gdal-dev mailing list