Save an Image to disk
suggest changepublic static void saveImage(String destination) throws IOException {
    // method implemented in "Creating a simple image Programmatically and displaying it" example
    BufferedImage img = createSampleImage();
    // ImageIO provides several write methods with different outputs
    ImageIO.write(img, "png", new File(destination));
}
  Found a mistake? Have a question or improvement idea?
  Let me know.
      
      Table Of Contents