@vizzly-testing/honeydiff 0.11.0 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,42 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [Unreleased]
9
+
10
+ ## [0.12.0] - 2026-07-19
11
+
12
+ ### Fixed
13
+ - Prevented AA filtering from hiding thin border and divider recoloring by
14
+ requiring cross-image raster displacement.
15
+ - Compared rendered RGBA appearance, including opacity changes, while ignoring
16
+ hidden RGB under full transparency.
17
+ - Kept zero-threshold results and artifact masks consistent for low-alpha RGBA.
18
+ - Kept optional metrics independent from threshold and AA-filtered diff counts.
19
+ - Corrected small-image SSIM/MS-SSIM, GMSD boundaries, and exact artifact masks.
20
+ - Matched the authors' MS-SSIM pyramid, pooling, and direct weight semantics,
21
+ plus GMSD's exact normalized constant and sample-deviation pooling.
22
+ - Made capped comparisons classify from observed pixel evidence regardless of
23
+ cluster policy, preventing early exit from reporting false identity.
24
+ - Kept diff pixels and clusters null unless callers request them.
25
+ - Added Node boundary coverage for transparency, evidence privacy, exact RGBA,
26
+ and metric independence.
27
+
28
+ **Full Changelog**: https://github.com/vizzly-testing/honeydiff/compare/v0.11.1...v0.12.0
29
+
30
+ ## [0.11.1] - 2026-06-20
31
+
32
+ ## What's Changed
33
+
34
+ ### Fixed
35
+ - Recovered hot-path performance after the 0.11.0 metric correctness update:
36
+ - Anti-aliasing now gathers sibling and edge context in one neighbor pass and skips Delta E work for exact RGB neighbor matches.
37
+ - Exact/no-AA count-only comparisons scan raw RGB rows directly.
38
+ - SSIM keeps the Gaussian-weighted 0.11 semantics while using a separable blur path for larger images and a direct small-image path where allocation overhead would dominate.
39
+ - Local Criterion runs on Apple Silicon now show the tall screenshot fixture faster than 0.10.3 (`~192ms` default and `~4.1ms` exact/no-AA), while synthetic full-surface gradient stress cases remain slower because stricter AA checks do more work.
40
+ - Documented the real benchmark tradeoff for the 0.11 metric changes instead of leaving the release note at “metric values can change.”
41
+
42
+ **Full Changelog**: https://github.com/vizzly-testing/honeydiff/compare/v0.11.0...v0.11.1
43
+
8
44
  ## [0.11.0] - 2026-06-20
9
45
 
10
46
  ## What's Changed
package/README.md CHANGED
@@ -53,8 +53,11 @@ Most image diff packages stop at basic pixel comparison. Honeydiff gives you the
53
53
  pieces visual regression systems usually need once screenshots get real:
54
54
 
55
55
  - CIEDE2000 perceptual color thresholds, with `2.0` as the default.
56
- - Strict exact matching when you set `threshold: 0`.
56
+ - Zero perceptual tolerance with `threshold: 0`; disable AA and set
57
+ `minClusterSize: 1` for strict rendered-pixel matching.
57
58
  - Conservative anti-aliasing detection for font and sub-pixel rendering noise.
59
+ - RGBA-aware comparison that detects opacity changes and ignores RGB payload
60
+ hidden behind full transparency.
58
61
  - Variable-height screenshot support for full-page comparisons.
59
62
  - Diff, mask, and overlay image artifacts for debugging failures.
60
63
  - Spatial clusters, intensity stats, SSIM, GMSD, and diff fingerprints.
@@ -162,9 +165,9 @@ await saveColorBlindnessSimulation(
162
165
 
163
166
  | Option | Default | Notes |
164
167
  | --- | --- | --- |
165
- | `threshold` | `2.0` | CIEDE2000 Delta E threshold. Use `0` for exact matching. |
168
+ | `threshold` | `2.0` | CIEDE2000 Delta E threshold. Use `0` for zero perceptual tolerance. |
166
169
  | `antialiasing` | `true` | Ignore likely anti-aliased pixels. |
167
- | `maxDiffs` | unlimited | Stop after a maximum number of differing pixels. |
170
+ | `maxDiffs` | unlimited | Stop after a maximum number of differing pixels. Capped results classify from the pixels observed before early exit, without cluster filtering. |
168
171
  | `includeDiffPixels` | `false` | Return individual differing pixel positions and intensities. |
169
172
  | `includeClusters` | `false` | Return connected regions of visual change. |
170
173
  | `minClusterSize` | `2` | Filter tiny isolated clusters as noise. |
@@ -204,7 +207,7 @@ Honeydiff uses CIEDE2000 Delta E for perceptual color difference.
204
207
 
205
208
  | Threshold | Meaning |
206
209
  | --- | --- |
207
- | `0` | Exact pixel matching. |
210
+ | `0` | No Delta E tolerance; AA and cluster filtering still apply if enabled. |
208
211
  | `1` | Barely noticeable color changes. |
209
212
  | `2` | Recommended default for UI screenshots. |
210
213
  | `3+` | More tolerant of rendering differences. |
@@ -213,7 +216,7 @@ The default is intentionally practical for browser and app screenshots: it
213
216
  filters tiny rendering variance while still catching meaningful UI changes.
214
217
 
215
218
  The cited algorithms and standards are listed in the repo's
216
- [References](../../docs/REFERENCES.md), including CIEDE2000, SSIM, MS-SSIM,
219
+ [References](https://github.com/vizzly-testing/honeydiff/blob/main/docs/REFERENCES.md), including CIEDE2000, SSIM, MS-SSIM,
217
220
  GMSD, Brettel CVD simulation, sRGB, and WCAG contrast math.
218
221
 
219
222
  ## Performance
@@ -222,11 +225,12 @@ Current local benchmark snapshots:
222
225
 
223
226
  | Scenario | Result |
224
227
  | --- | ---: |
225
- | Full HD default comparison | ~18.9ms |
226
- | Full HD exact comparison | ~2.8ms |
227
- | Identical image fast path | ~0.34ms |
228
- | 4K default comparison | ~76.9ms |
229
- | 4K exact comparison | ~14.0ms |
228
+ | Vizzly screenshot default comparison | ~2.81ms |
229
+ | Vizzly screenshot strict/no-AA comparison | ~2.18ms |
230
+ | Tall screenshot default comparison | ~147ms |
231
+ | Tall screenshot strict/no-AA comparison | ~4.34ms |
232
+ | 1080p isolated SSIM | ~14.7ms |
233
+ | 1080p isolated GMSD | ~10.9ms |
230
234
 
231
235
  See [benchmarks/BENCHMARK_RESULTS.md](https://github.com/vizzly-testing/honeydiff/blob/main/benchmarks/BENCHMARK_RESULTS.md)
232
236
  for the current benchmark notes.
package/index.d.ts CHANGED
@@ -89,7 +89,7 @@ export interface DiffResult {
89
89
  diffClusters: DiffCluster[] | null;
90
90
  /** Statistical metrics about difference intensities (null unless includeDiffPixels is enabled) */
91
91
  intensityStats: IntensityStats | null;
92
- /** SSIM (Structural Similarity Index) perceptual score 0.0-1.0 (null unless includeSSIM is enabled) */
92
+ /** SSIM score, approximately -1.0 to 1.0 (null unless includeSSIM is enabled) */
93
93
  perceptualScore: number | null;
94
94
  /**
95
95
  * GMSD (Gradient Magnitude Similarity Deviation) score (null unless includeGMSD is enabled)
@@ -157,7 +157,7 @@ export interface CompareOptions {
157
157
  * Perceptual color difference threshold using CIEDE2000 (Delta E units)
158
158
  *
159
159
  * The CIEDE2000 standard provides intuitive, perceptually uniform thresholds:
160
- * - 0.0 = Exact pixel matching (strictest)
160
+ * - 0.0 = No Delta E tolerance; AA and cluster filtering remain independent
161
161
  * - 1.0 = Just Noticeable Difference (JND) - barely perceptible to trained observers
162
162
  * - 2.0 = Recommended default - ignores sub-pixel rendering variance, catches real differences
163
163
  * - 3.0+ = Permissive - high tolerance for rendering variations
@@ -168,12 +168,17 @@ export interface CompareOptions {
168
168
 
169
169
  /**
170
170
  * Enable anti-aliasing detection to ignore AA differences
171
+ *
172
+ * Suppression requires a luminance ramp plus strict cross-image evidence that
173
+ * raster coverage moved to a neighboring pixel. Stable edge recolors remain differences.
171
174
  * @default true
172
175
  */
173
176
  antialiasing?: boolean;
174
177
 
175
178
  /**
176
179
  * Maximum number of differences to detect before stopping
180
+ * Capped comparisons classify from observed pixel evidence because early
181
+ * exit cannot determine whether a complete cluster meets minClusterSize.
177
182
  * @default undefined (unlimited)
178
183
  */
179
184
  maxDiffs?: number;
@@ -194,7 +199,10 @@ export interface CompareOptions {
194
199
 
195
200
  /**
196
201
  * Calculate SSIM (Structural Similarity Index) perceptual score
197
- * WARNING: SSIM can be computationally expensive on large images
202
+ * This metric measures the source images independently of threshold and AA
203
+ * filtering. Transparent inputs are evaluated over black and white mattes,
204
+ * keeping the more conservative score.
205
+ * WARNING: SSIM can use substantial memory on large images.
198
206
  * @default false
199
207
  */
200
208
  includeSSIM?: boolean;
@@ -205,6 +213,8 @@ export interface CompareOptions {
205
213
  * GMSD is very fast and highly sensitive to edge/structural changes.
206
214
  * Useful for detecting border thickness changes, font weight shifts,
207
215
  * and icon updates.
216
+ * A score of 0 does not prove image identity; uniform changes can have no
217
+ * spatial variation in gradient degradation.
208
218
  *
209
219
  * **Note:** For variable-height comparisons, GMSD is calculated on the
210
220
  * overlapping region shared by both images.
@@ -223,9 +233,9 @@ export interface CompareOptions {
223
233
  * This helps ignore run-to-run rendering variance (scattered single pixels)
224
234
  * while still catching real visual changes (grouped pixel differences).
225
235
  *
226
- * - 1 = Exact matching - any different pixel counts
236
+ * - 1 = Any surviving diff pixel counts
227
237
  * - 2 = Default - filters single isolated pixels as noise
228
- * - 3+ = More permissive - only larger clusters detected
238
+ * - 3+ = More aggressive noise filtering
229
239
  *
230
240
  * When set to a value > 1, clustering is automatically enabled.
231
241
  * @default 2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vizzly-testing/honeydiff",
3
- "version": "0.11.0",
3
+ "version": "0.12.0",
4
4
  "description": "High-performance image diffing for Node.js - Native bindings to Honeydiff Rust library",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -59,6 +59,7 @@
59
59
  "devDependencies": {
60
60
  "@biomejs/biome": "2.3.8",
61
61
  "@types/node": "^24.10.1",
62
+ "pngjs": "^7.0.0",
62
63
  "typescript": "^5.9.3"
63
64
  },
64
65
  "bugs": {