|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.lowagie.text.pdf.codec.GifImage
public class GifImage
Reads gif images of all types. All the images in a gif are read in the constructors and can be retrieved with other methods.
Field Summary | |
---|---|
protected int |
bgColor
|
protected int |
bgIndex
|
protected byte[] |
block
|
protected int |
blockSize
|
protected int |
delay
|
protected int |
dispose
|
protected java.util.ArrayList |
frames
|
protected byte[] |
fromData
|
protected java.net.URL |
fromUrl
|
protected boolean |
gctFlag
|
protected int |
height
|
protected int |
ih
|
protected java.io.DataInputStream |
in
|
protected boolean |
interlace
|
protected int |
iw
|
protected int |
ix
|
protected int |
iy
|
protected boolean |
lctFlag
|
protected int |
lctSize
|
protected int |
m_bpc
|
protected byte[] |
m_curr_table
|
protected int |
m_gbpc
|
protected byte[] |
m_global_table
|
protected int |
m_line_stride
|
protected byte[] |
m_local_table
|
protected byte[] |
m_out
|
protected static int |
MaxStackSize
|
protected int |
pixelAspect
|
protected byte[] |
pixels
|
protected byte[] |
pixelStack
|
protected short[] |
prefix
|
protected byte[] |
suffix
|
protected int |
transIndex
|
protected boolean |
transparency
|
protected int |
width
|
Constructor Summary | |
---|---|
GifImage(byte[] data)
Reads gif images from a byte array. |
|
GifImage(java.io.InputStream is)
Reads gif images from a stream. |
|
GifImage(java.lang.String file)
Reads gif images from a file. |
|
GifImage(java.net.URL url)
Reads gif images from an URL. |
Method Summary | |
---|---|
protected boolean |
decodeImageData()
|
int |
getFrameCount()
Gets the number of frames the gif has. |
int[] |
getFramePosition(int frame)
Gets the [x,y] position of the frame in reference to the logical screen. |
Image |
getImage(int frame)
Gets the image from a frame. |
int[] |
getLogicalScreen()
Gets the logical screen. |
protected static int |
newBpc(int bpc)
|
protected int |
readBlock()
Reads next variable length block from input. |
protected byte[] |
readColorTable(int bpc)
|
protected void |
readContents()
|
protected void |
readGraphicControlExt()
Reads Graphics Control Extension values |
protected void |
readHeader()
Reads GIF file header information. |
protected void |
readImage()
Reads next frame image |
protected void |
readLSD()
Reads Logical Screen Descriptor |
protected int |
readShort()
Reads next 16-bit value, LSB first |
protected void |
resetFrame()
Resets frame state for reading next image. |
protected void |
setPixel(int x,
int y,
int v)
|
protected void |
skip()
Skips variable length blocks up to and including next zero length block. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.io.DataInputStream in
protected int width
protected int height
protected boolean gctFlag
protected int bgIndex
protected int bgColor
protected int pixelAspect
protected boolean lctFlag
protected boolean interlace
protected int lctSize
protected int ix
protected int iy
protected int iw
protected int ih
protected byte[] block
protected int blockSize
protected int dispose
protected boolean transparency
protected int delay
protected int transIndex
protected static final int MaxStackSize
protected short[] prefix
protected byte[] suffix
protected byte[] pixelStack
protected byte[] pixels
protected byte[] m_out
protected int m_bpc
protected int m_gbpc
protected byte[] m_global_table
protected byte[] m_local_table
protected byte[] m_curr_table
protected int m_line_stride
protected byte[] fromData
protected java.net.URL fromUrl
protected java.util.ArrayList frames
Constructor Detail |
---|
public GifImage(java.net.URL url) throws java.io.IOException
url
- the URL
java.io.IOException
- on errorpublic GifImage(java.lang.String file) throws java.io.IOException
file
- the file
java.io.IOException
- on errorpublic GifImage(byte[] data) throws java.io.IOException
data
- the byte array
java.io.IOException
- on errorpublic GifImage(java.io.InputStream is) throws java.io.IOException
is
- the stream
java.io.IOException
- on errorMethod Detail |
---|
public int getFrameCount()
public Image getImage(int frame)
frame
- the frame to get the image from
public int[] getFramePosition(int frame)
frame
- the frame
public int[] getLogicalScreen()
protected void readHeader() throws java.io.IOException
java.io.IOException
protected void readLSD() throws java.io.IOException
java.io.IOException
protected int readShort() throws java.io.IOException
java.io.IOException
protected int readBlock() throws java.io.IOException
java.io.IOException
protected byte[] readColorTable(int bpc) throws java.io.IOException
java.io.IOException
protected static int newBpc(int bpc)
protected void readContents() throws java.io.IOException
java.io.IOException
protected void readImage() throws java.io.IOException
java.io.IOException
protected boolean decodeImageData() throws java.io.IOException
java.io.IOException
protected void setPixel(int x, int y, int v)
protected void resetFrame()
protected void readGraphicControlExt() throws java.io.IOException
java.io.IOException
protected void skip() throws java.io.IOException
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |