Skip to content

toImageData

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

Copy a shared-engine 8-bit matrix to independent RGBA ImageData, handling row strides. Requires ImageData in the environment. Default colour order is BGR for three channels, RGBA for four. Use bgra for decoded alpha images. The returned pixels remain valid after the matrix is disposed.

export declare function toImageData(mat: Mat, order?: ColourOrder): ImageData;

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.