android bitmap溢出问题完美解决方案
来源:互联网 发布:tcl网络电视怎么开机 编辑:程序博客网 时间:2024/05/19 23:26
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;
}
}
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;
}
}
0 0
- android bitmap溢出问题完美解决方案
- android按路径读取相册图片 完美解决Bitmap内存溢出问题
- 解决Android Bitmap内存溢出问题
- Android Bitmap 内存溢出的问题
- Android的Bitmap内存溢出解决方案(OOM) 整理总结
- bitmap溢出的问题
- Bitmap内存溢出问题
- android bitmap内存溢出
- Android bitmap 内存溢出
- android bitmap内存溢出
- Android Bitmap内存溢出
- Android Bitmap内存溢出
- android Bitmap内存溢出
- android Bitmap过大内存溢出问题的解决
- android 由解析bitmap引起的内存溢出问题
- android中使用SoftRefrence解决Bitmap过大内存溢出问题
- android中使用SoftRefrence解决Bitmap过大内存溢出问题
- Android使用bitmap导致内存溢出(oom)问题
- yii 操作session
- ubuntu修改启动为文本模式
- 用java实现了归一化积相关的计算
- Android性能优化典范
- dubbo 环境搭建
- android bitmap溢出问题完美解决方案
- C/C++中内存对齐初探讨
- 在自己的工程中继承别的工程中的类,
- java使用PreparedStatement的addBatch批量提交数据到mysql
- Android 应用性能测试方案一之 log 分析
- Algorithm One Day One -- 判断链表是否有环(上)
- 我的学习之旅(12) main.c
- 十进制数转换为二进制数
- web应用中获取spring上下文的方法