[MAPSERVER-USERS] help! agg palette quantize algorithm imperfection
BrainDrain
paulborodaev at gmail.com
Fri Jun 6 06:41:12 PDT 2008
Thanks, i already read about preparing palette index file & I see 2
obstacles:
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?
pagameba wrote:
>
> Use:
>
> OUTPUTFORMAT
> OUTPUTFORMAT
> 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"
> END
>
> where palette.txt is a text file with RGB tuples in the form:
>
> RRR,GGG,BBB
>
> For example:
>
> 0,0,0
> 255,255,255
> 127,127,127
>
> 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.
>
> Cheers
>
> Paul
>
> On 6-Jun-08, at 7:53 AM, BrainDrain wrote:
>
>>
>> I use this output format in my map file:
>> OUTPUTFORMAT
>> 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"
>> END
>> but every time map draw called (or map image requested fom cgi
>> mapserv.exe)
>> polygons has a little difference in fill color (I think this is
>> because
>> color palette recalculated slightly different each time). This is
>> unacceptable for me. How can i correct this? (maybe some
>> FORMATOPTION?)
>> --
>> View this message in context:
>> http://www.nabble.com/help%21-agg-palette-quantize-algorithm-imperfection-tp17667733p17667733.html
>> Sent from the Mapserver - User mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> mapserver-users mailing list
>> mapserver-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>
> __________________________________________
>
> Paul Spencer
> Chief Technology Officer
> DM Solutions Group Inc
> http://www.dmsolutions.ca/
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>
--
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
mailing list