You'll notice that the ImgReduceColors function has the following options for generating a palette for a color-reduced image:
IMG_FIXEDPALETTE
IMG_OCTREEPALETTE
IMG_MEDIANCUT
If you specify reduction to the fixed palette (IMG_FIXEDPALETTE), your image is reduced to an internal, pre-defined rainbow palette. The colors of the image are matched to the closest possible color in the this palette.
If you do not specify the IMG_FIXEDPALETTE option, ImgReduceColors will produce an optimized palette. An optimized palette is one where the color values are chosen based on the actual color content of the image. This produces a much higher quality image, but is significantly slower.
ImageMan currently has two options for optimized palettes: the median-cut method (specified by using the IMG_MEDIANCUT flag), and the higher-quality octree method (specified by using the IMG_OCTREEPALETTE flag). IMG_OCTREEPALETTE is the default method, so if you do not specify either of these flags, the octree reduction method will be used.
© 1995-2004 Data Techniques, Inc. All rights reserved.