FreeImageBitmap.ConvertColorDepth Method

FreeImage.NET

FreeImageBitmapConvertColorDepth Method
Converts this FreeImageBitmap into a different color depth. The parameter bpp specifies color depth, greyscale conversion and palette reorder.

Adding the FICD_FORCE_GREYSCALE flag will first perform a convesion to greyscale. This can be done with any target color depth.

Adding the FICD_REORDER_PALETTE flag will allow the algorithm to reorder the palette. This operation will not be performed to non-greyscale images to prevent data loss by mistake.

Namespace: FreeImageAPI
Assembly: FreeImageNET (in FreeImageNET.dll) Version: 3.17.0.4 (3.17.0)
Syntax
C#
public bool ConvertColorDepth(
	FREE_IMAGE_COLOR_DEPTH bpp
)

Parameters

bpp
Type: FreeImageAPIFREE_IMAGE_COLOR_DEPTH
A bitfield containing information about the conversion to perform.

Return Value

Type: Boolean
Returns true on success, false on failure.
See Also