FreeImage.ConvertColorDepth Method (FIBITMAP, FREE_IMAGE_COLOR_DEPTH, Boolean)

FreeImage.NET

FreeImageConvertColorDepth Method (FIBITMAP, FREE_IMAGE_COLOR_DEPTH, Boolean)
Converts a FreeImage bitmap from one color depth to another. If the conversion fails the original FreeImage bitmap is returned.

Namespace: FreeImageAPI
Assembly: FreeImageNET (in FreeImageNET.dll) Version: 3.17.0.4 (3.17.0)
Syntax
C#
public static FIBITMAP ConvertColorDepth(
	FIBITMAP dib,
	FREE_IMAGE_COLOR_DEPTH conversion,
	bool unloadSource
)

Parameters

dib
Type: FreeImageAPIFIBITMAP
Handle to a FreeImage bitmap.
conversion
Type: FreeImageAPIFREE_IMAGE_COLOR_DEPTH
The desired output format.
unloadSource
Type: SystemBoolean
When true the structure will be unloaded on success.

Return Value

Type: FIBITMAP
Handle to a FreeImage bitmap.
Exceptions
ExceptionCondition
ArgumentNullExceptiondib is null.
See Also