Class GIFEncoder

java.lang.Object
  |
  +--GIFEncoder

public class GIFEncoder
extends java.lang.Object

GIFEncoder is a class which takes an image and saves it to a stream using the GIF file format (Graphics Interchange Format). A GIFEncoder is constructed with either an AWT Image (which must be fully loaded) or a set of RGB arrays. The image can be written out with a call to Write.

Three caveats:

GIFEncoder is based upon gifsave.c, which was written and released by:

Sverre H. Huseby
Bjoelsengt. 17
N-0468 Oslo
Norway
 
Phone: +47 2 230539
sverrehu@ifi.uio.no


Constructor Summary
GIFEncoder(java.awt.Image image)
           
 
Method Summary
static void saveGIF(java.awt.Image im, java.lang.String name)
           
 void Write(java.io.OutputStream output)
          Writes the image out to a stream in the GIF file format.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GIFEncoder

public GIFEncoder(java.awt.Image image)
           throws java.awt.AWTException
Method Detail

saveGIF

public static void saveGIF(java.awt.Image im,
                           java.lang.String name)

Write

public void Write(java.io.OutputStream output)
           throws java.io.IOException
Writes the image out to a stream in the GIF file format. This will be a single GIF87a image, non-interlaced, with no background color.

java.io.IOException