/** * Writes an image into the path with the specified file name and the image extension. * * @param path path * @param fileName file name of the written image * @param ext extension of the file name * @throws IOException * @author DSIW */ public void write(final String path, final String fileName, final String ext) throws IOException { final BufferedImage bimage = new BufferedImage( Images.getWidth(image), Images.getHeight(image), BufferedImage.TYPE_INT_RGB); final Graphics2D graphics2d = bimage.createGraphics(); graphics2d.drawImage(image, 0, 0, this); ImageIO.write( bimage, ext.toLowerCase(), new File(path + File.separator + fileName + "." + ext.toLowerCase())); }