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

Problem when using images ('Image given has not completed loading') #254

Closed
jhadenfeldt opened this issue Jan 31, 2013 · 1 comment
Closed

Comments

@jhadenfeldt
Copy link

Whenever I try to load an image from the disk, I end up with this error:

ctx.drawImage(img, 0, 0);

Error: Image given has not completed loading

In this case, I used the greyscale-image.js.

I running node v0.8.18 on Ubuntu Server 12.10 with libcairo2 v1.12.2, libcairo2-dev v1.12.2 and libjpeg-dev 8c.

@codeincontext
Copy link

Are you calling that immediately, or in the img.onload function?

Try img.onload = function() { ctx.drawImage(img, 0, 0); }

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

No branches or pull requests

3 participants