Color shifts using QUANTIZE_COLORS=256
Stephen Woodbridge
woodbri at SWOODBRIDGE.COM
Mon Dec 3 12:15:38 PST 2007
Rich,
Right! Sorry, I wasn't more explicit on that point. The way I have used
it is to create the file by grep COLOR mymapfile.map and edit that into
the palette files. this way the primary colors defined in my mapfile are
preallocated, so those do not shift. Then the rest of the color slots
are filled with the antialiased colors. There is probably a better way
of doing this so that the free slots are allocated across all the colors
based on some N number of slots per color, but we don't have a way to do
that yet. So the free slots are used on a first come, fist used basis.
-Steve W
rich.fromm wrote:
> Stephen Woodbridge wrote:
>> Try using something liek this:
>>
>> OUTPUTFORMAT
>> NAME "agg/png24"
>> MIMETYPE "image/png; mode=24bit"
>> DRIVER "AGG/PNG"
>> EXTENSION "png"
>> FORMATOPTION "PALETTE_FORCE=TRUE"
>> FORMATOPTION "PALETTE=/u/data/maps/palette-google-agg.txt"
>> END
>>
>> where /u/data/maps/palette-google-agg.txt has something like this in it.
>> Obviously pick the colors that you want to quantize to:
>>
>
> I was worried that that would mean that I would have to by hand pick ALL of
> the colors, which, given antialiasing isn't really what I want. I want to
> specify that the reasonably small set of colors I specify in the map file
> get rendered precisely, and that's all I want to specify. I'm happy (and
> prefer) to have the "in between" colors chosen by antialiasing get chosen
> automatically, and they don't have to be so precise.
>
> Just to clarify for someone reading this message in the future, that is
> exactly how it seems to work. So all is well.
>
> - Rich
>
More information about the MapServer-users
mailing list