Saves a .NET Bitmap to a file.
            
    Namespace: 
   FreeImageAPIAssembly: FreeImageNET (in FreeImageNET.dll)
Syntax
| C# | 
|---|
public static bool SaveBitmap( Bitmap bitmap, string filename, FREE_IMAGE_FORMAT format, FREE_IMAGE_SAVE_FLAGS flags )  | 
| Visual Basic (Declaration) | 
|---|
Public Shared Function SaveBitmap ( _ bitmap As Bitmap, _ filename As String, _ format As FREE_IMAGE_FORMAT, _ flags As FREE_IMAGE_SAVE_FLAGS _ ) As Boolean  | 
| Visual C++ | 
|---|
public: static bool SaveBitmap( Bitmap^ bitmap, String^ filename, FREE_IMAGE_FORMAT format, FREE_IMAGE_SAVE_FLAGS flags )  | 
Parameters
- bitmap
 - Type: System.Drawing..::.Bitmap
The .NET Bitmap to save. 
- filename
 - Type: System..::.String
Name of the file to save to. 
- format
 - Type: FreeImageAPI..::.FREE_IMAGE_FORMAT
Format of the bitmap. If the format should be taken from the filename use FIF_UNKNOWN. 
- flags
 - Type: FreeImageAPI..::.FREE_IMAGE_SAVE_FLAGS
Flags to enable or disable plugin-features. 
Return Value
Returns true on success, false on failure.
Exceptions
| Exception | Condition | 
|---|---|
| System..::.ArgumentNullException | bitmap or filename is null. | 
| System..::.ArgumentException | The bitmaps pixelformat is invalid. |