小程序canvas导出图片模糊解决方法
wx.canvasToTempFilePath({x: 0,y: 0,width: 200,height: 200,//复制 * 750 / wx.getSystemInfoSync().windowWidth,换算成rpx;destWidth: 5...
·
wx.canvasToTempFilePath({
x: 0,
y: 0,
width: 200,
height: 200,
//复制 * 750 / wx.getSystemInfoSync().windowWidth,换算成rpx;
destWidth: 500 * 750 / wx.getSystemInfoSync().windowWidth,
destHeight: 500 * 750 / wx.getSystemInfoSync().windowHeight,
canvasId: 'artQr',
success(res) {
console.log(res.tempFilePath)
that.setData({
qrImg: res.tempFilePath
})
}
})
更多推荐


所有评论(0)