| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
image-diff is a high-performance CLI tool designed for visual regression testing and dataset validation. It provides structural and pixel-level comparison of images with instant terminal-native previews.
Ensure you have Rust installed, then clone and build:
git clone https://github.com/cachevector/image-diff
cd image-diff
cargo build --releaseThe binary will be available at ./target/release/image-diff.
image-diff baseline.png screenshot.png --preview --output diff.pngimage-diff ./goldens/ ./screenshots/ --threshold 0.1Fail the build if any differences are found and output machine-readable results:
image-diff a.png b.png --json --fail-on-diffIgnore parts of the image that change frequently using coordinates:
image-diff a.png b.png --ignore 0,0,100,50Use an image as a mask. Black pixels in the mask image will be ignored in the comparison:
image-diff a.png b.png --mask mask.png| Option | Description | Default |
|---|---|---|
| -t, --threshold | Sensitivity for pixel comparison (0.0 to 1.0) | 0.1 |
| -p, --preview | Render a low-res diff heatmap in the terminal | false |
| -o, --output | Path to save the high-res diff overlay image | None |
| -i, --ignore | Ignore region in x,y,w,h format | [] |
| -m, --mask | Path to a mask image (black = ignore) | None |
| --review | Interactive review mode for directory diffs | false |
| --json | Output machine-readable results in JSON format | false |
| --fail-on-diff | Return exit code 1 if differences are detected | false |
| Back | FazBrowse Home | New Git URL |