|
var FNPhotograph = api.require('FNPhotograph');
//打开前置摄像头
FNPhotograph.openCameraView({
rect: {
x: 0,
y: 0,
w: 320,
h: 300
},
orientation: 'portrait',
fixedOn: api.frameName,
fixed: true,
useFrontCamera: true
}, function(ret) {
});
//拍照
FNPhotograph.takePhoto({
qualityValue: 70,
path: api.cacheDir + '/tmp/',
album: false
}, function(ret) {
//alert(JSON.stringify(ret));
//获取照片旋转角度
FNPhotograph.getRotateDegree(
imgPath:ret.imagePath
function(retR) {
if (retR) {
alert(JSON.stringify(retR));
}
});
});
用MI6和荣耀7测试拍摄出的照片是头下脚上颠倒的,并且获取到的旋转角度是0 |
|