org.fest.swing.image
Class ImageFileWriter
java.lang.Object
org.fest.swing.image.ImageFileWriter
public class ImageFileWriter
- extends Object
Understands how to write an image as a file in the file system.
- Author:
- Alex Ruiz
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ImageFileWriter
public ImageFileWriter()
writeAsPng
public boolean writeAsPng(BufferedImage image,
String filePath)
throws IOException
- Writes an image as a PNG file to the file system.
If there is already a
File
present, its contents are discarded.
- Parameters:
image
- a BufferedImage
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.
Copyright © 2007-2011 FEST (Fixtures for Easy Software Testing). All Rights Reserved.