Mapserver-4.4.0-beta2 jpeg legend rendering problem

Frank Warmerdam warmerdam at POBOX.COM
Thu Nov 18 09:16:31 EST 2004


Lars Holm Loldrup wrote:
> Just found a new rendering problem i 4.4 beta2: Using imageformat jpeg, the
> legend text is distorted, but using png or gif it's fine.
>
> Se attached examples.
>
> The problem can be reproduced using the legend executable.
>
> Regards Lars Loldrup
>
>  <<legend_err.jpg>>  <<legend_ok.png>>

Lars,

I did some inspection of the two result files.  If I directly translate
the good png to JPEG I get essentially the same result you saw.  It looks
like the problem is that the partial edge pixels of the text are drawn in
pure black but with reduced alpha to get the antialiasing effect.
However, when an RGBA image is saved in JPEG the alpha is just discarded
and the text edge pixels come out pure black resulting in very blocky text.
In some cases it is nearly unreadable text.

This likely depends on particular combinations of rendering options.  Could
you submit a bugzilla report with a minimal .map file to demonstrate the
problem?  Also, you can add my previous paragraph and if you wish you can
assign it directly to me.

Also, in the report please note if there is a previous version of the
software where the same test case seems to work properly.

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-dev mailing list