Converts a bitmap to 1-bit monochrome bitmap using a threshold T between [0..255]. The function first converts the bitmap to a 8-bit greyscale bitmap. Then, any brightness level that is less than T is set to zero, otherwise to 1. For 1-bit input bitmaps, the function clones the input bitmap and builds a monochrome palette.

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

Syntax

C#
public static FIBITMAP Threshold(
	FIBITMAP dib,
	byte t
)
Visual Basic (Declaration)
Public Shared Function Threshold ( _
	dib As FIBITMAP, _
	t As Byte _
) As FIBITMAP
Visual C++
public:
static FIBITMAP Threshold(
	FIBITMAP dib, 
	unsigned char t
)

Parameters

dib
Type: FreeImageAPI..::.FIBITMAP
Handle to a FreeImage bitmap.
t
Type: System..::.Byte
The threshold.

Return Value

Handle to a FreeImage bitmap.

Version Information

FreeImage.NET

Supported in: 3.11.0, 3.12.0, 3.13.0, 3.13.1

See Also