wx.canvasToTempFilePath 在选择原图的情况下导出图片倾斜变形?
[图片]导出后正常的图片就变形了 var canvas = res[0].node;
var ctx = canvas.getContext('2d');
var width = this.data.xRight - this.data.xLeft;
var height = this.data.yBottom - this.data.yTop;
wx.canvasToTempFilePath({
x: this.data.xLeft + this.data.maxLeft,
y: this.data.yTop + this.data.maxTop,
width: width,
height: height,
destWidth: width * 4,
destHeight: height * 4,
canvas: canvas,
success: ((res => {
var obj = {
'url': res.tempFilePath
};
if (isSave) {
this.triggerEvent('run', obj);
this.setData({
show: false
})
} else {
wx.previewImage({
url: res.tempFilePath,
urls: [res.tempFilePath],
})
}
wx.hideLoading()
}))
})