@blazediff/cli 2.1.3 → 3.0.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/README.md +14 -13
- package/dist/cli.js +1972 -1477
- package/dist/commands/{bin.js → core-native.js} +10 -10
- package/dist/commands/core.js +1618 -1135
- package/dist/commands/gmsd.js +1608 -1125
- package/dist/commands/hitchhikers-ssim.js +1596 -1113
- package/dist/commands/msssim.js +1616 -1131
- package/dist/commands/ssim.js +1630 -1145
- package/dist/index.d.ts +7 -7
- package/package.json +5 -4
package/README.md
CHANGED
|
@@ -25,13 +25,13 @@ blazediff-cli <command> <image1> <image2> [options]
|
|
|
25
25
|
|
|
26
26
|
BlazeDiff supports multiple comparison algorithms, each optimized for different use cases:
|
|
27
27
|
|
|
28
|
-
### `
|
|
28
|
+
### `core-native` - Native binary comparison (default)
|
|
29
29
|
The fastest option. Uses the native Rust binary with SIMD optimization for maximum performance.
|
|
30
30
|
|
|
31
31
|
```bash
|
|
32
32
|
blazediff-cli image1.png image2.png diff.png [options]
|
|
33
33
|
# Or explicitly:
|
|
34
|
-
blazediff-cli
|
|
34
|
+
blazediff-cli core-native image1.png image2.png diff.png [options]
|
|
35
35
|
```
|
|
36
36
|
|
|
37
37
|
**Options:**
|
|
@@ -42,7 +42,7 @@ blazediff-cli bin image1.png image2.png diff.png [options]
|
|
|
42
42
|
- `-h, --help` - Show help message
|
|
43
43
|
|
|
44
44
|
### `core` - JavaScript pixel comparison
|
|
45
|
-
Pure JavaScript implementation. Slower than `
|
|
45
|
+
Pure JavaScript implementation. Slower than `core-native` but offers more customization options.
|
|
46
46
|
|
|
47
47
|
```bash
|
|
48
48
|
blazediff-cli core image1.png image2.png [options]
|
|
@@ -57,7 +57,7 @@ blazediff-cli core image1.png image2.png [options]
|
|
|
57
57
|
- `--diff-color-alt <r,g,b>` - Alternative color for dark differences
|
|
58
58
|
- `--include-aa` - Include anti-aliasing detection
|
|
59
59
|
- `--diff-mask` - Draw diff over transparent background
|
|
60
|
-
- `--
|
|
60
|
+
- `--codec <name>` - Specify codec to use (pngjs, sharp, jsquash-png)
|
|
61
61
|
- `-h, --help` - Show help message
|
|
62
62
|
|
|
63
63
|
### `gmsd` - Gradient Magnitude Similarity Deviation
|
|
@@ -71,7 +71,7 @@ blazediff-cli gmsd image1.png image2.png [options]
|
|
|
71
71
|
- `-o, --output <path>` - Output path for GMS similarity map
|
|
72
72
|
- `--downsample <0|1>` - Downsample factor (0=full-res, 1=2x, default: 0)
|
|
73
73
|
- `--gmsd-c <num>` - Stability constant (default: 170)
|
|
74
|
-
- `--
|
|
74
|
+
- `--codec <name>` - Specify codec to use (pngjs, sharp, jsquash-png)
|
|
75
75
|
- `-h, --help` - Show help message
|
|
76
76
|
|
|
77
77
|
### `ssim` - Structural Similarity Index
|
|
@@ -83,7 +83,7 @@ blazediff-cli ssim image1.png image2.png [options]
|
|
|
83
83
|
|
|
84
84
|
**Options:**
|
|
85
85
|
- `-o, --output <path>` - Output path for SSIM map visualization
|
|
86
|
-
- `--
|
|
86
|
+
- `--codec <name>` - Specify codec to use (pngjs, sharp, jsquash-png)
|
|
87
87
|
- `-h, --help` - Show help message
|
|
88
88
|
|
|
89
89
|
### `msssim` - Multi-Scale Structural Similarity Index
|
|
@@ -95,7 +95,7 @@ blazediff-cli msssim image1.png image2.png [options]
|
|
|
95
95
|
|
|
96
96
|
**Options:**
|
|
97
97
|
- `-o, --output <path>` - Output path for MS-SSIM map visualization
|
|
98
|
-
- `--
|
|
98
|
+
- `--codec <name>` - Specify codec to use (pngjs, sharp, jsquash-png)
|
|
99
99
|
- `-h, --help` - Show help message
|
|
100
100
|
|
|
101
101
|
### `hitchhikers-ssim` - Fast SSIM
|
|
@@ -110,7 +110,7 @@ blazediff-cli hitchhikers-ssim image1.png image2.png [options]
|
|
|
110
110
|
```bash
|
|
111
111
|
# Native binary diff (default, fastest)
|
|
112
112
|
blazediff-cli image1.png image2.png diff.png
|
|
113
|
-
blazediff-cli
|
|
113
|
+
blazediff-cli core-native image1.png image2.png diff.png -t 0.05 -a
|
|
114
114
|
|
|
115
115
|
# JavaScript pixel diff (more options)
|
|
116
116
|
blazediff-cli core image1.png image2.png -o diff.png -t 0.05
|
|
@@ -127,18 +127,19 @@ blazediff-cli ssim image1.png image2.png -o ssim-map.png
|
|
|
127
127
|
blazediff-cli msssim image1.png image2.png
|
|
128
128
|
blazediff-cli msssim image1.png image2.png -o msssim-map.png
|
|
129
129
|
|
|
130
|
-
# Use Sharp
|
|
131
|
-
blazediff-cli core image1.jpg image2.jpg --
|
|
130
|
+
# Use Sharp codec for better performance (core/gmsd/ssim)
|
|
131
|
+
blazediff-cli core image1.jpg image2.jpg --codec sharp
|
|
132
132
|
```
|
|
133
133
|
|
|
134
|
-
##
|
|
134
|
+
## Codecs (for `core`, `gmsd`, `ssim`, `msssim`)
|
|
135
135
|
|
|
136
|
-
- **pngjs** - Pure JavaScript, works everywhere. Supports PNG only.
|
|
136
|
+
- **pngjs** (default) - Pure JavaScript, works everywhere. Supports PNG only.
|
|
137
137
|
- **sharp** - Native bindings, significantly faster. Supports PNG and JPEG.
|
|
138
|
+
- **jsquash-png** - WASM-based, zero native deps. Faster than pngjs. PNG only.
|
|
138
139
|
|
|
139
140
|
## Exit Codes
|
|
140
141
|
|
|
141
|
-
###
|
|
142
|
+
### core-native/core Mode
|
|
142
143
|
- `0` - Images are identical
|
|
143
144
|
- `1` - Images have differences
|
|
144
145
|
- `2` - Error (file not found, invalid format, etc.)
|