imreadWithMetadata
import { imreadWithMetadata } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
Reads an image from a file along with associated metadata.
This function behaves similarly to cv::imread(), loading an image from the specified file. In addition to the image pixel data, it also attempts to extract any available metadata embedded in the file (such as EXIF, XMP, etc.), depending on file format support.
Note: In the case of color images, the decoded images will have the channels stored in B G R order.
imreadWithMetadata(filename: EmbindString, metadataTypes: IntVector, metadata: MatVector, flags: number): Mat;filenameName of the file to be loaded.
metadataTypesOutput destination, filled by the native operation. Output vector with types of metadata chunks returned in metadata, see ImageMetadataType.
metadataOutput destination, filled by the native operation. Output vector of vectors or vector of matrices to store the retrieved metadata.
flagsFlag that can take values of cv::ImreadModes.
The loaded image as a cv::Mat object. If the image cannot be read, the function returns an empty matrix. Release returned native handles with using or delete(), including handles nested in results.
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.