Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;

import android.graphics.Bitmap;

public class Main {

    public static boolean saveAsPNG(Bitmap bitmap, String fileName) throws FileNotFoundException {
        return bitmap.compress(Bitmap.CompressFormat.PNG, 1, new FileOutputStream(fileName));
    }
}