rendImage = new BufferedImage(image.getWidth(null), image.getHeight(null), 1);
Graphics g = rendImage.createGraphics();
g.drawImage(image, 0, 0, null);
}
writer.write(new IIOImage(rendImage, null, null));
writer.dispose();
}
/**
* Load an Image.
* @param in the stream to load the image