What is the maximum size for an HTML canvas?

canvas, html

Solution

32,768 = 215 and 215 - 1 = 32,767 is the biggest number a `short int` can hold.

So Google Chrome probably uses the datatype `short int` for storing the sizes of a `<canvas>` element.

If you want to display larger `<canvas>` elements, you could try to use multiple ones. You should also consider another implementation technique if you really need ~33k pixels!

Problem

Creating a large visualization in HTML. In Chrome (v. 18), the maximum canvas size is 32,768 pixels high. Is there a way to display a larger canvas? Where is this limit coming from?

Original source