Crates.io | dify |
lib.rs | dify |
version | 0.7.4 |
source | src |
created_at | 2021-03-20 07:33:05.21433 |
updated_at | 2024-10-04 15:51:02.789186 |
description | A fast pixel-by-pixel image comparison tool in Rust |
homepage | https://github.com/jihchi/dify |
repository | https://github.com/jihchi/dify.git |
max_upload_size | |
id | 371289 |
size | 79,439 |
Feature | |
---|---|
.png , .jpg , .jpeg , or .bmp format supported |
✅ |
Compares different format, .png vs .jpg for example |
✅ |
Compares different dimensions | ✅ |
Anti-aliasing support | ✅ |
Blockout areas support | ✅ |
Supports macOS, Linux and Windows | ✅ |
expected | actual | diff |
---|---|---|
The expected and actual image are coming from mapbox/pixelmatch
Download the binaries for your platform from release page.
Please refer to dify-bin
npm package, it is a node.js wrapper for dify executable file:
npm install -g dify-bin # or `yarn global add dify-bin`
dify --help
dify left.jpg right.jpg
Checkout diff.png
if a.jpg
and b.jpg
are different.
For more details, see dify --help
.
docker run -v $(pwd):/mnt/dify ghcr.io/jihchi/dify left.jpg right.jpg
Test data is coming from mtrKovalenko/odiff
hyperfine \
--warmup 1 \
--ignore-failure \
--export-markdown bench-dify.md \
'dify tiger.jpg tiger-2.jpg -o tiger-diff.png' \
'dify water-4k.png water-4k-2.png -o water-diff.png' \
'dify www.cypress.io.png www.cypress.io-2.png -o www.cypress.io-diff.png'
Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
---|---|---|---|---|
dify tiger.jpg tiger-2.jpg -o tiger-diff.png |
40.2 ± 0.4 | 39.6 | 42.3 | 1.00 |
dify water-4k.png water-4k-2.png -o water-diff.png |
1754.9 ± 23.3 | 1716.2 | 1799.6 | 43.68 ± 0.74 |
dify www.cypress.io.png www.cypress.io-2.png -o www.cypress.io-diff.png |
1228.0 ± 17.6 | 1203.6 | 1251.7 | 30.56 ± 0.54 |
Ran on MacBook Pro (13-inch, 2019, Two Thunderbolt 3 ports), macOS Catalina 10.15.7.
See the open issues for a list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
git checkout -b feature/AmazingFeature
)git commit -m 'Add some AmazingFeature'
)git push origin feature/AmazingFeature
)Distributed under the MIT License. See LICENSE
for more information.
Many thanks for your help!
The image of contributors is made with contrib.rocks.