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

Handle too large images #78

Open
tomayac opened this issue Feb 16, 2022 · 2 comments
Open

Handle too large images #78

tomayac opened this issue Feb 16, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@tomayac
Copy link
Owner

tomayac commented Feb 16, 2022

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.

@tomayac tomayac added the bug Something isn't working label Feb 19, 2022
@princefishthrower
Copy link

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?

@tomayac
Copy link
Owner Author

tomayac commented Oct 24, 2022

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
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants