Languages
[Edit]
EN

Java - save BufferedImage to PNG file

4 points
Created by:
kaya31
526

In this article, we want to show how to save BufferedImage to PNG file using Java.

Quick solution:

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

BufferedImage image = ...
ImageIO.write(image, "PNG", new File("/path/to/output.png"));

 

See also

  1. Java - save BufferedImage to JPG file

Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join