camera组件返回图片宽高由什么决定?

发布于 6 年前作者 schen4988 次浏览最后编辑 6 年前来自 ask

<camera style=“height: 200px; width: 100%;”></camera>

<button bindtap=“takePhoto”>拍照</button>

takePhoto () {

let _this = this;

wx.createCameraContext().takePhoto({

success: function (res) {

console.log(res);

_this.setData({ tempPath: res.tempImagePath });

}

});

},

返回的res中height为116,width为720,height由什么决定?

3 回复
duxiulan
duxiulan1 楼6 年前

问题已修复,麻烦更新微信到6.5.21

yangfeng
yangfeng2 楼6 年前

一般由预览区域决定,请问是什么机型?

pyan
pyan3 楼4 年前

苹果机型图片的高度都只有一半,只有预览区域的一半!请问这是什么原因