小程序camera组件拍照变蓝色
反馈一个Bug:
Bug表现:camera组件调用takePhoto拍照后,图片变蓝。
预期:图片正常。
复现:在一加手机上每次都会变蓝,其他手机暂无发现。如下图,都变成蓝精灵了
代码:
< camera device-position = "front" flash = "off" binderror = "error" bindstop = "stop" style = "width: 100%; height: 60%;" ></ camera > < image mode = "widthFix" src = "{{src}}" style = "margin-top:10rpx;width: 80px; height: 80px;" ></ image > |
/**
* 调用拍照
*/
doTokePhoto:
function
(e) {
var
that =
this
var
ctx = wx.createCameraContext()
ctx.takePhoto({
quality:
'high'
,
success: (res) => {
that.setData({
src: res.tempImagePath
})
that.showViewLog(
'拍照完成 '
+ res.tempImagePath)
that.uploadImg(that.data.src, e)
},
fail:
function
() { console.log(
'fail'
); },
complete:
function
() { console.log(
'complete'
); }
})
},