Table of Contents

Method ImWriteWithMetadata

Namespace
OpenCvSharp
Assembly
OpenCvSharp.dll

ImWriteWithMetadata(string, Mat, ImageMetadataType[], IEnumerable<Mat>, int[]?)

Saves an image to a specified file, additionally writing metadata if the corresponding format supports it.

public static bool ImWriteWithMetadata(string fileName, Mat img, ImageMetadataType[] metadataTypes, IEnumerable<Mat> metadata, int[]? prms = null)

Parameters

fileName string

Name of the file.

img Mat

Image to be saved.

metadataTypes ImageMetadataType[]

Array with types of metadata chunks stored in metadata to write.

metadata IEnumerable<Mat>

Array of matrices with chunks of metadata to store into the file.

prms int[]

Format-specific save parameters encoded as pairs

Returns

bool