显示任意大小的位图不会耗尽内存 [英] Displaying a bitmap of arbitrary size without running out of memory

查看:143
本文介绍了显示任意大小的位图不会耗尽内存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何显示任意大小的图像,而不OOMing或缩减的形象。
我不想为下限值,由于变焦和图片的拖拽?

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?

如果它不是可以显示任意大小的图像,我怎么确定要显示的图像的最大可能的大小,而不会导致OOM?

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?

推荐答案

位图数据在本机堆而不是VM堆aloccated。看到 BitmapFactory OOM我发疯的详细信息,如何监视本机堆和有多大位图可以得到没有击中的OOM。

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.

这篇关于显示任意大小的位图不会耗尽内存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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