[mapserver-users] wms outputformat image quality

Frank Warmerdam warmerdam at pobox.com
Sat Apr 12 17:20:58 EDT 2008


marta fuster wrote:
> Hi!
> 
> I have a problem with the quality of a wms image that I serve with my 
> mapserver application.
> 
> I have a mapfile with 4 layers, one of these one's is a wms layer that 
> serves aerial photographs. If  I don't change anything in the .map the 
> polygon layers look cool but the wms looks terrible, if I add:
> 
> OUTPUTFORMAT
>   NAME jpeg
>   DRIVER "GD/JPEG"
>   MIMETYPE "image/jpeg"
>   IMAGEMODE RGB
>   EXTENSION "jpg"
>    FORMATOPTION "QUALITY=100"
> END
> 
> the wms looks cool an the others look terrible. How can I do to solve 
> the problem?

Marta,

Not enough info here.  Were you previously producing JPEG or did you
also change something to actually use the above jpeg format for output?

If you were previously producing an 8bit paletted format (gif or PNG8)
then file sizes would be small, and drawn lines would be sharp, but
24bit RGB raster inputs will generally be badly damaged in the conversion
to 8bit.  Producing jpeg instead will solve the raster problem but cause
all sorts of damage to lines/text.

PNG24 will do both well, but the resulting maps will be quite large.

Basically you need to pick your poison.  You can have any two of small,
good 24bit raster results or good line/text quality.

You might want to read over the raster access howto for some suggestions
on improving raster quality in 8bit paletted formats (dithering for instance).

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org



More information about the mapserver-users mailing list