Android 照片尺寸和分辨率
请原谅这个基本问题,但我不太明白如何使用 Android Camera 类和参数。
我正在尝试使用 Android API 拍摄一张照片,并将其显示在我的活动的固定区域中。屏幕上的尺寸约为 3 英寸 x 2 英寸。
假设我知道我想要一张在 360x220px 区域中显示的图片?我说的是活动规模。那么我如何将其与相机可接受的图片尺寸相匹配。我的意思是我看到它支持 480x800 和 800x480。这似乎实际上是最接近的尺寸,但很难找到真正匹配我的显示区域的尺寸?
所以我不知道在哪里指定要拍摄的照片尺寸,以便在该区域看起来不错。我是否在预览期间指定这一点?我的意思是,我想我能做的就是以与我最终想要显示图片的显示区域相同的尺寸进行预览?还有如何正确保存它。我应该选择最接近的,保存然后尝试缩放吗?除了 Android SDK 之外,我还应该使用任何库吗?
抱歉咆哮。我只有一个特定的尺寸(我可以稍微改变它,但我必须修复它,而且我不认为它是 480x800),我只想拍摄一张适合该区域的照片,保存它加载并在那里显示它?我该怎么做?我想要一个不占用更大区域的预览,并且图片看起来就像预览的一样。
现在发生的事情是显示看起来放大的图片等,或者两个小、太大的所有东西,但我想显示的东西。
Pardon the basic question, but I don't quite get how to work with Android Camera class and Parameters.
What I am trying to use Android API to take a picture that will display in a fixed area of my activity. Its about 3inches by 2inches on screen.
Lets say I know that I want a picture that displays in a 360x220px area? I am talking about on the activity size. So I how do I match this up to the accepted picture size of the camera. I mean I see it supports 480x800 and 800x480. This seems to actually be the closest size but its hard to find one thats really matches the display area I have?
So I don't know where to specify that size of picture to take that will look good in that area. Do I specify this during preview? I mean I guess what I thought I could do is preview in same size somehow as the display area I wanted to finally show the picture in? Also how to save it off properly. Should I just pick closest, save and then try to scale? Are there any libraries I should be using for this beside Android SDK?
Sorry about rant. I just have a specific size(I can change it somewhat but I have to fix it and I don't think its 480x800) and I just want to take a picture that will fit in that area, save it load and display it there? How do I do this? I would like a preview that does not take up a bigger area, and a picture that looks just like what is previewed.
Whats happening now is pictures displaying that looked zoomed etc or two small, too big everything but what I want to display.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论