小程序camera组件拍照变蓝色
发布于 6 年前 作者 min08 4146 次浏览 来自 问答

反馈一个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'); }
  })
},


4 回复

还没有解决啊~官方也没回复。

请问题主,这个问题解决了吗,遇到了同样的问题。

Add:联想手机 Zuk Z2 PRO  ,系统版本 Android 6.0.1, 微信版本:6.6.1。 也出现变蓝的情况

回到顶部