imwriteWithMetadata
import { imwriteWithMetadata } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
Saves an image to a specified file with metadata
The function imwriteWithMetadata saves the image to the specified file. It does the same thing as imwrite, but additionally writes metadata if the corresponding format supports it.
imwriteWithMetadata(filename: EmbindString, img: Mat, metadataTypes: IntVector, metadata: MatVector, params: IntVector): boolean;2 available overloads
imwriteWithMetadata(filename: EmbindString, img: Mat, metadataTypes: IntVector, metadata: MatVector): boolean;imwriteWithMetadata(filename: EmbindString, img: Mat, metadataTypes: IntVector, metadata: MatVector, params: IntVector): boolean;filenameName of the file. As with imwrite, image format is determined by the file extension.
img(Mat or vector of Mat) Image or Images to be saved.
metadataTypesVector with types of metadata chucks stored in metadata to write, see ImageMetadataType.
metadataVector of vectors or vector of matrices with chunks of metadata to store into the file
paramsFormat-specific parameters encoded as pairs (paramId_1, paramValue_1, paramId_2, paramValue_2, ... .) see cv::ImwriteFlags
The boolean result.
These signatures describe this package. Upstream documentation can mention optional backends that are absent from this build. Check runtime compatibility before choosing a backend or file format.