I’m trying to verify and understand the maximum image size that can be saved from an offscreen createGraphics() buffer. Here’s a sketch I used to test it.
I should fail at about the 5th file. Be patient, it takes a few seconds to download these large image files.
The limit seems to be exactly 2 ^ 30 pixels, which makes some sense. If a pixel takes 4 bytes (R,G,B, possibly alpha), then that would be 2 ^ 32 bytes which would be an understandable limit to have.
I can’t find any documented limit in the p5.js doco, or the Java Processing doco. This is all in the context of creating very high-resolution art files for a digital print shop.
I’d be interested if anyone has any detail on the limit, the reasons behind it etc.
You might think that 2^30 pixels, eg. a 22370 x 12000 image here, should be enough for anybody, but it’s not all that big in today’s digital printing world.
My environment: Mac, Mojave 10.14.6, Chrome 83.0.4103.116
Thanks & Regards,