javascript canvas context pixel code example Example: getImageData() ctx.getImageData(sx, sy, sw, sh);