converts canvas image data to a 2d array of booleans
array[x][y] //gives true or false
very useful for games where you need pixel perfect collision.
Reading an image every time you check for collision is slow. Using a 2d array makes it much faster, and has a very simple syntax (array[x][y]) .
Game engine using image to 2d array conversion: http://maloweb.com/snippets/terraindemo