public void saveMyBitmap(String bitName,Bitmap mBitmap){          File f = new File("/sdcard/" + bitName + ".jpg");          picPath="/sdcard/" + bitName + ".png";          try {           f.createNewFile();          } catch (IOException e) {           // TODO Auto-generated catch block         //  DebugMessage.put("在保存图片时出错:"+e.toString());          }          FileOutputStream fOut = null;          try {           fOut = new FileOutputStream(f);          } catch (FileNotFoundException e) {           e.printStackTrace();          }          mBitmap.compress(Bitmap.CompressFormat.PNG, 100, fOut);          try {           fOut.flush();          } catch (IOException e) {           e.printStackTrace();          }          try {           fOut.close();          } catch (IOException e) {           e.printStackTrace();          }         }

更多相关文章

  1. android 多点触摸 实现图片缩放 Image Zoom
  2. Android应用程序之间共享文字和图片(二)
  3. android中setImageResource加载大图片出现oom解决方案
  4. Android跳转系统相机或相册获取图片
  5. android对大图片的缓存处理
  6. android 根据SD卡中图片路径读取并显示SD中的图片――源代码
  7. Android中多层Fragment嵌套,调用相册返回Uri无法显示图片的问题解
  8. Android WebView图片显示问题
  9. android 缩放图片与内存溢出

随机推荐

  1. cocos2dx - 部署到android真机上错误整理
  2. 关于android全屏截图,无需root,无状态栏,2
  3. (持续更新, 目前含100+工具类) DevUtils
  4. Android(安卓)WebView属性及用法
  5. Android使用intent调取导航或者地图
  6. Android(安卓)Fragment数据传递
  7. Android:混合轮播视频和图片
  8. Gradle Build加速
  9. Android(安卓)SeekBar
  10. 小知识点