Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Image given has not completed loading #17

Closed
skyzyx opened this issue Sep 4, 2013 · 3 comments · Fixed by #31
Closed

Error: Image given has not completed loading #17

skyzyx opened this issue Sep 4, 2013 · 3 comments · Fixed by #31

Comments

@skyzyx
Copy link

skyzyx commented Sep 4, 2013

I'm getting the following error when running imagediff on the command line.

$ imagediff --diff "file_a.png" "file_b.png" "~/Desktop/file_diff.png"

/usr/local/lib/node_modules/imagediff/imagediff.js:113
    context.drawImage(image, 0, 0);
            ^
Error: Image given has not completed loading
    at toImageDataFromImage (/usr/local/lib/node_modules/imagediff/imagediff.js:113:13)
    at toImageData (/usr/local/lib/node_modules/imagediff/imagediff.js:101:35)
    at Object.imagediff.toImageData (/usr/local/lib/node_modules/imagediff/imagediff.js:352:14)
    at commandLine (/usr/local/lib/node_modules/imagediff/bin/imagediff:47:17)
    at Object.<anonymous> (/usr/local/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)
  • OS X 10.8.4
  • Node.js 0.10.17
  • Cairo and dependencies installed from MacPorts
  • Installed via sudo npm install -g imagediff
@cburgmer
Copy link
Contributor

Is this still an issue? Looking at the code, the image is used synchronously without waiting for it to load: https://github.com/HumbleSoftware/js-imagediff/blob/master/bin/imagediff#L50

This seems to work in most cases, but could explain your report.

@skyzyx
Copy link
Author

skyzyx commented Apr 22, 2014

It never ended up working, so I went straight to working directly with ImageMagick.

On Apr 21, 2014, at 3:12 PM, Christoph Burgmer notifications@github.com wrote:

Is this still an issue? Looking at the code, the image is used synchronously without waiting for it to load: https://github.com/HumbleSoftware/js-imagediff/blob/master/bin/imagediff#L50

This seems to work in most cases, but could explain your report.


Reply to this email directly or view it on GitHub.

@cesutherland
Copy link
Member

--diff wasn't supported.

There's still some issue with async loading (#31, #35, #39) but I'm calling this one closed!

97f51e3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants