[mapserver-users] Use of palette file: Problems with changingcolors when tiling
Stephen Woodbridge
woodbri at swoodbridge.com
Thu Oct 29 07:24:50 PDT 2009
The correct usage of the palette file is to NOT fill it up with 256
colors. What you want to do it get all the colors that you explicitly
reference in the mapfile and place them in the palette file. then
mapserver will initiate you file with these colors. Then when you
antialias something mapserver will use the remain color slots and fill
them with the antialiased generated colors.
-Steve W
Espen Isaksen wrote:
> No, that color is not present in the mapfile or in the palette.txt
> file. We use the color 108 189 243 on lakes.
>
> This is happening on other features(with other colors) for us as well.
>
> I did test to fill up the palette file with the same colors more than
> one time in order to get 256 colers in the file and that actually
> fixed the problem. However, it created all other kind of problems with
> the colors, especially with anti-aliasing on labels.
>
> Espen
>
>
>
> 2009/10/28 Steve Lime <Steve.Lime at dnr.state.mn.us>:
>> Is the color 125,202,228 (the water value in the image on the left) used in your mapfile?
>>
>>>>> On 10/28/2009 at 5:25 AM, in message
>> <a4cd3760910280325l4c4a1feah93782aeb259462d2 at mail.gmail.com>, Espen Isaksen
>> <espen.isaksen at gmail.com> wrote:
>>> Hi!
>>>
>>> We are testing out using a palette file in our outputformat to
>>> decrease file size in the png output. Most of the time this works
>>> great, but some times when we are tiling the data we get some errors.
>>> The color seem to shift to a similar color from one tile to another.
>>>
>>> We have added the colors we use in the map file in the palette.txt
>>> file. The documentation says it needs 256 colors in the map file, but
>>> we do not use that many colors right now. (we tried adding the same
>>> color more than one time, but that created other problems....)
>>>
>>> I have attached a png file showing the problem across a lake. The
>>> color on the right side is the correct color and the color we have
>>> added to the palette file. The color on the left side of the lake is
>>> not something we have set.
>>>
>>> I have also added the palette.txt file and the outputformat we use is this:
>>>
>>> OUTPUTFORMAT
>>> NAME "png"
>>> DRIVER "AGG/PNG"
>>> MIMETYPE "image/png"
>>> IMAGEMODE "rgb"
>>> EXTENSION "png"
>>> FORMATOPTION "PALETTE_FORCE=TRUE"
>>> FORMATOPTION "PALETTE=/data/maps/palette.txt"
>>> END
>>>
>>> Does anybody know why this happens in Mapserver and how to fix it?
>>>
>>> Espen
>>
> _______________________________________________
> 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