HumbleSoftware/js-imagediff

Does not work from command line (Ubuntu 14.04)

Bogdan-Kalynovskyi opened this issue · 2 comments

Both modes do not work for me from command line::

dan@dan:~/Downloads$ imagediff -d image_103.jpg image_104.jpg diff.jpg
[Image image_103.jpg]

/usr/lib/node_modules/imagediff/imagediff.js:121
context.drawImage(image, 0, 0);
^
Error: Image given has not completed loading
at toImageDataFromImage (/usr/lib/node_modules/imagediff/imagediff.js:121:13)
at toImageData (/usr/lib/node_modules/imagediff/imagediff.js:108:35)
at Object.imagediff.toImageData (/usr/lib/node_modules/imagediff/imagediff.js:366:14)
at commandLine (/usr/lib/node_modules/imagediff/bin/imagediff:50:17)
at Object. (/usr/lib/node_modules/imagediff/bin/imagediff:6:1)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)

dan@dan:~/Downloads$ imagediff -e image_103.jpg image_104.jpg
[Image image_103.jpg]

/usr/lib/node_modules/imagediff/imagediff.js:121
context.drawImage(image, 0, 0);
^
Error: Image given has not completed loading
at toImageDataFromImage (/usr/lib/node_modules/imagediff/imagediff.js:121:13)
at toImageData (/usr/lib/node_modules/imagediff/imagediff.js:108:35)
at Object.imagediff.toImageData (/usr/lib/node_modules/imagediff/imagediff.js:366:14)
at commandLine (/usr/lib/node_modules/imagediff/bin/imagediff:50:17)
at Object. (/usr/lib/node_modules/imagediff/bin/imagediff:6:1)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)

Can you check whether the change implemented in #31 addresses this issue and works for you?

I think this should be sorted out with the merge of #31. It's possible Automattic/node-canvas#289 is still an issue. If you're still struggling, let me know!