org.ceryle.util.image
Class ImageWriter

java.lang.Object
  extended by org.ceryle.util.image.ImageWriter

public class ImageWriter
extends Object

When Java 1.4/Java 2D is available, ImageWriter encapsulates and simplifies the Java IO processes for writing Image objects to a File as a JPEG image. Currently, it uses the Acme GifEncoder to simply write a GIF image.

Since:
JDK1.4.1
Version:
$Id: ImageWriter.java,v 3.4 2007-06-15 12:10:02 altheim Exp $
Author:
Murray Altheim

Constructor Summary
ImageWriter()
           
 
Method Summary
static void writeComponentImage(Component c, File file)
          Writes an Image created from the Component comp to the File file.
static void writeImage(Image img, Dimension d, File file)
          Writes the BufferedImage image to the File file, using Dimension d to constrain its size.
static void writeImage(Image img, File file)
          Writes the BufferedImage image to the File file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageWriter

public ImageWriter()
Method Detail

writeComponentImage

public static void writeComponentImage(Component c,
                                       File file)
                                throws IOException
Writes an Image created from the Component comp to the File file.

Throws:
IOException

writeImage

public static void writeImage(Image img,
                              File file)
                       throws IOException
Writes the BufferedImage image to the File file.

Throws:
IOException

writeImage

public static void writeImage(Image img,
                              Dimension d,
                              File file)
                       throws IOException
Writes the BufferedImage image to the File file, using Dimension d to constrain its size.

Throws:
IOException


The Ceryle Project. Copyright ©2001-2007 Murray Altheim, All Rights Reserved. See LICENSE included with distribution.