代码
uni.chooseImage({
count: 1,
sizeType: ['compressed'],
sourceType: ['camera'],
success: async function(res) {
let imgInfo = await _this.getImageInfo({
imgSrc: res.tempFilePaths[0]
})
console.log(imgInfo.path)
_this.canvasView.canvasImg = imgInfo.path
_this.canvasView.width = imgInfo.width
_this.canvasView.height = imgInfo.height
_this.canvasShow = true
},
});
this.ctx.draw(false, (ret) => {
this.getNewImage(CanvasID, this.canvasW, this.canvasH);
});
var _this = this
uni.canvasToTempFilePath({
canvasId: CanvasID,
quality: 0.6,
fileType: 'jpg',
destWidth: width,
destHeight: height,
success: (res) => {
_this.$emit('imgWaterInfo', _this.waterInfo)
_this.$emit('imgPath', res.tempFilePath)
uni.hideLoading()
},
complete:(res) =>{
console.log(res)
}
}, this);
Yitind
能看一下我的反馈吗
2020-11-10 10:39
DCloud_UNI_GSQ
回复 Yitind: 能看下我的回复吗?
2020-11-10 10:45
1***@qq.com (作者)
回复 DCloud_UNI_GSQ:
1.emui 11.0.0.145(C00E145R5P11)
2.Huawei WebView 10.0.0.311
3.不是太懂你说的 是我上面代码添加的那个 拍照后传给canvas的吗 那里的log后面地址是
/doc/uniapp_temp_1604977570645/compressed/1604977581109_1604977576362.jpg
2020-11-10 11:11
Yitind
回复 1***@qq.com: 和你遇到问题一样....
2020-11-10 11:46
chenli
回复 1***@qq.com: emui 11 是Android 11了吧?
2020-11-10 17:58
1***@qq.com (作者)
回复 chenli: 安卓10
2020-11-10 18:23