img-diff-rect
v1.0.2
Published
mark differences of two images in rectangles
Downloads
5
Maintainers
Readme
img-diff-rect
Mark differences of two images in rectangles based on x-img-diff-js.
Demo
Usage
You need Node.js >= v8.0.0
const imgDiffRect = require('img-diff-rect');
imgDiffRect({
originImg: './origin.png',
expectedImg: './expected.png',
outputDir: './output',
}).then((result) => {
console.log(result);
// {
// isDifferent: true,
// originOutputImg: './output/origin.png',
// expectedOutputImg: './output/expected.png',
// }
});
Type
DifferOption
interface DifferOption {
originImg: string;
expectedImg: string;
outputDir?: string;
}
DifferResult
interface DifferResult {
isDifferent: boolean;
originOutputImg?: string;
expectedOutputImg?: string;
}