在Android应用程序的变化图分辨率 [英] change bitmap resolution in Android app
本文介绍了在Android应用程序的变化图分辨率的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在写一个使用手机的摄像头拍照,然后用它在我的应用程序的应用程序。问题是,应用程序运行的内存,这是因为该位图的分辨率高的可能。有没有一种方法,以保持该位图的大小相同,但降低分辨率?
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
这篇关于在Android应用程序的变化图分辨率的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文