Skip to content

Handle too large images #78

Description

@tomayac

Right now it just fails:

colorworker.893f8723.js:1 Uncaught (in promise) RangeError: offset is out of bounds
    at Int8Array.set (<anonymous>)
    at colorworker.893f8723.js:1:3204
    at array (colorworker.893f8723.js:1:3213)
    at JA (colorworker.893f8723.js:1:3311)
    at E (colorworker.893f8723.js:1:71498)
    at eA (colorworker.893f8723.js:1:71745)
    at async colorworker.893f8723.js:1:72579

Ideally we catch this and retry with a reduced image size.

Activity

  1. princefishthrower commented on Oct 22, 2022

    @princefishthrower

    Same... i was actually surprised the image size this tool could handle, but I finally gave it something like 4500 x 3000 and it was failing. Does anyone know the max pixel dimensions / size this tool can take?

  2. tomayac commented on Oct 24, 2022

    @tomayac
    OwnerAuthor

    It may just be dynamic, dependent on the available memory of the device. The app already checks if the theoretical canvas size limits are respected:

    while (!canvasSize.test({ width, height })) {
    width = Math.floor(width / 2);
    height = Math.floor(height / 2);
    shrinkFactor /= 2;
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions