@blazediff/cli 5.0.5 → 6.0.1
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 +23 -22
- package/dist/cli.js +1576 -1288
- package/dist/commands/core-native.js +9341 -89
- package/dist/commands/core-wasm.js +147 -126
- package/dist/commands/core.js +884 -564
- package/dist/commands/gmsd.js +178 -175
- package/dist/commands/hitchhikers-ssim.js +172 -152
- package/dist/commands/msssim.js +163 -146
- package/dist/commands/ssim.js +264 -250
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -29,37 +29,38 @@ BlazeDiff supports multiple comparison algorithms, each optimized for different
|
|
|
29
29
|
The fastest option. Uses the native Rust binary with SIMD optimization for maximum performance.
|
|
30
30
|
|
|
31
31
|
```bash
|
|
32
|
-
blazediff-cli image1.png image2.png diff.png [options]
|
|
32
|
+
blazediff-cli image1.png image2.png -o diff.png [options]
|
|
33
33
|
# Or explicitly:
|
|
34
|
-
blazediff-cli core-native image1.png image2.png diff.png [options]
|
|
34
|
+
blazediff-cli core-native image1.png image2.png -o diff.png [options]
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
- `-
|
|
40
|
-
-
|
|
41
|
-
-
|
|
42
|
-
-
|
|
37
|
+
`core-native`, `core` and `core-wasm` take the same flags as the Rust `blazediff` CLI:
|
|
38
|
+
|
|
39
|
+
- `-o, --output <path>` - Output path for the diff image
|
|
40
|
+
- `-t, --threshold <num>` - Matching threshold (0 to 1, default: 0.1)
|
|
41
|
+
- `--no-antialiasing` - Count anti-aliased pixels as differences (detection is on by default)
|
|
42
|
+
- `--metric <name>` - Color metric: yiq (default) or oklab (pixelmatch 8)
|
|
43
|
+
- `--mask <path>` - Image whose non-black pixels are skipped
|
|
44
|
+
- `--window <n>` - Also report the n×n window with the most differences
|
|
45
|
+
- `-a, --alpha <num>` - Opacity of the original image in the diff (default: 0.1)
|
|
46
|
+
- `--diff-color <r,g,b>` - Color for different pixels (default: 255,0,0)
|
|
47
|
+
- `--diff-color-alt <r,g,b>` - Color for pixels that get darker (default: diff color)
|
|
48
|
+
- `--aa-color <r,g,b>` - Color for anti-aliased pixels (default: 255,255,0)
|
|
49
|
+
- `--background <faded|transparent>` - What the diff image shows under the diff (default: faded)
|
|
50
|
+
- `--json` - Print the result object as JSON
|
|
51
|
+
|
|
52
|
+
`core-native` also takes `--compression <0-9>` and `--quality <1-100>`. `core` and `core-wasm` also take `--codec <pngjs|sharp|jsquash-png>`.
|
|
43
53
|
|
|
44
|
-
|
|
45
|
-
|
|
54
|
+
Exit codes: 0 identical, 1 the images differ or their dimensions do not match, 2 error.
|
|
55
|
+
|
|
56
|
+
### `core` and `core-wasm` - JavaScript and WebAssembly pixel comparison
|
|
57
|
+
No native dependencies. `core-wasm` runs the same Rust algorithm as `core-native`.
|
|
46
58
|
|
|
47
59
|
```bash
|
|
48
60
|
blazediff-cli core image1.png image2.png [options]
|
|
61
|
+
blazediff-cli core-wasm image1.png image2.png [options]
|
|
49
62
|
```
|
|
50
63
|
|
|
51
|
-
**Options:**
|
|
52
|
-
- `-o, --output <path>` - Output path for the diff image
|
|
53
|
-
- `-t, --threshold <num>` - Matching threshold (0 to 1, default: 0.1)
|
|
54
|
-
- `-a, --alpha <num>` - Opacity of original image in diff (default: 0.1)
|
|
55
|
-
- `--aa-color <r,g,b>` - Color for anti-aliased pixels (default: 255,255,0)
|
|
56
|
-
- `--diff-color <r,g,b>` - Color for different pixels (default: 255,0,0)
|
|
57
|
-
- `--diff-color-alt <r,g,b>` - Alternative color for dark differences
|
|
58
|
-
- `--include-aa` - Include anti-aliasing detection
|
|
59
|
-
- `--diff-mask` - Draw diff over transparent background
|
|
60
|
-
- `--codec <name>` - Specify codec to use (pngjs, sharp, jsquash-png)
|
|
61
|
-
- `-h, --help` - Show help message
|
|
62
|
-
|
|
63
64
|
### `gmsd` - Gradient Magnitude Similarity Deviation
|
|
64
65
|
Perceptual quality metric based on gradient similarity.
|
|
65
66
|
|