FreeImage.NET Class Library Reference
FreeImageColorQuantizeEx Method (FIBITMAP, FREE_IMAGE_QUANTIZE, Int32, RGBQUAD, Boolean) |
ColorQuantizeEx is an extension to the ColorQuantize(FIBITMAP, FREE_IMAGE_QUANTIZE)
method that provides additional options used to quantize a 24-bit image to any
number of colors (up to 256), as well as quantize a 24-bit image using a
provided palette.
Namespace: FreeImageAPI
Assembly: FreeImageNET (in FreeImageNET.dll) Version: 3.17.0.4 (3.17.0)
Syntax
C#
public static FIBITMAP ColorQuantizeEx( FIBITMAP dib, FREE_IMAGE_QUANTIZE quantize, int PaletteSize, RGBQUAD[] ReservePalette, bool minColorDepth )
Parameters
- dib
- Type: FreeImageAPIFIBITMAP
Handle to a FreeImage bitmap. - quantize
- Type: FreeImageAPIFREE_IMAGE_QUANTIZE
Specifies the color reduction algorithm to be used. - PaletteSize
- Type: SystemInt32
Size of the desired output palette. - ReservePalette
- Type: FreeImageAPIRGBQUAD
The provided palette. - minColorDepth
- Type: SystemBoolean
true to create a bitmap with the smallest possible color depth for the specified PaletteSize.
Return Value
Type: FIBITMAPHandle to a FreeImage bitmap.
See Also