So I made an canvas with multiple images, not only in the viewport but also outside of the canvas.
I want to debug it, check how much pixels they are out of screen etc.
So I thougt I can convert the canvas to png/jpg. to see how big it is and how much extra pixels they use.
I tried but failed:
Uncaught TypeError: Object #<CanvasRenderingContext2D> has no method 'toDataURL'
canvasFrame = document.getElementById('imageFrame');
canvas = canvasFrame.getContext('2d');
var img = game.canvas.toDataURL("image/png");
An other option is to select al the images in the canvas and move it a couple of pixels to determinite the location of them. But I don't know how?