| java.lang.Object de.anomic.ymage.AnimGifEncoder
AnimGifEncoder | public class AnimGifEncoder (Code) | | This class can be used to write an animated GIF file by combining several
images. It is loosely based on the Acme GIF encoder.
The characteristics of the generated Gif 89a image are:
- Only a single color table is used (no local tables). This table is
created by combining the colors from all other images.
author: F. Jalvingh |
Method Summary | |
final int | MAXCODE(int n_bits) | public void | add(Image ima, int delaytime, boolean interlace, int px, int py) Adds the specified image to the list of images. | public void | add(Image ima) Adds the specified image to the list of images. | public void | add(Image ima, int delay) Adds the specified image to the list of images. | void | char_init() | void | char_out(byte c) | void | cl_block() | void | cl_hash(int hsize) | public void | encode() Creates the GIF file from all images added to the encoder. | public void | flush() Releases ALL cached resources. | void | flush_char() | public static void | main(String[] args) | void | output(int code) | public void | setLoop(boolean loop) For animated GIF's the default is to LOOP all images in the GIF file. |
BITS | final static int BITS(Code) | | |
HSIZE | final static int HSIZE(Code) | | |
clear_flg | boolean clear_flg(Code) | | |
g_init_bits | int g_init_bits(Code) | | |
m_no_opt | public boolean m_no_opt(Code) | | |
maxmaxcode | int maxmaxcode(Code) | | |
AnimGifEncoder | public AnimGifEncoder(OutputStream os)(Code) | | This constructor creates an empty default codec.
|
AnimGifEncoder | public AnimGifEncoder(OutputStream os, boolean interlace)(Code) | | Creates a codec and specify interlace (not implemented yet).
|
MAXCODE | final int MAXCODE(int n_bits)(Code) | | |
add | public void add(Image ima, int delaytime, boolean interlace, int px, int py) throws IOException(Code) | | Adds the specified image to the list of images. While adding, the
image is converted to pixels; each color is added to the color table
and the resulting 8-bit pixelset is saved. After this call the image
is released, and only the pixelset remains until the encode call is
made. Calling encode will release the pixelset.
|
add | public void add(Image ima, int delay) throws IOException(Code) | | Adds the specified image to the list of images.
|
char_init | void char_init()(Code) | | |
cl_hash | void cl_hash(int hsize)(Code) | | |
encode | public void encode() throws IOException(Code) | | Creates the GIF file from all images added to the encoder.
|
flush | public void flush()(Code) | | Releases ALL cached resources.
|
setLoop | public void setLoop(boolean loop)(Code) | | For animated GIF's the default is to LOOP all images in the GIF file.
This means that after displaying all images in the file the first image
is redisplayed ad infinitum.
To prevent the images from looping call setLoop(false) before calling
the encode() method.
The current version does not allow the number of repetitions to be
specified.
|
|
|