[mapserver-users] MS 6.0 beta6 and faulty image/png; mode=8bit output if source image has overviews

thomas bonfort thomas.bonfort at gmail.com
Tue Apr 19 03:39:26 EDT 2011


please test with trunk and report back if you're still having the
error: http://trac.osgeo.org/mapserver/ticket/3848

--
thomas

On Tue, Apr 19, 2011 at 09:32, Erik Gustafson <gustafson.erik at gmail.com> wrote:
>> On Mon, Apr 18, 2011 at 10:18, Rahkonen Jukka <Jukka.Rahkonen at mmmtike.fi> wrote:
>>> Hi,
>>>
>>> I am sometimes getting images with totally odd colours with MS 6.0 beta 6
>>> (and the previous beta versions) with format image/png; mode=8bit.  I have
>>> been doing some testing and I believe I can now reproduce the error.
>>>
>>> The error happens only if the raster image has overviews. If I delete or
>>> rename the external .ovr file the 8bit png output is correct at any scales.
>>> To be sure that there is nothing odd with the overview file I recreated it
>>> with FWTools v. 2.4.2 by using a basic command
>>> gdaladdo -r average -ro suomi1m.tif 2 4 8
>>>
> [snip]
>>>
>>> My conclusion is that exectly MS 6.0 version is creating at some scales
>>> through ADD driver an 8 bit png output with messed up colours, but it
>>> happens only if the source image has overviews.
>>>
>>> If someone is interested in having a look at this I can prepare and send my
>>> mapfile and some imagery to play with.
>>>
>>> -Jukka Rahkonen-
>
>
> Hello, I have a similar problem on vector data, possibly related.
> The color problem appears when quantize is enabled and a large amount
> if data is rendered. I can trigger the bug with mapfile below:
>
> MAP
>   OUTPUTFORMAT
>       NAME "png"
>       DRIVER "agg/png"
>       FORMATOPTION QUANTIZE_FORCE=on
>   END
>   LAYER
>       NAME corine
>       DATA "corine"
>       TYPE polygon
>       CLASS
>           NAME ALL2
>           EXPRESSION ([area_ha] < 1000)
>           STYLE
>               COLOR 0 0 255
>           END
>       END
>       CLASS
>           NAME ALL
>           EXPRESSION ([area_ha] < 1500)
>           STYLE
>               COLOR 255 0 0
>           END
>       END
>       CLASS
>           NAME ALL
> #EXPRESSION ([area_ha] < 1500)
>           STYLE
>               COLOR 0 255 0
>           END
>       END
>   END
> END
> ~
> To trigger the bug I need at least two classes with different colors.
> If I use a single color or if I render only a subset of the data the
> colors look good. I do not have a test case yet as the data used is
> not free. I will try to create one but it might take a few days. Just
> writing this to note that problem may not be related to the overviews
> but the quantizing itself.
>
> Another note: If I add and OUTLINECOLOR and WIDTH=1 in the style
> definition the problem seems heal the bug, I guess thats because fewer
> antialiasing colors are generated.
>
> No problem with this mapfile on Mapserver 5.6.
>
>  /Erik
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>


More information about the mapserver-users mailing list