@vizzly-testing/honeydiff 0.4.3 → 0.5.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 +43 -0
- package/index.d.ts +12 -20
- package/package.json +7 -1
- package/platforms/index-aarch64-apple-darwin.node +0 -0
- package/platforms/index-aarch64-unknown-linux-gnu.node +0 -0
- package/platforms/index-x86_64-pc-windows-msvc.node +0 -0
- package/platforms/index-x86_64-unknown-linux-gnu.node +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,49 @@ 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
|
+
## [0.5.0] - 2025-12-04
|
|
9
|
+
|
|
10
|
+
## What's Changed
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
**⚠️ BREAKING CHANGE: Switched from YIQ to CIEDE2000 for perceptual color comparison**
|
|
15
|
+
|
|
16
|
+
The image comparison algorithm has been upgraded to use the industry-standard CIEDE2000 (Delta E) metric, providing superior perceptual accuracy compared to the previous YIQ approach.
|
|
17
|
+
|
|
18
|
+
**API Changes:**
|
|
19
|
+
- **Removed:** `colorThreshold` option (0.0-1.0 scale)
|
|
20
|
+
- **Removed:** `pixelTolerance` option (0-255 scale)
|
|
21
|
+
- **Removed:** `ignoreColors` option
|
|
22
|
+
- **Added:** `threshold` option using CIEDE2000 Delta E units with intuitive perceptual scale:
|
|
23
|
+
- `0.0` = Exact pixel matching (strictest)
|
|
24
|
+
- `1.0` = Just Noticeable Difference (JND) - barely perceptible to trained observers
|
|
25
|
+
- `2.0` = **Recommended default** - ignores sub-pixel rendering variance, catches real differences
|
|
26
|
+
- `3.0+` = Permissive - high tolerance for rendering variations
|
|
27
|
+
|
|
28
|
+
**Migration Guide:**
|
|
29
|
+
```typescript
|
|
30
|
+
// Before (v0.4.x)
|
|
31
|
+
const result = await compare('baseline.png', 'current.png', {
|
|
32
|
+
pixelTolerance: 10, // ❌ Removed
|
|
33
|
+
colorThreshold: 0.1, // ❌ Removed
|
|
34
|
+
ignoreColors: false // ❌ Removed
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
// After (v0.5.0)
|
|
38
|
+
const result = await compare('baseline.png', 'current.png', {
|
|
39
|
+
threshold: 2.0 // ✅ CIEDE2000 Delta E units (new default)
|
|
40
|
+
});
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
**Benefits:**
|
|
44
|
+
- More accurate perceptual color difference detection
|
|
45
|
+
- Aligns with CIE standards used in color science
|
|
46
|
+
- Better handling of subtle color variations
|
|
47
|
+
- Improved anti-aliasing detection accuracy
|
|
48
|
+
|
|
49
|
+
**Full Changelog**: https://github.com/vizzly-testing/honeydiff/compare/v0.4.3...v0.5.0
|
|
50
|
+
|
|
8
51
|
## [0.4.3] - 2025-12-01
|
|
9
52
|
|
|
10
53
|
## What's Changed
|
package/index.d.ts
CHANGED
|
@@ -93,19 +93,17 @@ export interface DiffResult {
|
|
|
93
93
|
|
|
94
94
|
export interface CompareOptions {
|
|
95
95
|
/**
|
|
96
|
-
*
|
|
97
|
-
*
|
|
98
|
-
*
|
|
96
|
+
* Perceptual color difference threshold using CIEDE2000 (Delta E units)
|
|
97
|
+
*
|
|
98
|
+
* The CIEDE2000 standard provides intuitive, perceptually uniform thresholds:
|
|
99
|
+
* - 0.0 = Exact pixel matching (strictest)
|
|
100
|
+
* - 1.0 = Just Noticeable Difference (JND) - barely perceptible to trained observers
|
|
101
|
+
* - 2.0 = Recommended default - ignores sub-pixel rendering variance, catches real differences
|
|
102
|
+
* - 3.0+ = Permissive - high tolerance for rendering variations
|
|
103
|
+
*
|
|
104
|
+
* @default 2.0
|
|
99
105
|
*/
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
/**
|
|
103
|
-
* Color difference threshold for YIQ comparison (0.0-1.0)
|
|
104
|
-
* Set to 0.0 to use RGB comparison (default)
|
|
105
|
-
* Set to 0.1 for odiff-style YIQ comparison
|
|
106
|
-
* @default 0.0
|
|
107
|
-
*/
|
|
108
|
-
colorThreshold?: number;
|
|
106
|
+
threshold?: number;
|
|
109
107
|
|
|
110
108
|
/**
|
|
111
109
|
* Enable anti-aliasing detection to ignore AA differences
|
|
@@ -113,12 +111,6 @@ export interface CompareOptions {
|
|
|
113
111
|
*/
|
|
114
112
|
antialiasing?: boolean;
|
|
115
113
|
|
|
116
|
-
/**
|
|
117
|
-
* Ignore color differences (compare only structure/brightness)
|
|
118
|
-
* @default false
|
|
119
|
-
*/
|
|
120
|
-
ignoreColors?: boolean;
|
|
121
|
-
|
|
122
114
|
/**
|
|
123
115
|
* Maximum number of differences to detect before stopping
|
|
124
116
|
* @default undefined (unlimited)
|
|
@@ -194,7 +186,7 @@ export type ImageInput = string | Buffer;
|
|
|
194
186
|
* @example
|
|
195
187
|
* ```typescript
|
|
196
188
|
* const result = await compare('baseline.png', 'current.png', {
|
|
197
|
-
*
|
|
189
|
+
* threshold: 2.0, // CIEDE2000 Delta E (default)
|
|
198
190
|
* includeSSIM: true
|
|
199
191
|
* });
|
|
200
192
|
*
|
|
@@ -238,7 +230,7 @@ export function quickCompare(img1: ImageInput, img2: ImageInput): Promise<boolea
|
|
|
238
230
|
* @example
|
|
239
231
|
* ```typescript
|
|
240
232
|
* const result = compareSync('baseline.png', 'current.png', {
|
|
241
|
-
*
|
|
233
|
+
* threshold: 3.0, // More lenient threshold
|
|
242
234
|
* includeClusters: true
|
|
243
235
|
* });
|
|
244
236
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vizzly-testing/honeydiff",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.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",
|
|
@@ -63,6 +63,12 @@
|
|
|
63
63
|
"load-platform.cjs",
|
|
64
64
|
"platforms/*.node",
|
|
65
65
|
"README.md",
|
|
66
|
+
"CHANGELOG.md",
|
|
67
|
+
"index.js",
|
|
68
|
+
"index.d.ts",
|
|
69
|
+
"load-platform.cjs",
|
|
70
|
+
"platforms/*.node",
|
|
71
|
+
"README.md",
|
|
66
72
|
"CHANGELOG.md"
|
|
67
73
|
],
|
|
68
74
|
"engines": {
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|