Color quantization. Specifies color-quantization attributes for GIF output conversion.

quantize= *type*[, *dither*[, *numColors*[, *colorList*]]]



Specifies the palette type.

Set to adaptive to calculate an optimal palette for the image.

Set to web or mac to choose a pre-defined palette.

Note: The mac pallet type is only supported for GIF and PNG8 formats but not for GIF-Alpha and PNG8-Alpha formats.



Specifies the dithering options.

Set to diffuse for Floyd-Steinberg error diffusion

Set to off to disable dithering.


Number of output colors (2-256)

Specifies how many colors are included in the adaptive palette.


A comma-separated list of forced RGB colors in hex6 format

Lets you specify colors to include in an adaptive palette. If the number of colors specified is less than numColors , additional colors are calculated based on the image content.


Request attribute. Applies regardless of current layer setting. Used only if fmt=gif, fmt=gif-alpha, fmt=png8, or fmt=png8-alpha. Ignored otherwise.

The colors specified with colorList must consist of RGB values in hex6 format (see color without 0x prefix. No other color specifiers are permitted. numColors must be between 2-256.




Generate a GIF thumbnail using the web palette and no dithering:

http:// *server*/myRootId/myImageId?req=tmb&fmt=gif&quantize=web,off

Convert image to a bi-tonal GIF with key-color transparency and force colors to black and white:

http:// *server*/myRootId/myImageId?fmt=gif-alpha&wid=100&quantize=adaptive,off,2,000000,ffffff

See also

fmt= , color

On this page