FreeImage.NET Class Library Reference
FreeImageSaveBitmap Method (Bitmap, String, FREE_IMAGE_FORMAT, FREE_IMAGE_SAVE_FLAGS) |
Saves a .NET Bitmap to a file.
Namespace: FreeImageAPI
Assembly: FreeImageNET (in FreeImageNET.dll) Version: 3.17.0.4 (3.17.0)
Syntax
C#
public static bool SaveBitmap( Bitmap bitmap, string filename, FREE_IMAGE_FORMAT format, FREE_IMAGE_SAVE_FLAGS flags )
Parameters
- bitmap
- Type: System.DrawingBitmap
The .NET Bitmap to save. - filename
- Type: SystemString
Name of the file to save to. - format
- Type: FreeImageAPIFREE_IMAGE_FORMAT
Format of the bitmap. If the format should be taken from the filename use FIF_UNKNOWN. - flags
- Type: FreeImageAPIFREE_IMAGE_SAVE_FLAGS
Flags to enable or disable plugin-features.
Return Value
Type: BooleanReturns true on success, false on failure.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | bitmap or filename is null. |
ArgumentException | The bitmaps pixelformat is invalid. |
See Also