1.从手机中加载图片 File file = new File("/data/data/capture.bmp"); if(file.exists()){ //判断文件是否存在 bm = BitmapFactory.decodeFile("/data/data/capture.bmp");//通过BitmapFactory将图片文件转成Bitmap // iv.setImageBitmap(bm);//使用ImageView 的setImageBitmap()显示图片 }else{ //文件不存在 new AlertDialog.Builder(Image.this).setIcon(R.drawable.icon) .setTitle("文件不存在").setPositiveButton("ok",new DialogInterface.OnClickListener(){ public void onClick(DialogInterface dialog, int which) {} }).show(); } 2.保存图片到手机中 File f = new File("/data/data/1.png"); f.createNewFile(); FileOutputStream fOut = null; try { fOut = new FileOutputStream(f); } catch (FileNotFoundException e) { e.printStackTrace(); } bmp1.compress(Bitmap.CompressFormat.PNG, 100, fOut); try { fOut.flush(); } catch (IOException e) { e.printStackTrace(); } try { fOut.close(); } catch (IOException e) { e.printStackTrace(); }