@blazediff/bin 3.1.1 → 3.2.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 +4 -8
- package/dist/index.d.ts +0 -2
- package/dist/index.js +0 -2
- package/dist/index.mjs +0 -2
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/@blazediff/bin)
|
|
6
6
|
[](https://www.npmjs.com/package/@blazediff/bin)
|
|
7
|
+
[](https://crates.io/crates/blazediff)
|
|
7
8
|
|
|
8
9
|
</div>
|
|
9
10
|
|
|
@@ -27,6 +28,8 @@ The fastest single-threaded image diff in the world. Native Rust implementation
|
|
|
27
28
|
npm install @blazediff/bin
|
|
28
29
|
```
|
|
29
30
|
|
|
31
|
+
Also available as a Rust crate: [`cargo install blazediff`](https://crates.io/crates/blazediff)
|
|
32
|
+
|
|
30
33
|
Pre-built [binaries](https://github.com/teimurjan/blazediff/tree/main/packages/bin/binaries) are included for:
|
|
31
34
|
- macOS ARM64 (Apple Silicon)
|
|
32
35
|
- macOS x64 (Intel)
|
|
@@ -96,12 +99,6 @@ Compare two images (PNG or JPEG) and generate a diff image. Format is auto-detec
|
|
|
96
99
|
<td>false</td>
|
|
97
100
|
<td>Output only differences with transparent background</td>
|
|
98
101
|
</tr>
|
|
99
|
-
<tr>
|
|
100
|
-
<td><code>failOnLayoutDiff</code></td>
|
|
101
|
-
<td>boolean</td>
|
|
102
|
-
<td>false</td>
|
|
103
|
-
<td>Fail immediately if images have different dimensions</td>
|
|
104
|
-
</tr>
|
|
105
102
|
</table>
|
|
106
103
|
|
|
107
104
|
### Result Types
|
|
@@ -174,7 +171,6 @@ Options:
|
|
|
174
171
|
-t, --threshold <THRESHOLD> Color difference threshold (0.0-1.0) [default: 0.1]
|
|
175
172
|
-a, --antialiasing Enable anti-aliasing detection
|
|
176
173
|
--diff-mask Output only differences (transparent background)
|
|
177
|
-
--fail-on-layout Fail on layout (size) difference
|
|
178
174
|
-c, --compression <LEVEL> PNG compression level (0-9, 0=fastest, 9=smallest) [default: 0]
|
|
179
175
|
-q, --quality <QUALITY> JPEG quality (1-100) [default: 90]
|
|
180
176
|
--output-format <FORMAT> Output format (json or text) [default: json]
|
|
@@ -194,7 +190,7 @@ Input images can be mixed formats (e.g., compare PNG to JPEG). Output format is
|
|
|
194
190
|
### Exit Codes
|
|
195
191
|
|
|
196
192
|
- `0` - Images are identical
|
|
197
|
-
- `1` - Images differ (
|
|
193
|
+
- `1` - Images differ (includes layout/size mismatch)
|
|
198
194
|
- `2` - Error (file not found, invalid format, etc.)
|
|
199
195
|
|
|
200
196
|
## Performance
|
package/dist/index.d.ts
CHANGED
|
@@ -5,8 +5,6 @@ interface BlazeDiffOptions {
|
|
|
5
5
|
antialiasing?: boolean;
|
|
6
6
|
/** Output only differences with transparent background */
|
|
7
7
|
diffMask?: boolean;
|
|
8
|
-
/** Fail immediately if images have different dimensions */
|
|
9
|
-
failOnLayoutDiff?: boolean;
|
|
10
8
|
/** PNG compression level (0-9, 0=fastest/largest, 9=slowest/smallest) */
|
|
11
9
|
compression?: number;
|
|
12
10
|
/** JPEG quality (1-100). Default: 90 */
|
package/dist/index.js
CHANGED
|
@@ -145,7 +145,6 @@ function convertToNapiOptions(options) {
|
|
|
145
145
|
threshold: options?.threshold,
|
|
146
146
|
antialiasing: options?.antialiasing,
|
|
147
147
|
diffMask: options?.diffMask,
|
|
148
|
-
failOnLayout: options?.failOnLayoutDiff,
|
|
149
148
|
compression: options?.compression,
|
|
150
149
|
quality: options?.quality
|
|
151
150
|
};
|
|
@@ -203,7 +202,6 @@ function buildArgs(diffOutput, options) {
|
|
|
203
202
|
args.push(`--threshold=${options.threshold}`);
|
|
204
203
|
if (options.antialiasing) args.push("--antialiasing");
|
|
205
204
|
if (options.diffMask) args.push("--diff-mask");
|
|
206
|
-
if (options.failOnLayoutDiff) args.push("--fail-on-layout");
|
|
207
205
|
if (options.compression !== void 0)
|
|
208
206
|
args.push(`--compression=${options.compression}`);
|
|
209
207
|
if (options.quality !== void 0) args.push(`--quality=${options.quality}`);
|
package/dist/index.mjs
CHANGED
|
@@ -103,7 +103,6 @@ function convertToNapiOptions(options) {
|
|
|
103
103
|
threshold: options?.threshold,
|
|
104
104
|
antialiasing: options?.antialiasing,
|
|
105
105
|
diffMask: options?.diffMask,
|
|
106
|
-
failOnLayout: options?.failOnLayoutDiff,
|
|
107
106
|
compression: options?.compression,
|
|
108
107
|
quality: options?.quality
|
|
109
108
|
};
|
|
@@ -161,7 +160,6 @@ function buildArgs(diffOutput, options) {
|
|
|
161
160
|
args.push(`--threshold=${options.threshold}`);
|
|
162
161
|
if (options.antialiasing) args.push("--antialiasing");
|
|
163
162
|
if (options.diffMask) args.push("--diff-mask");
|
|
164
|
-
if (options.failOnLayoutDiff) args.push("--fail-on-layout");
|
|
165
163
|
if (options.compression !== void 0)
|
|
166
164
|
args.push(`--compression=${options.compression}`);
|
|
167
165
|
if (options.quality !== void 0) args.push(`--quality=${options.quality}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blazediff/bin",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"description": "Native Rust binaries for blazediff - the fastest image diff in the world",
|
|
5
5
|
"private": false,
|
|
6
6
|
"publishConfig": {
|
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
"dist"
|
|
21
21
|
],
|
|
22
22
|
"optionalDependencies": {
|
|
23
|
-
"@blazediff/bin-darwin-arm64": "3.
|
|
24
|
-
"@blazediff/bin-darwin-x64": "3.
|
|
25
|
-
"@blazediff/bin-linux-arm64": "3.
|
|
26
|
-
"@blazediff/bin-linux-x64": "3.
|
|
27
|
-
"@blazediff/bin-win32-arm64": "3.
|
|
28
|
-
"@blazediff/bin-win32-x64": "3.
|
|
23
|
+
"@blazediff/bin-darwin-arm64": "3.2.0",
|
|
24
|
+
"@blazediff/bin-darwin-x64": "3.2.0",
|
|
25
|
+
"@blazediff/bin-linux-arm64": "3.2.0",
|
|
26
|
+
"@blazediff/bin-linux-x64": "3.2.0",
|
|
27
|
+
"@blazediff/bin-win32-arm64": "3.2.0",
|
|
28
|
+
"@blazediff/bin-win32-x64": "3.2.0"
|
|
29
29
|
},
|
|
30
30
|
"keywords": [
|
|
31
31
|
"image",
|