Table of Contents

Method ImDecodeWithMetadata

Namespace
OpenCvSharp
Assembly
OpenCvSharp.dll

ImDecodeWithMetadata(InputArray, out ImageMetadataType[], out Mat[], ImreadModes)

Decodes an image from a memory buffer and extracts associated metadata.

public static Mat ImDecodeWithMetadata(InputArray buf, out ImageMetadataType[] metadataTypes, out Mat[] metadata, ImreadModes flags)

Parameters

buf InputArray

Input array or vector of bytes containing the encoded image data.

metadataTypes ImageMetadataType[]

Output array with types of metadata chunks returned in metadata.

metadata Mat[]

Output array of matrices to store the retrieved metadata.

flags ImreadModes

The same flags as in imread

Returns

Mat

The decoded image. If decoding fails, the function returns an empty matrix.