CameraFrameListener 获取frame.data 图片尺寸安卓
发布于 5 年前 作者 sliu 6672 次浏览 来自 问答

const context = wx.createCameraContext();

const listener = context.onCameraFrame((frame) => {

cosole.log("获取屏幕数据 width:" + frame.width + " height:" + frame.height)

console.log(frame.data instanceof ArrayBuffer, frame.width, frame.height)

})

  • 当前 Bug 的表现(可附上截图)

获取frame.data 在安卓机上图片拉伸,ios手机正常,

  • 预期表现

ios 和 安卓返回的帧数据 宽高比相同

机型 华为mate20

  • 复现路径
  • 提供一个最简复现 Demo
1 回复

麻烦提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)

回到顶部