Android相机预览和以纵向模式方向拍摄风景照片 [英] Android camera preview and taken pictures in landscape in portrait mode orientation

查看:109
本文介绍了Android相机预览和以纵向模式方向拍摄风景照片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试以纵向方式实现风景相机预览,也拍摄风景照片,我尝试设置相机参数旋转和度数

I'm trying to implement landscape camera preview in portrait orientation also taken pictures in landscape, I have tried setting camera parameter rotation and degrees

parameters.setRotation(rotation)

但是没运气。



我只是想问这是否可行?或者任何人都可以指导我任何样本文档?我现在尝试搜索并努力调试。



谢谢。



我是什么尝试过:



but no luck.

I just want to ask if this is possible? Or anyone can guide me to any sample documentation? I have tried searching and struggle debugging days now.

Thank you.

What I have tried:

Camera.Parameters parameters = mCamera.getParameters();
				parameters.setRotation(rotation);
               mCamera.setParameters(parameters); 

推荐答案

参见 setRotation [ ^ ],它解释了如何计算相对于摄像机当前位置的角度。
See setRotation[^], which explains how to calculate the angle relative to he current position of the camera.


这篇关于Android相机预览和以纵向模式方向拍摄风景照片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆