Writing/Saving an Image
by, 03-07-2012 at 05:04 PM (650 Views)
It has been explained to use the javax.imageio package so that to load image to Java 2Dô's internalBufferedImage format from an external image format. Also, the usage of Graphics.drawImage() has been explained to draw images with an optional filtering.
To an external image format, the BufferedImage object is saved. This image might be the one that was loaded originally by Image I/O class, from external image format. It might also be the one which was constructed by Java 2D or was modified by using Java 2D APIs.
The given example shows that simple ways are provided by Image I/O so that images could be saved in a number of image formats.
Java Code:static boolean ImageIO.write(RenderedImage im, String formatName, File output)