获取iPhone的相机分辨率? [英] Get iPhone's camera resolution?

查看:241
本文介绍了获取iPhone的相机分辨率?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法获得iPhone的相机的分辨率?显然,3G有1200x1600,而3GS有1500x2000,但是如何从我的代码里面获取这些值(不拍摄照片)。我需要他们对相机预览进行一些仿射变换。

Is there any way to get the resolution of the iPhone's camera? Apparently the 3G has 1200x1600, and 3GS has 1500x2000, but how do I obtain these values from inside my code (without taking the picture). I need them to make some affine transform to the camera preview.

我可以检测到是3G还是3GS硬编码这些值,但它只是最后的手段。 p>

I could detect if it's 3G or 3GS to hardcode these values, but it's just the last resort.

推荐答案

我认为你的最后手段是一个很好的解决方案。

I think your "last resort" is a good solution.

检测模型有什么问题?硬件不会改变任何一个型号..你唯一关心的是,如果3GSX-R或一些出来与一个16mpx相机。

What's wrong with detecting the model? The hardware isn't going to change for either of those models.. The only concern you might have is if the 3GSX-R or something comes out with a 16mpx camera. At which point you'd probably have to update your app anyways and could just add another value to the list.

我投票选择模型检测。

这篇关于获取iPhone的相机分辨率?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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