代码如下:
private void saveMyBitmap(Bitmap bitmap,String photoName){
String path = Environment.getExternalStorageDirectory()+"\\";
File file = new File(path+photoName+".jpg");
try {
file.createNewFile();
FileOutputStream fos = new FileOutputStream(file);
bitmap.compress(Bitmap.CompressFormat.JPEG,75,fos);
System.out.println(path);
fos.flush();
fos.close();
} catch (Exception e) {
// TODO Auto-generated catch block
System.out.println(e.getMessage());
e.printStackTrace();
}
}