Android Bitmap Save saveBitmap(File file, Bitmap bitmap)

Here you can find the source of saveBitmap(File file, Bitmap bitmap)

Description

save Bitmap

Declaration

public static void saveBitmap(File file, Bitmap bitmap)
            throws IOException 

Method Source Code

//package com.java2s;

import java.io.File;

import java.io.FileOutputStream;

import java.io.IOException;

import android.graphics.Bitmap;

public class Main {
    public static void saveBitmap(File file, Bitmap bitmap)
            throws IOException {
        FileOutputStream fOut = new FileOutputStream(file);

        bitmap.compress(Bitmap.CompressFormat.PNG, 85, fOut);
        fOut.flush();/*from w w  w .j  a va  2  s. co m*/
        fOut.close();
    }
}

Related

  1. saveBitmapToFile(Bitmap bitmap, String path)
  2. save(Bitmap bitmap, String fileName)
  3. saveBitmapToFile(Bitmap bitmap, String filename)
  4. saveBitmap(Bitmap bmp, String path, CompressFormat format)
  5. saveBitmap(Bitmap image)
  6. saveBitmap(File saveToFile, Bitmap bitmapToSave)
  7. saveBitmapAsJpgAtSd(Bitmap mBitmap, String dirPath, String fileName)
  8. saveBitmapFromView(View view, String path)
  9. saveBitmapJPEGWithBackgroundColor( String strFileName, Bitmap bitmap, int nQuality, int nBackgroundColor)