国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

javascript - canvas toDataURL() cross-domain issue
淡淡煙草味
淡淡煙草味 2017-05-16 13:36:18
0
1
665

The picture is placed on Youpaiyun. When canvas calls the picture, todataURl will report an error in the end. Is there any solution?
Baidu also looked at many solutions but none of them could be implemented. .
Error message:

Uncaught DOMException: Failed to execute 'toDataURL' on 'HTMLCanvasElement': Tainted canvases may not be exported.
淡淡煙草味
淡淡煙草味

reply all(1)
小葫蘆

If it is new Image(), add the following settings:

// 引用外部圖片,需設(shè)置 crossOrigin 屬性,否則 toDataURL 調(diào)用異常
image.setAttribute('crossOrigin', 'anonymous');

Reference question: /q/10...

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template