Package org.fest.swing.image
Class ImageFileWriter
java.lang.Object
org.fest.swing.image.ImageFileWriter
Understands how to write an image as a file in the file system.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
writeAsPng
(BufferedImage image, String filePath) Writes an image as a PNG file to the file system.
-
Constructor Details
-
ImageFileWriter
public ImageFileWriter()
-
-
Method Details
-
writeAsPng
Writes an image as a PNG file to the file system. If there is already aFile
present, its contents are discarded.- Parameters:
image
- aBufferedImage
to be written.filePath
- the path of the image file to create.- Returns:
false
if the image could not be saved.- Throws:
IOException
- if an error occurs during writing.
-