Table of Contents

Method ImDecode

Namespace
OpenCvSharp
Assembly
OpenCvSharp.dll

ImDecode(byte[], ImreadModes)

Creates the Mat instance from image data (using cv::decode)

public static Mat ImDecode(byte[] imageBytes, ImreadModes mode = ImreadModes.Color)

Parameters

imageBytes byte[]
mode ImreadModes

Returns

Mat

ImDecode(ReadOnlySpan<byte>, ImreadModes)

Reads image from the specified buffer in memory.

public static Mat ImDecode(ReadOnlySpan<byte> span, ImreadModes mode = ImreadModes.Color)

Parameters

span ReadOnlySpan<byte>

The input slice of bytes.

mode ImreadModes

The same flags as in imread

Returns

Mat