PlatformImage.Save(Stream, ImageFormat, Single) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Saves the contents of this image to the provided Stream object.
public void Save (System.IO.Stream stream, Microsoft.Maui.Graphics.ImageFormat format = Microsoft.Maui.Graphics.ImageFormat.Png, float quality = 1);
abstract member Save : System.IO.Stream * Microsoft.Maui.Graphics.ImageFormat * single -> unit
override this.Save : System.IO.Stream * Microsoft.Maui.Graphics.ImageFormat * single -> unit
Public Sub Save (stream As Stream, Optional format As ImageFormat = Microsoft.Maui.Graphics.ImageFormat.Png, Optional quality As Single = 1)
Parameters
- stream
- Stream
The destination stream the bytes of this image will be saved to.
- format
- ImageFormat
The destination format of the image.
- quality
- Single
The destination quality of the image.
Implements
Exceptions
Thrown when quality
is less than 0 or more than 1.
Thrown when the provided value in format
does not match with the original format for this image.
Remarks
The quality
value is currently unused.