Skip to Content
New: @blazediff/core-native now includes interpret — structured diff analysis to understand what changed. Read more →
ExamplesInterpret Differences

Interpret

Structured image diff analysis powered by a native Rust binary. Unlike pixel-level or perceptual comparison methods, interpret identifies change regions and classifies them semantically — telling you what changed and where.

Installation

npm install @blazediff/core-native

Overview

The interpret function analyzes two images and returns structured results including severity, diff percentage, and detailed region analysis with content-aware change types (Addition, Deletion, Shift, ContentChange, ColorChange, RenderingNoise).

Image 1

Image 1

Image 2

Image 2

Moderate visual change detected (1.87% of image, 10 regions). Content changed: 4 regions (bottom, center). Content added: 3 regions (right, bottom, bottom-left). Content removed: 3 regions (bottom, top-left, center).

medium1.87% changed

Regions (10)Hover a region to highlight

bottom·deletion·mixed-region·(670, 977, 199×89) · 0.58%
bottom·content-change·sparse-distributed·(558, 738, 193×173) · 0.34%
bottom·content-change·mixed-region·(726, 910, 208×51) · 0.30%
center·content-change·sparse-distributed·(368, 663, 323×88) · 0.27%
bottom·content-change·sparse-distributed·(432, 937, 50×151) · 0.11%
right·addition·sparse-distributed·(1004, 626, 71×130) · 0.08%
top-left·deletion·edge-dominated·(343, 102, 39×126) · 0.07%
center·deletion·sparse-distributed·(505, 717, 49×88) · 0.05%
bottom·addition·sparse-distributed·(694, 1085, 80×33) · 0.04%
bottom-left·addition·edge-dominated·(253, 1191, 89×37) · 0.03%
import { interpret } from "@blazediff/core-native"; const result = await interpret("fixtures/3a.png", "fixtures/3b.png"); console.log(result.summary); console.log(`Severity: ${result.severity}`); console.log(`Changed: ${result.diffPercentage.toFixed(2)}%`); for (const region of result.regions) { console.log(`${region.position}: ${region.changeType} (${region.percentage.toFixed(2)}%)`); }
Last updated on