Method TryReadSize
TryReadSize(byte[]?, out int, out int)
Reads an image's pixel dimensions from its header.
public static bool TryReadSize(byte[]? imageBytes, out int width, out int height)
Parameters
imageBytesbyte[]The encoded image bytes.
widthintReceives the width in pixels, or zero.
heightintReceives the height in pixels, or zero.