[Mapserver-users] JPEG and IMAGETYPE with mapserver 3.6.3
Frank Warmerdam
warmerdam at pobox.com
Thu Feb 20 11:52:57 PST 2003
fx gamoy wrote:
> hello
>
> i have tested the property IMAGEQUALITY with jpeg output and i can't see
> any difference between two extrems values of this property.
> i have also tried to force it using mapscript $map->set(imagequality,25)
> and $map->set(imagequality,100) and the output file (jpeg) is the same.
> is it a known bug?
Hi,
There are a few issues here. In response to your email I investigated the
handling of the IMAGEQUALITY keyword in MapServer 3.7. It turns out setting
the IMAGEQUALITY keyword was *not* having the desired effect. I have fixed
this - for static map files.
However, there is also the issues that the preferred way of setting your
jpeg image quality in 3.7 is to set a FORMATOPTION "QUALITY=n" line in the
OUTPUTFORMAT declaration you are using.
eg.
OUTPUTFORMAT
NAME jpeg24
DRIVER "GD/JPEG"
IMAGEMODE RGB
TRANSPARENT OFF
FORMATOPTION "QUALITY=25"
END
Internally the working output format has the image quality set if the
IMAGEQUALITY keyword is found in the map file, but I am not convinced that
the same logic will take effect if you dynamically change the image quality
value in a map from MapScript. If possible, I would suggest you manipulate
the format options for the OUTPUTFORMAT directly.
I would give more detail but I don't use any of the MapScript environments
currently so it is hard for me to test how things work for them.
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 | Geospatial Programmer for Rent
More information about the MapServer-users
mailing list