Returns whether the image is a greyscale image or not. The function scans all colors in the bitmaps palette for entries where red, green and blue are not all the same (not a grey color). Supports 1-, 4- and 8-bit bitmaps.

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

Syntax

C#
public static bool IsGreyscaleImage(
	FIBITMAP dib
)
Visual Basic (Declaration)
Public Shared Function IsGreyscaleImage ( _
	dib As FIBITMAP _
) As Boolean
Visual C++
public:
static bool IsGreyscaleImage(
	FIBITMAP dib
)

Parameters

dib
Type: FreeImageAPI..::.FIBITMAP
Handle to a FreeImage bitmap.

Return Value

True if the image is a greyscale image, else false.

Exceptions

ExceptionCondition
System..::.ArgumentNullException dib is null.

Version Information

FreeImage.NET

Supported in: 3.11.0, 3.12.0, 3.13.0, 3.13.1

See Also