@blazediff/bin 0.7.1 → 0.7.2

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.
Files changed (2) hide show
  1. package/README.md +65 -0
  2. package/package.json +5 -5
package/README.md ADDED
@@ -0,0 +1,65 @@
1
+ # @blazediff/bin
2
+
3
+ <div align="center">
4
+
5
+ [![npm bundle size](https://img.shields.io/bundlephobia/min/%40blazediff%2Fbin)](https://www.npmjs.com/package/@blazediff/bin)
6
+ [![NPM Downloads](https://img.shields.io/npm/dy/%40blazediff%2Fbin)](https://www.npmjs.com/package/@blazediff/bin)
7
+
8
+ </div>
9
+
10
+ Command-line interface for the BlazeDiff image comparison library.
11
+
12
+ ## Installation
13
+
14
+ ```bash
15
+ npm install -g @blazediff/bin
16
+ ```
17
+
18
+ ## Usage
19
+
20
+ ```bash
21
+ blazediff <image1> <image2> [options]
22
+ ```
23
+
24
+ **Arguments:**
25
+ - `image1` - Path to the first image
26
+ - `image2` - Path to the second image
27
+
28
+ **Options:**
29
+ - `-o, --output <path>` - Output path for the diff image
30
+ - `-t, --threshold <num>` - Matching threshold (0 to 1, default: 0.1)
31
+ - `-a, --alpha <num>` - Opacity of original image in diff (default: 0.1)
32
+ - `--aa-color <r,g,b>` - Color for anti-aliased pixels (default: 255,255,0)
33
+ - `--diff-color <r,g,b>` - Color for different pixels (default: 255,0,0)
34
+ - `--diff-color-alt <r,g,b>` - Alternative color for dark differences
35
+ - `--include-aa` - Include anti-aliasing detection
36
+ - `--diff-mask` - Draw diff over transparent background
37
+ - `--transformer <name>` - Specify transformer to use (pngjs, sharp)
38
+ - `--color-space <name>` - Specify color space to use (yiq, ycbcr)
39
+ - `-h, --help` - Show help message
40
+
41
+ ## Examples
42
+
43
+ ```bash
44
+ # Basic comparison
45
+ blazediff image1.png image2.png
46
+
47
+ # Save diff image with custom threshold
48
+ blazediff image1.png image2.png -o diff.png -t 0.05
49
+
50
+ # Use Sharp transformer for better performance
51
+ blazediff image1.png image2.png --transformer sharp -o diff.png
52
+
53
+ # JPEG support (requires Sharp transformer)
54
+ blazediff image1.jpg image2.jpg --transformer sharp -o diff.png
55
+ ```
56
+
57
+ ## Transformers
58
+
59
+ - **pngjs** - Pure JavaScript, works everywhere. Supports PNG only.
60
+ - **sharp** - Native bindings, significantly faster. Supports PNG and JPEG.
61
+
62
+ ## Exit Codes
63
+
64
+ - `0` - Images are identical
65
+ - `1` - Images have differences or error occurred
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blazediff/bin",
3
- "version": "0.7.1",
3
+ "version": "0.7.2",
4
4
  "description": "Command-line interface for the blazediff image comparison library",
5
5
  "private": false,
6
6
  "publishConfig": {
@@ -37,10 +37,10 @@
37
37
  "homepage": "https://github.com/teimurjan/blazediff",
38
38
  "license": "MIT",
39
39
  "dependencies": {
40
- "@blazediff/core": "0.7.1",
41
- "@blazediff/pngjs-transformer": "0.7.1",
42
- "@blazediff/sharp-transformer": "0.7.1",
43
- "@blazediff/types": "0.7.1"
40
+ "@blazediff/core": "0.7.2",
41
+ "@blazediff/pngjs-transformer": "0.7.2",
42
+ "@blazediff/sharp-transformer": "0.7.2",
43
+ "@blazediff/types": "0.7.2"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@types/node": "^24.3.0",