Replies: 1 comment
|
Yes. In Jimp 1.x, import the import { Jimp, diff } from 'jimp';
const before = await Jimp.read('before.png');
const after = await Jimp.read('after.png');
const result = diff(before, after, 0.1);
await result.image.write('difference.png');
console.log(result.percent);
Tested with Jimp 1.6.1: identical inputs produced a fraction of 0, entirely different solid-color inputs produced 1, and the resulting difference PNG decoded at the expected dimensions. Documented |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
As title says, I was wondering if I can get a difference image resulting of the comparison of two images?
All reactions