/** * 保存图片到指定文件夹 * * @param bmp * @param filename * @return */ private boolean saveBitmapTofile(Bitmap bmp, String filename) { if (bmp == null || filename == null) return false; CompressFormat format = Bitmap.CompressFormat.JPEG; int quality = 100; OutputStream stream = null; try { stream = new FileOutputStream("/sdcard/myimage/" + filename); } catch (FileNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } return bmp.compress(format, quality, stream); }
版权声明:本文为博主原创文章,未经博主允许不得转载。
原文地址:http://blog.csdn.net/u012527802/article/details/47817413