Getting an error UnhandledPromiseRejectionWarning: TypeError: ImageData expected with images of different width
ua834 opened this issue · comments
ua834 commented
When there is a diff and normalise function is being used I get this error. Happens with node v12.18.1 in Uubuntu 20.04.
packges:
"@andreekeberg/imagedata": "^1.0.2",
"pngjs": "^6.0.0",
"resemblejs": "^3.2.5"
canvas version inside node_modules is "2.6.1"
my code:
`ar compare = async function(imgPath1, imgPath2){
return new Promise(async (resolve, reject) => {
const img1 = getSync(imgPath1);
const img2 = getSync(imgPath2);
resemble(img1)
.compareTo(img2)
// .scaleToSameSize()
// .ignoreColors()
.onComplete(function(data) {
resolve(data);
});
})
}`
Images I've used for comparison:
James Cryer commented
It not clear what the error is. Worth updgrading to the latest Resenble which uses Canvas@2.8.0