canvastotempfilepath 生成图片模糊?
上面这张图是canvas , 下面是生成出来的。下面这张图很模糊。 setTimeout(() => { this.cancelChooes(); const systemInfo = wx.getSystemInfoSync(); let pixelRatio = systemInfo.pixelRatio; console.log("设备像素比--->" + this.screenWidth); console.log("设备像素比2--->" + pixelRatio); this.draw(this.localImg).then(() => { wx.canvasToTempFilePath({ x: 0, y: 0, width: this.screenWidth, height: this.screenWidth, destWidth: this.screenWidth * pixelRatio, destHeight: this.screenWidth * pixelRatio, canvasId: "canvas", fileType: "jpg", quality: 1, success: async res => { let img = await uploadImg(res.tempFilePath); this.previewImg = img; console.log("导出图片:" + img); } }); }); wx.hideLoading(); }, 1000); [图片]