dssim is a tool to compute the (dis)similarity between two or more PNG images using an algorithm approximating human vision.
Comparison is done using the SSIM algorithm (based on Rabah Mehdi's implementation) at multiple weighed resolutions.
- The npm package version doesn't follow semver but matches the
dssim
binary versions instead. - dssim@2.8.0 is a complete rewrite in Rust and is currently not supported. If you can help me setting up a build pipeline on Travis CI with precompiled binaries for Linux, Windows and macOS for this package, please open a PR.
To compile dssim, pkg-config
needs to be installed first (e.g. via apt-get install pgk-config
on Debian/Ubuntu or via Homebrew's brew install pkg-config
command on OS X).
$ npm install --save dssim-bin
var execFile = require('child_process').execFile;
var dssim = require('dssim-bin');
var args = [
// ...
];
execFile(dssim, args, function (err) {
console.log('Image minified');
});
$ npm install --global dssim-bin
$ dssim --help