【问题标题】:inJustDecodeBounds for Bitmaps in AndroidAndroid 中位图的 inJustDecodeBounds
【发布时间】:2011-10-10 17:48:02
【问题描述】:

我正在研究如何从 url 下载图像以避免内存崩溃。 我已经检查了该链接(用于加载指定所需大小的图像) Strange out of memory issue while loading an image to a Bitmap object 我的问题是: 调整从 url 而不是文件获取位图的方法。

这对设备数据消耗有何影响?应用程序是否会下载图像两次?一个当 inJustDecodeBounds 和另一个用于“真正的”解码?

提前致谢

【问题讨论】:

    标签: java android imageview image-scaling


    【解决方案1】:

    第一个“pass”将只下载图像的一小部分 - 标题,它将从中读取尺寸。 真正的解码将下载整个图像。

    所以不,要回答您的问题,它不会将整个图像下载两次。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-12-29
      • 2017-07-07
      • 2010-12-29
      • 2012-01-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多