Skip to content

Image doesn't work in Worker #1

Description

@casperlamboo

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.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions