[MAPSERVER-USERS] BUFFER does not work and color degradation problems

rich.fromm nospam420 at yahoo.com
Mon Mar 10 15:31:56 PDT 2008



JayDub wrote:
> 
> Also, my map suffers from color degredation for some of the icons (overlay
> symbols)? What kind of precautions do I need to take to prevent color
> degradation of my symbols?
> 

For future reference, it's probably better to ask two separate questions in
two separate mail messages.

Anyway, by color degradation, if you mean that some of the colors that you
specify in the map file are not precisely the same as the output colors,
this
can be solved via something like the following:

    OUTPUTFORMAT
        NAME 'AGG_Q'
        DRIVER AGG/PNG
        IMAGEMODE RGB
        FORMATOPTION "PALETTE_FORCE=TRUE"
        # Why this is needed at all:
        #   http://trac.osgeo.org/mapserver/ticket/2096
        # This must be an absolute path (should be fixed for mapserver 5.2)
        #   http://trac.osgeo.org/mapserver/ticket/2115
        FORMATOPTION "PALETTE=/absolute/path/to/palette"
        FORMATOPTION "QUANTIZE_DITHER=OFF"
        FORMATOPTION "QUANTIZE_COLORS=256"
    END

The palette file is a list of colors, with each line like:

0,0,0
255,255,255

You only need to specify the colors that you want forced.

See also here:

http://www.nabble.com/Color-shifts-using-QUANTIZE_COLORS%3D256-to5730834.html#a14138694

- Rich

-- 
View this message in context: http://www.nabble.com/BUFFER-does-not-work-and-color-degradation-problems-tp15955479p15963219.html
Sent from the Mapserver - User mailing list archive at Nabble.com.




More information about the MapServer-users mailing list