onComplete call back not getting triggered in the latest version (3.0.1)
dineshmatta opened this issue · comments
I am trying to use the following code for comparing two images:
resemble('./1-dev.png')
.compareTo('./2-dev.png')
.ignoreNothing()
.onComplete(function(data) {
console.log(data)
data.getDiffImage().pack().pipe(fs.createWriteStream( './diff.png'));
});
but the code never gets executed inside onComplete callback, but if I downgrade to 2.3.x version then it works fine,
I believe the getDiffImage
method was only available in the node-resemble fork. With resemble.js 3.0.1 you can call fs.writeFileSync(
./diff.png, data.getBuffer());