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

Error: Canvas area exceeds the maximum limit (width * height > 268435456) #3169

Open
q2apro opened this issue Apr 23, 2024 · 0 comments
Open

Comments

@q2apro
Copy link

q2apro commented Apr 23, 2024

Bug:

Image is not created in Safari if the element is huge. Browsers Chrome and Edge work, however.

Error in the Safari console is: "Canvas area exceeds the maximum limit (width * height > 268435456)"

I tried to use the scale option but it seems to have no effect. I assume the code tries to create the canvas - and scales only afterwards. So the error persists.

image

How to fix this?


Update 1: I checked the image dimensions. It is 21504025 pixels area, so the 268435456 have not been exceeded.

image

Update 2:

I just learned that Safari has a maximum area limit of ONLY 5242880 pixels. See here: https://stackoverflow.com/a/23391599/1066234

Chrome: Maximum area: 268,435,456 pixels
Firefox: Maximum area: 472,907,776 pixels

⚠️ Safari: ONLY 5,242,880 pixels

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

1 participant