Saves a .NET Bitmap to a file.

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

Syntax

C#
public static bool SaveBitmap(
	Bitmap bitmap,
	string filename
)
Visual Basic (Declaration)
Public Shared Function SaveBitmap ( _
	bitmap As Bitmap, _
	filename As String _
) As Boolean
Visual C++
public:
static bool SaveBitmap(
	Bitmap^ bitmap, 
	String^ filename
)

Parameters

bitmap
Type: System.Drawing..::.Bitmap
The .NET Bitmap to save.
filename
Type: System..::.String
Name of the file to save to.

Return Value

Returns true on success, false on failure.

Exceptions

ExceptionCondition
System..::.ArgumentNullException bitmap or filename 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