Method Save
Save(string, BitmapType, int?)
Saves this Image to the specified file.
public virtual bool Save(string name, BitmapType type, int? quality = null)
Parameters
namestringA string that contains the name of the file to which to save this Image.
typeBitmapTypeAn BitmapType that specifies the format of the saved image.
qualityint?Image quality. Optional. If not specified, DefaultSaveQuality is used. Can be ignored on some platforms.
Returns
- bool
trueif the operation succeeded,falseotherwise.
Remarks
Note: Not all values of BitmapType enumeration may be supported by the library and operating system for the save operation.
Save(Stream, BitmapType, int?)
Saves this image to the specified stream in the specified format defined
in type.
public virtual bool Save(Stream stream, BitmapType type, int? quality = null)
Parameters
streamStreamThe Stream where the image will be saved.
typeBitmapTypeAn BitmapType that specifies the format of the saved image.
qualityint?Image quality. Optional. If not specified, DefaultSaveQuality is used. Can be ignored on some platforms.
Returns
- bool
trueif the operation succeeded,falseotherwise.
Remarks
Note: Not all values of BitmapType enumeration may be supported by the library and operating system for the save operation.
Save(Stream, ImageFormat, int?)
Saves this image to the specified stream in the specified format.
public virtual bool Save(Stream stream, ImageFormat format, int? quality = null)
Parameters
streamStreamThe Stream where the image will be saved.
formatImageFormatAn ImageFormat that specifies the format of the saved image.
qualityint?Image quality. Optional. If not specified, DefaultSaveQuality is used. Can be ignored on some platforms.
Returns
Remarks
There are other save methods in the Image that support image formats not included in ImageFormat.
Save(string, int?)
Saves this Image to the specified file.
public virtual bool Save(string fileName, int? quality = null)
Parameters
fileNamestringA string that contains the name of the file to which to save this Image.
qualityint?Image quality. Optional. If not specified, DefaultSaveQuality is used. Can be ignored on some platforms.
Returns
Remarks
Use ExtensionsForSave to get supported formats for the save operation.