Skip to content

IImageDecoder.ReadOrientation method

Reads the image orientation from the encoded metadata without decoding pixels; Identity by default.

public ImageOrientation ReadOrientation(ReadOnlySpan<byte> encoded)

Kept separate from TryDecode so the fast byte[] pixel path is preserved and the cheap metadata scan never forces an array copy. Formats without orientation metadata need not override it.