Java examples for 2D Graphics:PNG
save PNG Image
//package com.java2s; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import javax.imageio.ImageIO; public class Main { public static void savePNGImage(BufferedImage image, String pathWithoutExtension) throws IOException { ImageIO.write(image, "png", new File(pathWithoutExtension + ".png")); }/*w w w .j a v a 2 s. c o m*/ }