Comments (1)
Thank you for the well composed bug-report!
This was an error in the documentation. The first parameter is the typical Node error object for callbacks (when there was an error - not a difference). The second parameter, however, holds detailed information about the comparison - including the result. I updated the documentation and now the results are consistent. The code should look something like this:
#!/usr/bin/env node
BlinkDiff = require('blink-diff');
var diff = new BlinkDiff({
imageAPath: 'people.png',
imageBPath: 'people2.png',
imageOutputPath: 'blink-diff-people.png',
verbose: true
});
diff.run(function (error, result) {
console.log(diff.hasPassed(result.code) ? 'Passed' : 'Failed with ' + result.differences + ' differences - ' + error);
});
Thanks! 👍
from blink-diff.
Related Issues (20)
- 'blink-diff' is not recognized as an internal or external command, operable program or batch file. HOT 1
- No Composition Still Composing
- Can't have a delta equal to zero HOT 3
- Error with perceptual mode HOT 6
- Please upgrade pngjs version to support latest node engine
- Error: ERROR: Unsupported bit depth 4
- Ignores completely new additions HOT 4
- Comparison not accurate
- Get output result file
- Status of project HOT 1
- Return image buffer instead writing to output HOT 2
- threshold percentage value seems to be getting ignored
- blink-diff shows Differences as '0%' & returns 'FAIL' as result
- Feature Request: Option for output diff to be in landscape mode as opposed to portrait HOT 1
- TypeError: this._loadImage is not a function
- showing "real" diffs? HOT 2
- Including this in a project results in a missing module error for 'node-zlib-backport'
- How to do perceptual comparison from command-line HOT 1
- How to generate Image output only if images are different
- README.md with invalid param
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from blink-diff.