|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.io.OutputStream java.io.FilterOutputStream jwo.utils.gifutils.BitOutputStream jwo.utils.gifutils.GIFOutputStream
GIFOutputStream provides writeXXX() methods useful for writing out a bitmap image to a GIF file. Included are methods which handle LZW compression of the image data.
Field Summary | |
static int |
MAXIMUM_CODE_LENGTH
the maximum code size in bits for GIF LZW compression |
protected jwo.utils.gifutils.LZWStringTable |
stringTable
the string table for LZW compression |
Fields inherited from class jwo.utils.gifutils.BitOutputStream |
cachedBits, numCachedBits |
Fields inherited from class java.io.FilterOutputStream |
out |
Constructor Summary | |
GIFOutputStream(OutputStream os)
|
Method Summary | |
protected void |
writeCode(short code,
BitOutputStream bos)
Write a code to the given BitOutputStream using the current bit length from the string table. |
void |
writeColor(Color color)
Writes a color as 3 bytes in RRGGBB hex format. |
void |
writeDataBlock(byte[] block)
Write the given bytes to the underlying output stream as a series of data sub-blocks. |
void |
writeDataSubBlock(byte[] subBlock)
Write a data sub-block from the underlying stream. |
void |
writeImageData(byte[] pixels,
int bpp)
LZW compresses the given pixel data and writes it to the underlying output stream as a data block. |
void |
writeWord(int word)
Writes an unsigned LSB-first 16 byte word to the underlying stream. |
Methods inherited from class jwo.utils.gifutils.BitOutputStream |
flush, write, writeBit, writeBits |
Methods inherited from class java.io.FilterOutputStream |
close, write, write |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int MAXIMUM_CODE_LENGTH
protected jwo.utils.gifutils.LZWStringTable stringTable
Constructor Detail |
public GIFOutputStream(OutputStream os)
Method Detail |
public void writeWord(int word) throws IOException
IOException
public void writeColor(Color color) throws IOException
IOException
public void writeDataSubBlock(byte[] subBlock) throws IOException
IOException
public void writeDataBlock(byte[] block) throws IOException
IOException
protected void writeCode(short code, BitOutputStream bos) throws IOException
IOException
public void writeImageData(byte[] pixels, int bpp) throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |