app使用canvas绘制,导出jpg格式图片全黑。
canvasToPath(width , height) {
const quality = getQuality(this.imgSize)
uni.canvasToTempFilePath(
{
canvasId: this.getCurrentUseCanvasInfo.canvasId,
quality: quality,
width:width ,
height:height,
destWidth: width,
destHeight: height,
fileType:'jpg',
success: (res)=> {
const tempFilePath = res.tempFilePath;
this.uploadImg(tempFilePath)
},
fail: (err) => {
console.log(err);
},
},
);
},
0 个回复