List of utility methods to do Bitmap Save
boolean | saveJPEGBitmap(Bitmap bmp, String path) save JPEG Bitmap return saveBitmap(bmp, path, Bitmap.CompressFormat.JPEG);
|
void | saveJpegFile(String fileName, Bitmap bitmap) save Jpeg File File file = new File(extStorageDirectory, fileName + ".jpg"); File fileDirectory = new File(extStorageDirectory); if (!fileDirectory.exists()) { fileDirectory.mkdir(); OutputStream outStream = null; try { outStream = new FileOutputStream(file); ... |
boolean | savePNGBitmap(Bitmap bmp, String path) save PNG Bitmap return saveBitmap(bmp, path, Bitmap.CompressFormat.PNG);
|
boolean | storeBitmapToFile(Bitmap bitmap, String filePath) store Bitmap To File if (Environment.getExternalStorageState().equals( Environment.MEDIA_MOUNTED)) { try { BufferedOutputStream bos = new BufferedOutputStream( new FileOutputStream(filePath)); bitmap.compress(CompressFormat.PNG, 50, bos); bos.flush(); bos.close(); ... |
void | writeToFile(Bitmap bitmap, String filePath, int quality) write To File File f = new File(filePath); FileOutputStream fOut = null; try { f.createNewFile(); fOut = new FileOutputStream(f); bitmap.compress(Bitmap.CompressFormat.JPEG, quality, fOut); fOut.flush(); fOut.close(); ... |