npm / @blazediff/core
@blazediff/core
What changed in @blazediff/core 1 to 2, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-27.
6 breaking9 new APIs and options4 performance1 behavior and defaults2 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@blazediff/core 214 changes
Breaking changes 5
Anti-aliasing detection is on by default on every surface.
UI and React difference modes use antialiasing instead of includeAA.
core-native compare() becomes diff(); the replacement accepts raw RGBA images as well as paths and encoded bytes.
Dimension mismatches return a result object instead of throwing.
ssim, msssim, hitchhikersSSIM, and gmsd now take images and an options object and return a result object.
New APIs and options 7
This entry point provides a drop-in replacement for pixelmatch 8.
A unified diff(a, b, options) API accepts { data, width, height } images and returns a result object across JS, wasm, native, Rust, Python, and both CLIs.
The blazediff-interpret Rust crate takes the new DiffOptions.
The unified diff options include mask, which gives the same counts and diff images as pixelmatch 8.0.0.
The metric option accepts "yiq" or "oklab"; oklab produces the same counts and diff images as pixelmatch 8.0.0.
Render options are grouped under render, including alpha, diffColor, diffColorAlt, aaColor, and background.
The window option matches pixelmatch 8.0.0 and reports where the busiest window is.
Performance 1
The default YIQ diff runs faster; counts and output bytes do not change.
Behavior and default changes 1
The matcher groups method options under diff, ssim, and gmsd.
@blazediff/core 18 changes
Breaking changes 1
Removed @blazediff/types to keep @blazediff/core zero-dependency.
New APIs and options 2
Adds named exports to the package.
Adds a fast buffer comparison to check whether images are identical.
Performance 3
Pixels proven under threshold are rejected with integer math before the float YIQ metric runs; opaque pixels reuse channels already loaded for equality testing. Diff counts and output images are unchanged.
The core is faster when there is no output, using a single pass.
Improves JIT optimization for color delta.
Fixes and other changes 2
Passing null as the output buffer no longer crashes; null and undefined both produce count-only results, matching pixelmatch's API.
The fast path now compares both bytes and color delta.