canvas 2d createImage创建图片对象后,使用onload加载图片速度慢?
Android 微信版本 8.0.37 let img = canvas.createImage(); const ctx = canvas.getContext('2d'); wx.downloadFile({ url: url, //网络图片 success:(res) => { img.src = res.tempFilePath; img.onload = () => { let imgSize = this.canvasImgMode(mode,img,width,height); ctx.drawImage(img, imgSize.sx,imgSize.sy,imgSize.sw,imgSize.sh, x, y, imgSize.width, imgSize.height); reslove(imgSize); } }, fail(error) { console.log(error) reslove() } }); 图片加载速度慢