Last update: 2023-08-31
  • Created for:
  • Developer

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 the 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. It applies regardless of the 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. The modifier numColors must be 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 the 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