解决 out of memory 的方法
来源:互联网 发布:php在线教学平台源码 编辑:程序博客网 时间:2024/06/08 16:56
private Bitmap decodeBitmap(File file){ try{ BitmapFactory.Options o = new BitmapFactory.Options(); o.inJustDecodeBounds = true; BitmapFactory.decodeStream(new FileInputStream(file),null,o); Bitmap currentBitmap = Bitmap.createBitmap(o.outWidth,o.outHeight, Bitmap.Config.ARGB_8888); final int REQYIRED_SIZE = 800; int scale = 1; while (o.outWidth / 2 / scale >= REQYIRED_SIZE && o.outHeight / 2 /scale >= REQYIRED_SIZE){ scale *= 2; } //Log.e(TAG, "decodeBitmap: scale---"+scale); o.inJustDecodeBounds = false; o.inSampleSize = scale; o.inMutable = true; o.inBitmap = currentBitmap; return BitmapFactory.decodeStream(new FileInputStream(file),null,o); //return currentBitmap; }catch (Exception e){ e.printStackTrace(); } return null; }
0 0
- 解决 out of memory 的方法
- 解决out of memory
- 解决Out of memory问题
- Tomcat out of memory解决
- matlab管理内存方法---解决out of memory
- 暂时解决weblogic 的 permGen out of memory错误
- 终于解决了IE里的Out of memory问题!
- android加载图片Out Of Memory的解决
- 暂时解决weblogic 的 permGen out of memory错误
- 使用matlab时出现Out of memory问题的解决
- out of memory的解决方案
- 解决out of memory in asp.net
- 解决domino服务器错误:out of memory
- ORA-27102: out of memory 解决实例
- ORA-27102: out of memory 解决实例
- ORA-27102: out of memory 解决实例
- NSIS打包out of memory问题解决方法
- eclipse out of memory错误的解决方法
- 快速找到好书・好博客・好论坛
- 第三方登录之Google登录详细教程
- POJ 3321
- Qt中Qtableview 的使用2(QStandardItemModel模型)
- javaweb项目发布后在浏览器上显示的图标
- 解决 out of memory 的方法
- Scala Cookbook读书笔记 Chapter 3.Control Structures 第一部分
- 鼠标悬浮事件 -jQuery hover()方法
- C++11并发/多线程编程系列(3)
- Qt中Qtableview的使用1(QSqlTableModel模型)
- RadioGroup基本使用方法
- 欢迎使用CSDN-markdown编辑器
- Selenium学习8--截图,拖拽页面元素,键盘操作,鼠标右键,悬停,鼠标双击
- 单精度浮点数(float)与双精度浮点数(double)的区别