[MAPSERVER-USERS] help! agg palette quantize algorithm
paulborodaev at gmail.com
Fri Jun 6 09:41:12 EDT 2008
Thanks, i already read about preparing palette index file & I see 2
1) I need to monitor my map file (big size) to keep relevant my palette
file. It is inflexible to extract rgb colors used in pixmap symbols
(hundreds, updatable). Can I use html palette for ex. (or any other
'universal' palette) - to make this process not so time-consuming?
2) If I have strict palette, can I be sure that agg renderer will always use
the nearest(?) color from my palette?
> NAME "AGG_Q"
> DRIVER "AGG/PNG"
> MIMETYPE "image/png; mode=8bit"
> IMAGEMODE RGB
> EXTENSION "png"
> FORMATOPTION "PALETTE_FORCE=TRUE"
> FORMATOPTION "PALETTE=/path/to/palette.txt"
> where palette.txt is a text file with RGB tuples in the form:
> For example:
> MapServer will use AGG 24 bit rendering but reduce the output file to
> 8 bit and reserve the colours in your palette.txt file. This will
> give you consistent colours for the ones you care about.
> Specifically, you should reserve all the colours that you actually
> reference in your map file plus any colours of pixmap symbols. Don't
> put in more colours than you actually need to because MapServer needs
> to use whatever space is left (255 less your colours) for antialiasing.
> On 6-Jun-08, at 7:53 AM, BrainDrain wrote:
>> I use this output format in my map file:
>> NAME "AGG_Q"
>> DRIVER "AGG/PNG"
>> MIMETYPE "image/png; mode=8bit"
>> IMAGEMODE RGB
>> EXTENSION "png"
>> FORMATOPTION "QUANTIZE_FORCE=ON"
>> FORMATOPTION "QUANTIZE_DITHER=OFF"
>> FORMATOPTION "QUANTIZE_COLORS=256"
>> but every time map draw called (or map image requested fom cgi
>> polygons has a little difference in fill color (I think this is
>> color palette recalculated slightly different each time). This is
>> unacceptable for me. How can i correct this? (maybe some
>> View this message in context:
>> Sent from the Mapserver - User mailing list archive at Nabble.com.
>> mapserver-users mailing list
>> mapserver-users at lists.osgeo.org
> Paul Spencer
> Chief Technology Officer
> DM Solutions Group Inc
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
View this message in context: http://www.nabble.com/help%21-agg-palette-quantize-algorithm-imperfection-tp17667733p17692463.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
More information about the mapserver-users