PeachImage

PeachImage.Image

Image.SaveAsync Method

Overloads  
SaveAsync(string, EncoderOptions, CancellationToken) Encodes this image and writes it to path, inferring the format from the file extension. Encoding itself is synchronous and CPU-bound, same as LoadAsync(Stream, DecoderOptions, CancellationToken)’s decode — only the file write is awaited.
SaveAsync(Stream, string, EncoderOptions, CancellationToken) Encodes this image as formatName and writes it to stream. Encoding itself is synchronous and CPU-bound, same as LoadAsync(Stream, DecoderOptions, CancellationToken)’s decode — only the write to stream is awaited.

Image.SaveAsync(string, EncoderOptions, CancellationToken) Method

Encodes this image and writes it to path, inferring the format from the file extension. Encoding itself is synchronous and CPU-bound, same as LoadAsync(Stream, DecoderOptions, CancellationToken)’s decode — only the file write is awaited.

public System.Threading.Tasks.Task SaveAsync(string path, PeachImage.EncoderOptions? options=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

Parameters

path System.String

options EncoderOptions

cancellationToken System.Threading.CancellationToken

Returns

System.Threading.Tasks.Task

Image.SaveAsync(Stream, string, EncoderOptions, CancellationToken) Method

Encodes this image as formatName and writes it to stream. Encoding itself is synchronous and CPU-bound, same as LoadAsync(Stream, DecoderOptions, CancellationToken)’s decode — only the write to stream is awaited.

public System.Threading.Tasks.Task SaveAsync(System.IO.Stream stream, string formatName, PeachImage.EncoderOptions? options=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

Parameters

stream System.IO.Stream

formatName System.String

options EncoderOptions

cancellationToken System.Threading.CancellationToken

Returns

System.Threading.Tasks.Task