您的位置:首页 > 其它

bitmap占用内存大小

2013-08-29 10:27 225 查看
1
bitmap.getByteCount();
得到的是kb
bitmap.getRowBytes() * bitmap.getHeight();
得到的是byte
getByteCount() is just a convenience method which does exactly what you have placed in the else-block. In other words, if you simply rewrite getSizeInBytes to always return "bitmap.getRowBytes() * bitmap.getHeight()" you don't need the Android version check.
翻译过来就是:getByteCount()受android版本限制,而[code]getRowBytes() * bitmap.getHeight()则不受android版本限制。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: