Saves a previously loaded FreeImage bitmap to a file.
In case the loading format is FIF_UNKNOWN
the format is taken off the filename.
If no suitable format was found false will be returned.
Save flags can be provided by the flags parameter.
Namespace:
FreeImageAPIAssembly: FreeImageNET (in FreeImageNET.dll)
Syntax
C# |
---|
public static bool SaveEx( FIBITMAP dib, string filename, FREE_IMAGE_FORMAT format, FREE_IMAGE_SAVE_FLAGS flags ) |
Visual Basic (Declaration) |
---|
Public Shared Function SaveEx ( _ dib As FIBITMAP, _ filename As String, _ format As FREE_IMAGE_FORMAT, _ flags As FREE_IMAGE_SAVE_FLAGS _ ) As Boolean |
Visual C++ |
---|
public: static bool SaveEx( FIBITMAP dib, String^ filename, FREE_IMAGE_FORMAT format, FREE_IMAGE_SAVE_FLAGS flags ) |
Parameters
- dib
- Type: FreeImageAPI..::.FIBITMAP
Handle to a FreeImage bitmap.
- filename
- Type: System..::.String
The complete name of the file to save to. The extension will be corrected if it is no valid extension for the selected format or if no extension was specified.
- format
- Type: FreeImageAPI..::.FREE_IMAGE_FORMAT
Format of the image. 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 | dib or filename is null. |