Save an Image to disk

suggest change
public 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));
}

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents