canvas.drawImage为什么画出来的不是完整图片?
wx.getImageInfo({
src:currentImgSrc,
success:imgres=>{
let imgHeight = imgres.height;
let imgWidth = imgres.width;
wx.createSelectorQuery()
.select("#output-canvas")
.context(function (res) {
var ctx = res.context;
ctx.clearRect(0, 0, imgWidth, imgHeight);
ctx.drawImage(imgres.path, 0, 0, imgWidth, imgHeight,0, 0, imgWidth, imgHeight);
//这里画出来的是一半的图片 为什么?
})
.exec();