-
Notifications
You must be signed in to change notification settings - Fork 4
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
Failed to convert 31MB file in Firefox #13
Comments
Seems like Firefox can't handle CanvasRenderingContext2D.getImageData() on big canvases. I couldn't find a bug report or anything, but could validate the behavior with this simple code: <canvas id="canvas" /> const DIMENSIONS = 30000;
const canvas = document.getElementById('canvas');
canvas.width = DIMENSIONS;
canvas.height = DIMENSIONS;
const ctx = canvas.getContext('2d');
const data = ctx.getImageData(0, 0, 1, 1);
console.log(data); (There is also a jsfiddle) In Firefox 88.0.1 it worked up to a canvas size of 11180x11180. Everything bigger just failed with |
I did some more research. The only broadly related issue I found was this. Users got a similar error, when trying to take a large screenshot via Firefox DevTools. The limitations as pointed out by one user are:
I guess the same limitations apply to our use case. Sadly there is not much we can do about those limitations (at least not without much overhead). |
[Exception... "Failure" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: https://paa2.gruppe-adler.de/main.65faf26e.js :: k/< :: line 2" data: no]
paa.gruppe-adler.de
couldn't convert my file.Filesize is 13312 x 13312px
File too large to attach, will be sent via Discord
The text was updated successfully, but these errors were encountered: