Share via


PictureWriterExtensions.SaveAsBytesAsync(IPictureWriter, IPicture) Method

Definition

Asynchronously saves a picture as a byte array.

public:
[System::Runtime::CompilerServices::Extension]
 static System::Threading::Tasks::Task<cli::array <System::Byte> ^> ^ SaveAsBytesAsync(Microsoft::Maui::Graphics::IPictureWriter ^ target, Microsoft::Maui::Graphics::IPicture ^ picture);
public static System.Threading.Tasks.Task<byte[]> SaveAsBytesAsync(this Microsoft.Maui.Graphics.IPictureWriter target, Microsoft.Maui.Graphics.IPicture picture);
static member SaveAsBytesAsync : Microsoft.Maui.Graphics.IPictureWriter * Microsoft.Maui.Graphics.IPicture -> System.Threading.Tasks.Task<byte[]>
<Extension()>
Public Function SaveAsBytesAsync (target As IPictureWriter, picture As IPicture) As Task(Of Byte())

Parameters

target
IPictureWriter

The picture writer to use for saving.

picture
IPicture

The picture to save.

Returns

Task<Byte[]>

A task that represents the asynchronous save operation. The task result contains the saved picture data as a byte array, or null if either the target or picture is null.

Applies to