html5 canvas加载base64字符串图片
阿神
阿神 2017-04-17 13:53:10
0
2
456

例如:

var image = new Image();
image.src=dataURLs;

image.src=''填的是一个dataurl,就是base64字符串的图片。
然后在电脑和android上都可以显示,就是在ios上显示不成功。
想问是怎么回事?谢谢了

阿神
阿神

闭关修行中......

reply all(2)
Peter_Zhu
Post your base64 string for a look. I tried it again on iPad(9.2) and it works. :(

Know what the problem is:

    // 引用外部图片,需设置 crossOrigin 属性,否则 toDataURL 调用异常
    // image.setAttribute('crossOrigin', 'anonymous');
    // 不使用url图片时,一定要把上面这一行注释掉,否则canvas加载不出base64图片
刘奇

I don’t know the specific reason, but you can consider downloading Safari to debug

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!