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 partial or full provided palette.

Namespace:  FreeImageAPI
Assembly:  FreeImageNET (in FreeImageNET.dll)

Syntax

C#
public static FIBITMAP ColorQuantizeEx(
	FIBITMAP dib,
	FREE_IMAGE_QUANTIZE quantize,
	int PaletteSize,
	RGBQUAD[] ReservePalette,
	int bpp
)
Visual Basic (Declaration)
Public Shared Function ColorQuantizeEx ( _
	dib As FIBITMAP, _
	quantize As FREE_IMAGE_QUANTIZE, _
	PaletteSize As Integer, _
	ReservePalette As RGBQUAD(), _
	bpp As Integer _
) As FIBITMAP
Visual C++
public:
static FIBITMAP ColorQuantizeEx(
	FIBITMAP dib, 
	FREE_IMAGE_QUANTIZE quantize, 
	int PaletteSize, 
	array<RGBQUAD>^ ReservePalette, 
	int bpp
)

Parameters

dib
Type: FreeImageAPI..::.FIBITMAP
Handle to a FreeImage bitmap.
quantize
Type: FreeImageAPI..::.FREE_IMAGE_QUANTIZE
Specifies the color reduction algorithm to be used.
PaletteSize
Type: System..::.Int32
Size of the desired output palette.
ReservePalette
Type: array< FreeImageAPI..::.RGBQUAD >[]()[]
The provided palette.
bpp
Type: System..::.Int32
The desired color depth of the created image.

Return Value

Handle to a FreeImage bitmap.

Version Information

FreeImage.NET

Supported in: 3.12.0, 3.13.0, 3.13.1

See Also