javascript draw image pixel by pixel code example Example: getImageData() ctx.getImageData(sx, sy, sw, sh);