Skip to content

imread1

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

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

ARGUMENTSfilename, dst, flags
FUNCTIONimread1
RETURN TYPEvoid
Call structure. A void return can still write to destination arguments. The parameter descriptions define inputs, outputs and ownership.

Loads an image from a file.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts and the return value.

Note: The image passing through the img parameter can be pre-allocated. The memory is reused if the shape and the type match with the load image.

imread1(filename: EmbindString, dst: Mat, flags: number): void;
2 available overloads
imread1(filename: EmbindString, dst: Mat): void;
imread1(filename: EmbindString, dst: Mat, flags: number): void;
filename

Name of file to be loaded.

dst

Output destination, filled by the native operation. object in which the image will be loaded.

flags

Flag that can take values of cv::ImreadModes, default with cv::IMREAD_COLOR_BGR.

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.