Skip to content

v8.2.0

Compare
Choose a tag to compare
@KuznetsovRoman KuznetsovRoman released this 25 Sep 10:08
· 18 commits to master since this release

πŸš€ Improvements:

Add an ability to calculate image difference and image equality simultaneously

If you need both co compare images and create diff image, you can pass option createDiffImage: true,
it would work faster than two separate function calls:

const {
    equal,
    diffImage,
    differentPixels,
    totalPixels,
    diffBounds,
    diffClusters
} = await looksSame('image1.png', 'image2.png', {createDiffImage: true});

if (!equal) {
    await diffImage.save('diffImage.png');
}