|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.gif4j.GifEncoder
This class encodes an image into the GIF89a image file format to an outputstream.
The following specification "GRAPHICS INTERCHANGE FORMAT(sm) Version 89a" was referenced for the development of this encoder.
Some of the naming conventions and clarification of some aspects
of GIF file format and LZW compression were obtained from the following:
LZW.C
Copyright (c) 1989 Mark R. Nelson
LZW data compression/expansion demonstration program.
May 12, 1997
Method Summary | |
static void |
encode(java.awt.image.BufferedImage image,
java.io.DataOutput dataOutput)
Encode and write out the data contained in the BufferedImage to the
specified output in the GIF89a file format. |
static void |
encode(java.awt.image.BufferedImage image,
java.io.OutputStream outputStream)
Encode and write out the data contained in the BufferedImage to the
output stream in the GIF89a file format. |
static void |
encode(GifImage gifImage,
java.io.OutputStream outputStream)
Encode and write out the data contained in the GifImage to the
output stream in the GIF89a file format. |
static void |
encode(GifImage gifImage,
java.io.OutputStream outputStream,
boolean forceGlobalColorTableUsage)
Encode and write out the data contained in the GifImage to the
output stream in the GIF89a file format. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static final void encode(GifImage gifImage, java.io.OutputStream outputStream) throws java.io.IOException
GifImage
to the
output stream in the GIF89a file format.
gifImage
- GifImage
to encodeoutputStream
- the specified stream to output
java.io.IOException
- If write operation fails
java.lang.NullPointerException
- If gifImage is null
java.lang.NullPointerException
- If output stream is nullpublic static final void encode(GifImage gifImage, java.io.OutputStream outputStream, boolean forceGlobalColorTableUsage) throws java.io.IOException
GifImage
to the
output stream in the GIF89a file format.
gifImage
- GifImage
to encodeoutputStream
- the specified stream to outputforceGlobalColorTableUsage
- force Global Color Table usage. If true local color tables from all frames
will be union to one global color table. It's useful to optimize final image size (every Local Color Table takes up to 768 bytes).
java.io.IOException
- If write operation fails
java.lang.NullPointerException
- If GifImage
is null
java.lang.NullPointerException
- If output stream is nullpublic static final void encode(java.awt.image.BufferedImage image, java.io.OutputStream outputStream) throws java.io.IOException
BufferedImage
to the
output stream in the GIF89a file format. Running this method is equal
to running encode(GifImage gifImage, java.io.OutputStream outputStream)
where
GifImage
instance contains the only one GifFrame
instance wrapped the specified image.
image
- image to encodeoutputStream
- the specified stream to output
java.io.IOException
- If write operation fails
java.lang.NullPointerException
- If image is null
java.lang.NullPointerException
- If output stream is nullpublic static final void encode(java.awt.image.BufferedImage image, java.io.DataOutput dataOutput) throws java.io.IOException
BufferedImage
to the
specified output in the GIF89a file format.
image
- image to encodedataOutput
- the specified output to write
java.io.IOException
- If write operation fails
java.lang.NullPointerException
- If image is null
java.lang.NullPointerException
- If output is null
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |