Converts a raw bitmap to a FreeImage bitmap.

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

Syntax

C#
public static FIBITMAP ConvertFromRawBits(
	IntPtr bits,
	int width,
	int height,
	int pitch,
	uint bpp,
	uint red_mask,
	uint green_mask,
	uint blue_mask,
	bool topdown
)
Visual Basic (Declaration)
Public Shared Function ConvertFromRawBits ( _
	bits As IntPtr, _
	width As Integer, _
	height As Integer, _
	pitch As Integer, _
	bpp As UInteger, _
	red_mask As UInteger, _
	green_mask As UInteger, _
	blue_mask As UInteger, _
	topdown As Boolean _
) As FIBITMAP
Visual C++
public:
static FIBITMAP ConvertFromRawBits(
	IntPtr bits, 
	int width, 
	int height, 
	int pitch, 
	unsigned int bpp, 
	unsigned int red_mask, 
	unsigned int green_mask, 
	unsigned int blue_mask, 
	bool topdown
)

Parameters

bits
Type: System..::.IntPtr
Pointer to the memory block containing the raw bitmap.
width
Type: System..::.Int32
The width in pixels of the raw bitmap.
height
Type: System..::.Int32
The height in pixels of the raw bitmap.
pitch
Type: System..::.Int32
Defines the total width of a scanline in the raw bitmap, including padding bytes.
bpp
Type: System..::.UInt32
The bit depth (bits per pixel) of the raw bitmap.
red_mask
Type: System..::.UInt32
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: System..::.UInt32
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: System..::.UInt32
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: System..::.Boolean
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

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