All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----pmr.simplegraph.GIFEncoder
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 toWrite
.Three caveats:
java.awt.AWTException: Grabber returned false: 192
GIFEncoder is based upon gifsave.c, which was written and released by:
Phone: +47 2 230539
sverrehu@ifi.uio.no
public GIFEncoder(Image image) throws AWTException
@param image The image to encode. The image must be completely loaded. @exception AWTException Will be thrown if the pixel grab fails. This can happen if Java runs out of memory. It may also indicate that the image contains more than 256 colors.
public GIFEncoder(byte r[][], byte g[][], byte b[][]) throwsAWTException
Each array stores intensity values for the image. In other words,
r[x][y] refers to the red intensity of the pixel at column x, row
y.
public void Write(OutputStream output) throws IOException
@param output The stream to output to. This should probably be a buffered stream. @exception IOException Will be thrown if a write operation fails.
All Packages Class Hierarchy This Package Previous Next Index