需求:将已选定或下载的Bitmap保存在SD卡
//保存Bitmap到SD卡 public void saveBitmap(Bitmap photo,String bmName) throws Exception { FileOutputStream fOut = null; try{ fOut = new FileOutputStream(Environment.getExternalStorageDirectory() + "/DCIM/"+bmName+".jpg"); } catch (FileNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } photo.compress(Bitmap.CompressFormat.JPEG, 80, fOut); try { fOut.flush(); fOut.close(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } }