Closed almognoam closed 2 years ago
im trying to get the pixels of the screen by getImageData:
let ctx = canvas_ref.current.getContext('2d') const pixel_arr = ctx.getImageData(0, 0, screenWidth, screenHeight).data
but i get this error:
Error: Failed to execute 'getImageData' on 'CanvasRenderingContext2D': The canvas has been tainted by cross-origin data.
i've being looking online but noting works, any idea how to fix it?
im trying to get the pixels of the screen by getImageData:
but i get this error:
i've being looking online but noting works, any idea how to fix it?