PeachImage

PeachImage.Image

Image.LoadAsync(Stream, DecoderOptions, CancellationToken) Method

Asynchronously loads an image by buffering stream and then decoding it synchronously (decoding itself is CPU-bound, not I/O-bound).

public static System.Threading.Tasks.Task<PeachImage.Image> LoadAsync(System.IO.Stream stream, PeachImage.DecoderOptions? options=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

Parameters

stream System.IO.Stream

options DecoderOptions

cancellationToken System.Threading.CancellationToken

Returns

System.Threading.Tasks.Task<Image>