You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is currently impossible to use the image data due to CORS settings. To fix this, the server must be configured with the Access-Control-Allow-Origin: * header.
Sample code:
(asyncfunctionf(){letimg=newImage();img.crossOrigin='anonymous';// allow non-authenticated downloading of the image cross-originimg.src='https://i.waifu.pics/YY~unmW.jpg';// failed with error "CORS Missing Allow Origin"awaitimg.decode();letbitmap=awaitcreateImageBitmap(img);letcanvas=document.createElement('canvas');canvas.width=bitmap.width;canvas.height=bitmap.height;letctx=canvas.getContext('2d');ctx.drawImage(bitmap,0,0);letimageData=ctx.getImageData(0,0,canvas.width,canvas.height);console.log(imageData);})();
The text was updated successfully, but these errors were encountered:
It is currently impossible to use the image data due to CORS settings. To fix this, the server must be configured with the
Access-Control-Allow-Origin: *
header.Sample code:
The text was updated successfully, but these errors were encountered: