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

Image doesn't work in Worker #1

Open
casperlamboo opened this issue Mar 20, 2016 · 1 comment
Open

Image doesn't work in Worker #1

casperlamboo opened this issue Mar 20, 2016 · 1 comment

Comments

@casperlamboo
Copy link
Owner

Loading an image while in a worker fails.

Uncaught (in promise) Error: ReferenceError: Image is not defined

Error is caused by image load module, get-pixels. This packages is supposed to work in both Node and browser. The Image class is only accessible with DOM so get-pixel probably uses the browser script while being executed in worker.

Solution: find way to force get-pixels to use it's Node logic to load images. (Not sure if Node scripts like fs will work inside worker.)

@casperlamboo
Copy link
Owner Author

Note: images can still be used when they are send to the Worker via the transfer function.

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

No branches or pull requests

1 participant