This function returns a new image which has been reduced to a specified palette.
|
Parameter |
Type |
Description |
|
hImage |
HANDLE |
Identifies the image to be reduced. |
|
nFlags |
INT |
Specifies options to be used when reducing the colors. |
|
hPal |
HPALETTE |
Is a handle to a palette that the image will be reduced to. |
Return Value
The return value indicates whether the image was processed successfully. A return value of NULL indicates the color reduction failed, while a nonzero value is the ImageMan handle to the new image.
Comments
The number of colors that the new image is reduced to, is determined by the number of palette entries in the given palette.
Option Flags include:
|
Flag |
Description |
|
IMG_BURKES |
Specifies the Burkes Dithering algorithm. |
|
IMG_BAYER |
Specifies the Bayer Dither be used. |
|
IMG_FLOYD |
Specifies the Floyd Steinberg dither. |
Note
This function does not alter the original image; rather, it returns a new image based on the passed parameters.
© 1995-2004 Data Techniques, Inc. All rights reserved.