开发者

Android bitmap decodingA

I am trying to decode a bitmap with pixel size 1024*683 with the api decodefile(filepath) but process runs out of memory while decoding the image.

I need the bitmap object for this image at one go without any scaling as i have to work with NDK reading the pixel values using this bitmap. Therefore any scaling or sampling method can't be appl开发者_StackOverflow社区ied in my case.

I wonder how come this is possible that just decoding a file with such size would need any in-around method. There is enough heap size available for this process.

Your opinion and perspective in this matter will be appreciated.

Thanks Nawab


I faced the same problem when I had memory leaks in one of my activities. There were not only view leaks, but bitmap leaks too. And memory consumed by bitmaps is not taken into account when DDMS shows free heap space.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜