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

Web Worker support? #7

Closed
cleversprocket opened this issue Oct 4, 2021 · 2 comments
Closed

Web Worker support? #7

cleversprocket opened this issue Oct 4, 2021 · 2 comments
Labels
question Further information is requested

Comments

@cleversprocket
Copy link

First I want to say thank you for this project!

I was hoping to use it in a web worker to move image processing off of the main thread. However, when new Vips() is instantiated a ReferenceError: window is not defined is thrown because window is not available to workers. It looks to be coming from emscripten.

Any ideas on how to compile for a worker?

@cleversprocket
Copy link
Author

I see now why it is failing, it's because this package instantiates a web worker and I cannot call it from within a worker.

@kleisauke kleisauke added the question Further information is requested label Apr 27, 2022
@kleisauke
Copy link
Owner

For further readers; I think this should work without issues. See: #15 (comment).

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

No branches or pull requests

2 participants