콘텐츠로 이동

ImageDecoders.TryDecode method (1 of 3)

이 콘텐츠는 아직 번역되지 않았습니다.

Attempts to decode an encoded image byte array into a Bgra32PixelBuffer.

public static bool TryDecode(byte[] encoded, out Bgra32PixelBuffer bitmap)

Use the TryDecode overload when the source orientation is also needed.


Attempts to decode an encoded image span into a Bgra32PixelBuffer.

public static bool TryDecode(ReadOnlySpan<byte> encoded, out Bgra32PixelBuffer bitmap)
parameter description
encoded Encoded image bytes.
bitmap Decoded bitmap on success.

true if a decoder matched and decoding succeeded; otherwise, false.


Attempts to decode an encoded image byte array into pixels plus the orientation parsed from its metadata; the orientation is Identity for formats without orientation metadata.

public static bool TryDecode(byte[] encoded, out Bgra32PixelBuffer bitmap,
out ImageOrientation orientation)

Uses the same fast byte[] pixel path as TryDecode; the orientation comes from ReadOrientation, a cheap, copy-free metadata scan.