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

[Feature Request] Web Worker support #661

Open
endlacer opened this issue Nov 25, 2024 · 2 comments
Open

[Feature Request] Web Worker support #661

endlacer opened this issue Nov 25, 2024 · 2 comments

Comments

@endlacer
Copy link

Hello all (and @Mawi137)
just a quick question. Is it possible to add Web Worker support?
I could try it myself but before I start implementing anything, I thought I ask if it is even wanted/doable.

Do you see any problems with it? I think I would start by adding a opt-in option to use webworkers, sounds good?

@Mawi137
Copy link
Owner

Mawi137 commented Nov 26, 2024

Hi there

Sound like a very good idea. The operations on the canvas are quite heavy so it would indeed be nice to offload that to a worker. I have no idea if that's possible or whether there are limitations though.

@Mawi137
Copy link
Owner

Mawi137 commented Nov 26, 2024

Just had a quick chat with ChatGPT and it seems like a worker cannot load the images itself, but by using OffscreenCanvas, it should be able to draw it on a canvas and then return the result of toBlob.

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

2 participants