Method ImEncodeWithMetadata
- Namespace
- OpenCvSharp
- Assembly
- OpenCvSharp.dll
ImEncodeWithMetadata(string, InputArray, ImageMetadataType[], IEnumerable<Mat>, out byte[], int[]?)
Compresses the image into a memory buffer, additionally encoding metadata if the corresponding format supports it.
public static bool ImEncodeWithMetadata(string ext, InputArray img, ImageMetadataType[] metadataTypes, IEnumerable<Mat> metadata, out byte[] buf, int[]? prms = null)
Parameters
extstringThe file extension that defines the output format
imgInputArrayThe image to be written
metadataTypesImageMetadataType[]Array with types of metadata chunks stored in metadata to write.
metadataIEnumerable<Mat>Array of matrices with chunks of metadata to store into the file.
bufbyte[]Output buffer resized to fit the compressed image.
prmsint[]Format-specific parameters.