PeachImage

PeachImage.ImageDecoder

ImageDecoder.DecodeInto Method

Overloads  
DecodeInto(Stream, Span<byte>, ImageMetadata, int) Decodes the image at stream’s position into destination; see DecodeInto(ReadOnlySpan<byte>, Span<byte>, ImageMetadata, int).
DecodeInto(ReadOnlySpan<byte>, Span<byte>, ImageMetadata, int) Decodes data into destination, rows rowStride bytes apart (0, the default, packs them tightly).

ImageDecoder.DecodeInto(Stream, Span<byte>, ImageMetadata, int) Method

Decodes the image at stream’s position into destination; see DecodeInto(ReadOnlySpan<byte>, Span<byte>, ImageMetadata, int).

public PeachImage.ImageInfo DecodeInto(System.IO.Stream stream, System.Span<byte> destination, out PeachImage.ImageMetadata metadata, int rowStride=0);

Parameters

stream System.IO.Stream

destination System.Span<System.Byte>

metadata ImageMetadata

rowStride System.Int32

Returns

ImageInfo

ImageDecoder.DecodeInto(ReadOnlySpan<byte>, Span<byte>, ImageMetadata, int) Method

Decodes data into destination, rows rowStride bytes apart (0, the default, packs them tightly).

public PeachImage.ImageInfo DecodeInto(System.ReadOnlySpan<byte> data, System.Span<byte> destination, out PeachImage.ImageMetadata metadata, int rowStride=0);

Parameters

data System.ReadOnlySpan<System.Byte>

destination System.Span<System.Byte>

metadata ImageMetadata

rowStride System.Int32

Returns

ImageInfo
The decoded image’s description: its size and pixel format as written to destination.

Exceptions

System.ArgumentException
destination is shorter than GetRequiredBufferSize(DecoderOptions, int), or rowStride is less than one row.

System.ObjectDisposedException
This decoder has been disposed.