canvasjs iterate over each pixel code example Example: getImageData() ctx.getImageData(sx, sy, sw, sh);