FreeImage.NET Class Library Reference
FreeImageConvertFromRawBits Method (Byte, Int32, Int32, Int32, UInt32, UInt32, UInt32, UInt32, Boolean) |
Converts a raw bitmap to a FreeImage bitmap.
Namespace: FreeImageAPI
Assembly: FreeImageNET (in FreeImageNET.dll) Version: 3.17.0.4 (3.17.0)
Syntax
C#
public static FIBITMAP ConvertFromRawBits( byte[] bits, int width, int height, int pitch, uint bpp, uint red_mask, uint green_mask, uint blue_mask, bool topdown )
Parameters
- bits
- Type: SystemByte
Array of bytes containing the raw bitmap. - width
- Type: SystemInt32
The width in pixels of the raw bitmap. - height
- Type: SystemInt32
The height in pixels of the raw bitmap. - pitch
- Type: SystemInt32
Defines the total width of a scanline in the raw bitmap, including padding bytes. - bpp
- Type: SystemUInt32
The bit depth (bits per pixel) of the raw bitmap. - red_mask
- Type: SystemUInt32
The bit mask describing the bits used to store a single pixel's red component in the raw bitmap. This is only applied to 16-bpp raw bitmaps. - green_mask
- Type: SystemUInt32
The bit mask describing the bits used to store a single pixel's green component in the raw bitmap. This is only applied to 16-bpp raw bitmaps. - blue_mask
- Type: SystemUInt32
The bit mask describing the bits used to store a single pixel's blue component in the raw bitmap. This is only applied to 16-bpp raw bitmaps. - topdown
- Type: SystemBoolean
If true, the raw bitmap is stored in top-down order (top-left pixel first) and in bottom-up order (bottom-left pixel first) otherwise.
Return Value
Type: FIBITMAPHandle to a FreeImage bitmap.
See Also