Method SaveToStream
SaveToStream(Stream, ImageFormat, int)
Saves this image to the specified stream in the specified format.
public virtual bool SaveToStream(Stream stream, ImageFormat format, int quality)
Parameters
stream
StreamThe Stream where the image will be saved.
format
ImageFormatAn ImageFormat that specifies the format of the saved image.
quality
intImage 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.
SaveToStream(Stream, BitmapType, int)
Saves this image to the specified stream in the specified format defined
in type
.
public abstract bool SaveToStream(Stream stream, BitmapType type, int quality)
Parameters
stream
StreamThe Stream where the image will be saved.
type
BitmapTypeAn BitmapType that specifies the format of the saved image.
quality
intImage quality. Optional. If not specified, DefaultSaveQuality is used. Can be ignored on some platforms.
Returns
- bool
true
if the operation succeeded,false
otherwise.
Remarks
Note: Not all values of BitmapType enumeration may be supported by the library and operating system for the save operation.