The iPad3 Safari HTML5 Canvas object supports only 2048 x 2048 pixels.
Posted by Elf Sternberg as Uncategorized
I’ve been having this headache for days. A very large illustration application I’ve been writing for my employer works on every platform– including the Barnes & Noble NOOK Color!– but not on the iPad. On an iPad, it was just blank. I have an iPad3, and it was puzzling the heck out of me.
For a long time, I thought it was some bug in the interaction between Canvas and iScroll, an application I’m using to let users scroll through the illustration. iScroll does magical things with CSS transforms to make pinch/zoom, go-to, and scroll-to work beautifully on platforms that don’t support it, or to override the default behavior on platforms that do. But no. It turns out that the HTML5 Canvas object on the iPad3 is limited to 2048×2048 pixels. That’s a fairly small workspace. Oddly, I was able to resolve the problem by drawing almost a thousand HTML5 Canvas objects, each no more than 300×300 pixels. The largest canvas object supported by the iPad would occupy only 4.2M pixels; the largest illustration I’ve successfully drawn uses 15.6M pixels distributed among 540 canvas objects.