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.)
Loading an image while in a worker fails.
Uncaught (in promise) Error: ReferenceError: Image is not definedError is caused by image load module, get-pixels. This packages is supposed to work in both
Nodeandbrowser. TheImageclass is only accessible with DOM so get-pixel probably uses thebrowserscript while being executed in worker.Solution: find way to force get-pixels to use it's
Nodelogic to load images. (Not sure if Node scripts likefswill work inside worker.)