FreeImage.NET Class Library Reference
FreeImageConvertToStandardType Method |
Converts a non standard image whose color type is FIC_MINISBLACK
to a standard 8-bit greyscale image.
Namespace: FreeImageAPI
Assembly: FreeImageNET (in FreeImageNET.dll) Version: 3.17.0.4 (3.17.0)
Syntax
C#
public static FIBITMAP ConvertToStandardType( FIBITMAP src, bool scale_linear )
Parameters
- src
- Type: FreeImageAPIFIBITMAP
Handle to a FreeImage bitmap. - scale_linear
- Type: SystemBoolean
When true the conversion is done by scaling linearly each pixel value from [min, max] to an integer value between [0..255], where min and max are the minimum and maximum pixel values in the image. When false the conversion is done by rounding each pixel value to an integer between [0..255]. Rounding is done using the following formula: dst_pixel = (BYTE) MIN(255, MAX(0, q)) where int q = int(src_pixel + 0.5);
Return Value
Type: FIBITMAPHandle to a FreeImage bitmap.
See Also