I have an Image object
var ctx = canvas.getContext(\'2d\'); ctx.drawImage(imageBitmap, 0, 0); var imgData=ctx.getImageData(0,0,W,H);