在Android应用程序的变化图分辨率应用程序、分辨率、Android

由网友(一念执着)分享简介:我在写一个使用手机的摄像头拍照,然后用它在我的应用程序的应用程序。问题是,应用程序运行的内存,这是因为该位图的分辨率高的可能。有没有一种方法,以保持该位图的大小相同,但降低分辨率?I'm writing an application that uses the phone's camera to take a pic...

我在写一个使用手机的摄像头拍照,然后用它在我的应用程序的应用程序。问题是,应用程序运行的内存,这是因为该位图的分辨率高的可能。有没有一种方法,以保持该位图的大小相同,但降低分辨率?

I'm writing an application that uses the phone's camera to take a picture, and then use it in my app. The thing is, the app runs out of memory, and it is probably because of the bitmap's high resolution. Is there a way to keep the bitmap at the same size, but lower the resolution?

谢谢!

推荐答案

这可以通过使用Options.inSampleSize完成,创建位图时

this can be done using Options.inSampleSize, when creating the bitmap

阅读全文

相关推荐

最新文章