var context = document.getElementById('myCanvas').getContext('2d') imageData = context.getImageData(x, y, width, height);