Let’s say I have this image:

and I have this 2D array tiles[] .. and using Image() function… how can do I use the (what I assume be best way?) for loop to add each tile into the array so tile[0] through however many there are is read and used as Image() objects later to be painted on HTML5 canvas?
I would..
Assuming:
All describe what their names suggest, and:
EDIT: Added image load as per comment, fixed wrongly name
ImageWidthandImageHeighttoimageWidthandimageHeightEDIT: Performing code inside
imageObj.onloadas the image is drawn here, drawImage() from origin (0,0)Then, split up your image into a list of tile data..