Share via


PictureReaderExtensions.ReadAsync(IPictureReader, Stream, String) Method

Definition

Asynchronously reads a picture from a stream.

public static System.Threading.Tasks.Task<Microsoft.Maui.Graphics.IPicture> ReadAsync(this Microsoft.Maui.Graphics.IPictureReader target, System.IO.Stream stream, string hash = default);
static member ReadAsync : Microsoft.Maui.Graphics.IPictureReader * System.IO.Stream * string -> System.Threading.Tasks.Task<Microsoft.Maui.Graphics.IPicture>
<Extension()>
Public Function ReadAsync (target As IPictureReader, stream As Stream, Optional hash As String = Nothing) As Task(Of IPicture)

Parameters

target
IPictureReader

The picture reader.

stream
Stream

The stream containing the picture data.

hash
String

Optional hash value for the picture data.

Returns

A task that represents the asynchronous read operation. The result contains an IPicture object read from the stream.

Exceptions

Thrown when target or stream is null.

Applies to