Share via


SkiaImage.Save(Stream, ImageFormat, Single) Method

Definition

Saves the image to a stream in the specified format.

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 stream to save the image to.

format
ImageFormat

The format to save the image in.

quality
Single

The quality level to use when saving the image (0.0 to 1.0).

Implements

Exceptions

Thrown when quality is outside the range of 0.0 to 1.0 or when format is not supported.

Thrown when the specified format is not supported by Skia.

Applies to