|
When images are exported at a different color depth there are different
ways of choosing the colors that should be used for the image. We
provide the following options for the palette parameter.
- "Adaptive" - the default
- "WebSafe"
- "Windows"
- "Macintosh"
- "Uniform"
- "Grayscale"
- "Black&White"
- "Exact"
The Adaptive palette may use fewer than the number of colors specified
if there are a limited number of colors in the image. ImageGlue
uses an optimised Octree algorithm for fast, high quality color
reduction.
The WebSafe, Windows and Macintosh palettes all have a fixed numbers
of colors. The depth parameter is ignored if you choose one of these
options.
The Uniform palette specifies a set of colors uniformly distributed
throughout color space. This palette only exists for 8, 27, 64,
125 and 216 colors and so the number you specify in the depth parameter
may be reduced to accomodate this.
The Grayscale palette will use exactly the number of gray values
specified in the depth - minimum two.
Black and White is always two colors - black and white.
The Exact palette is a kind of Adaptive palette optimized to ensure
an exact color match wherever possible.
You can append colors to Exact or Adaptive palettes separated by
colons or semicolons. These colors are fixed colors which will always
be added to the palette. For example the following code would use
a 32 color exact palette ensuring the colors black, white, red and
green were present.
[Visual Basic]
mycanvas.ReduceColors("exact:255,255,255;0,0,0:#FF0000:#00FF00",
32, False)
[C#]
mycanvas.ReduceColors("exact:255,255,255;0,0,0:#FF0000:#00FF00",
32, false);
|