PeachImage

PeachImage.Image

Image.DecodeInto Method

Overloads  
DecodeInto(Stream, Span<byte>, ImageMetadata, int, DecoderOptions) Decodes the image at stream’s position into destination; see DecodeInto(ReadOnlySpan<byte>, Span<byte>, ImageMetadata, int, DecoderOptions).
DecodeInto(ReadOnlySpan<byte>, Span<byte>, ImageMetadata, int, DecoderOptions) Decodes data into destination instead of a new Image; see ImageDecoder for the contract. Prefer an ImageDecoder when decoding repeatedly.

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

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

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

Parameters

stream System.IO.Stream

destination System.Span<System.Byte>

metadata ImageMetadata

rowStride System.Int32

options DecoderOptions

Returns

ImageInfo

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

Decodes data into destination instead of a new Image; see ImageDecoder for the contract. Prefer an ImageDecoder when decoding repeatedly.

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

Parameters

data System.ReadOnlySpan<System.Byte>

destination System.Span<System.Byte>

metadata ImageMetadata

rowStride System.Int32

options DecoderOptions

Returns

ImageInfo

Exceptions

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