android bitmap溢出问题完美解决方案
发布日期:2021-06-29 15:23:53 浏览次数:3 分类:技术文章

本文共 404 字,大约阅读时间需要 1 分钟。

public static Bitmap getLoacalBitmap(String url) {
try {
BitmapFactory.Options opt = new BitmapFactory.Options();
opt.inPreferredConfig = Bitmap.Config.RGB_565;
opt.inPurgeable = true;
opt.inInputShareable = true;
FileInputStream fis = new FileInputStream(url);
return BitmapFactory.decodeStream(fis, null, opt); // /把流转化为Bitmap图片
} catch (FileNotFoundException e) {
e.printStackTrace();
return null;
}
}

转载地址:https://codegg.blog.csdn.net/article/details/43015987 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:如何远端调试framework和APK
下一篇:android 滑动侧边栏 SlideMenu 源码分析 以及使用手册

发表评论

最新留言

路过,博主的博客真漂亮。。
[***.116.15.85]2024年04月15日 01时56分30秒