Failedtoexecute'toDataURL'on'HTMLCanvasElement':TaintedcanvasesmaynotbeexportedletoCanvas2=this.viewer.canvas.children[0];this.mycanvas=document.createElement("canvas");this.mycanvas.width=oCanvas2.width;this.mycanvas.height=oCanvas2.height;letdestCtx=oCanvas2.getContext('2d');letimage=newImage();image.crossOrigin="anonymous";image.src=oCanvas2.toDataURL("image/png");destCtx.drawImage(image,0,0);請問這種應該怎么修改?
本地canvas繪圖后想轉成圖片,提示錯誤?跪求!
慕哥9229398
2019-07-26 23:36:46