Tainted canvases may not be exported

后端 未结 10 1632
被撕碎了的回忆
被撕碎了的回忆 2020-11-22 05:21

I want to save my canvas to a img. I have this function:

function save() {
    document.getElementById(\"canvasimg\").style.border = \"2px solid\";
    var d         


        
10条回答
  •  傲寒
    傲寒 (楼主)
    2020-11-22 05:55

    Seems like you are using an image from a URL that has not set correct Access-Control-Allow-Origin header and hence the issue.. You can fetch that image from your server and get it from your server to avoid CORS issues..

提交回复
热议问题