Displaying a bitmap of arbitrary size without running out of memory

穿精又带淫゛_ 提交于 2019-12-12 19:34:41

问题


How do I display an image of arbitrary size without OOMing or downscaling the image. I dont want to downscale due to zooming and dragging of the picture?

If it isnt possible to display an image of arbitrary size, how do I determine the maximum possible size of the image to display, without causing a OOM?


回答1:


Bitmap data is aloccated in the Native heap rather than the VM heap. see BitmapFactory OOM driving me nuts for details on how to monitor the Native heap and how big your bitmap can get without hitting an OOM.



来源:https://stackoverflow.com/questions/2633973/displaying-a-bitmap-of-arbitrary-size-without-running-out-of-memory

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!