Skip to content

decodeImage

TypeScript helpershelperOpenCV 5.0.0
import { decodeImage } from '@banou/opencv-wasm'
ARGUMENTSSee signature below
HELPERdecodeImage
RETURN TYPEMat
Call structure. A void return can still write to destination arguments. The parameter descriptions define inputs, outputs and ownership.

Decode encoded bytes with native codecs on the initialized shared engine, in browsers or Node. Defaults to IMREAD_COLOR; output colour is BGR or BGRA. Throws if decoding fails.

export declare function decodeImage(bytes: Uint8Array, flags?: number): Mat;
Returns

An owned matrix to release with using or delete().

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.