Is there any way to check if a selected(x,y) point of a PNG image is transparent?
With : i << 2
i << 2
const data = context.getImageData(x, y, width, height).data; const pixels = []; for (let i = 0, dx = 0; dx < data.length; i++, dx = i << 2) { if (data[dx+3] <= 8) console.log("transparent x= " + i); }