Converts an .NET Bitmap into a FreeImage bitmap.

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

Syntax

C#
public static FIBITMAP CreateFromBitmap(
	Bitmap bitmap
)
Visual Basic (Declaration)
Public Shared Function CreateFromBitmap ( _
	bitmap As Bitmap _
) As FIBITMAP
Visual C++
public:
static FIBITMAP CreateFromBitmap(
	Bitmap^ bitmap
)

Parameters

bitmap
Type: System.Drawing..::.Bitmap
The Bitmap to convert.

Return Value

Handle to a FreeImage bitmap.

Remarks

Copying metadata has been disabled until a proper way of reading and storing metadata in a .NET bitmap is found.

Exceptions

ExceptionCondition
System..::.ArgumentNullException bitmap is null.
System..::.ArgumentException The bitmaps pixelformat is invalid.

Version Information

FreeImage.NET

Supported in: 3.11.0, 3.12.0, 3.13.0, 3.13.1

See Also