imencodemulti
import { imencodemulti } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
Encodes array of images into a memory buffer.
The function is analog to cv::imencode for in-memory multi-page image compression. See cv::imwrite for the list of supported formats and flags description.
imencodemulti(ext: EmbindString, imgs: MatVector, buf: ucharVector, params: IntVector): boolean;2 available overloads
imencodemulti(ext: EmbindString, imgs: MatVector, buf: ucharVector): boolean;imencodemulti(ext: EmbindString, imgs: MatVector, buf: ucharVector, params: IntVector): boolean;extFile extension that defines the output format. Must include a leading period.
imgsVector of images to be written.
bufOutput destination, filled by the native operation. Output buffer resized to fit the compressed data.
paramsFormat-specific parameters. See cv::imwrite and 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.