a faster alternative to canvas.getImageData