Skip to content

imdecodemulti

Image codecsfunctionOpenCV 5.0.0
import { imdecodemulti } from '@banou/opencv-wasm'

Use after await initOpenCV(). See the initialization and named imports guide.

ARGUMENTSbuf, flags, mats, range
FUNCTIONimdecodemulti
RETURN TYPEboolean
Call structure. A void return can still write to destination arguments. The parameter descriptions define inputs, outputs and ownership.

Reads a multi-page image from a buffer in memory.

The function imdecodemulti reads a multi-page image from the specified buffer in the memory. If the buffer is too short or contains invalid data, the function returns false.

See cv::imreadmulti for the list of supported formats and flags description.

Note: In the case of color images, the decoded images will have the channels stored in B G R order.

imdecodemulti(buf: Mat, flags: number, mats: MatVector, range: Range): boolean;
2 available overloads
imdecodemulti(buf: Mat, flags: number, mats: MatVector): boolean;
imdecodemulti(buf: Mat, flags: number, mats: MatVector, range: Range): boolean;
buf

Input array or vector of bytes.

flags

Flag that can take values of cv::ImreadModes.

mats

Output destination, filled by the native operation. A vector of Mat objects holding each page, if more than one.

range

A continuous selection of pages.

Returns

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.