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)

Syntax

C#
public bool ConvertColorDepth(
	FREE_IMAGE_COLOR_DEPTH bpp
)
Visual Basic (Declaration)
Public Function ConvertColorDepth ( _
	bpp As FREE_IMAGE_COLOR_DEPTH _
) As Boolean
Visual C++
public:
bool ConvertColorDepth(
	FREE_IMAGE_COLOR_DEPTH bpp
)

Parameters

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

Return Value

Returns true on success, false on failure.

Version Information

FreeImage.NET

Supported in: 3.11.0, 3.12.0, 3.13.0, 3.13.1

See Also