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

exports: Prevent exports over canvas max dimensions #1195

Merged
merged 1 commit into from
Apr 13, 2023

Conversation

berniexie
Copy link
Contributor

@berniexie berniexie commented Apr 13, 2023

According to https://developer.mozilla.org/en-US/docs/Web/HTML/Element/canvas, canvas has a max 32,767 for each dimension and a total area max of 268,435,456 pixels.

Here is a generated png of the problematic d2 code before:
demo.png.zip
I can't even upload the actual png because the file side is too big

Closes #1093
closes #964

@berniexie berniexie requested a review from alixander April 13, 2023 21:07
@berniexie berniexie marked this pull request as ready for review April 13, 2023 21:07
@berniexie berniexie merged commit ab09193 into terrastruct:master Apr 13, 2023
@berniexie berniexie deleted the 1093/large-png-exports branch April 13, 2023 22:11
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

Successfully merging this pull request may close these issues.

PNG export broken for large diagram --pad 5000 error
3 participants