save BufferedImage As Png - Java 2D Graphics

Java examples for 2D Graphics:PNG

Description

save BufferedImage As Png

Demo Code


//package com.java2s;
import java.awt.image.BufferedImage;
import java.io.File;
import javax.imageio.ImageIO;

public class Main {
    public static void saveAsPng(BufferedImage image, File to)
            throws Exception {
        ImageIO.write(image, "png", to);
    }/* ww w . j a v  a2 s  .  c om*/
}

Related Tutorials