img-compare

1.2.0 • Public • Published

img-compare

Image comparisons without any other system dependencies.

var comp = require("img-compare");
 
var config = {
    output: "diff.png",
    threshold: 50, // num of pixels allowed to differ    
};
 
comp(["test/01.png", "test/02.png"], config, function (err, out) {
    if (err) {
        console.log(err.message);
    }
    
    console.log(out); // out.status = fail/success.
                      // out.report = numpix: 1000, outfile: "diff.png"
});

NOTE: Works currently only on Mac OSX, Windows support coming soon

/img-compare/

    Package Sidebar

    Install

    npm i img-compare

    Weekly Downloads

    12

    Version

    1.2.0

    License

    ISC

    Last publish

    Collaborators

    • shakyshane