Skip to content

diffImages

diffImages(baseline, current, options, codec?): Promise<DiffResult>

Defined in: engine.ts:15

Compare baseline and current screenshots, returning pass/fail and a diff image.

Buffer

Baseline PNG buffer.

Buffer

Current capture PNG buffer.

DiffOptions

Pixel threshold and ratio limits.

ImageCodec = pngjsCodec

Decodes and encodes the PNGs; pngjs unless an engine says otherwise.

Promise<DiffResult>

The diff result with pixel counts and an optional overlay image.