Class GifImage
java.lang.Object
com.aowagie.text.pdf.codec.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.
- Author:
- Paulo Soares (psoares@consiste.pt)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintGets the number of frames the gif has.getImage(int frame) Gets the image from a frame.int[]Gets the logical screen.
-
Constructor Details
-
GifImage
Reads gif images from an URL.- Parameters:
url- the URL- Throws:
IOException- on error
-
GifImage
Reads gif images from a byte array.- Parameters:
data- the byte array- Throws:
IOException- on error
-
-
Method Details
-
getFrameCount
public int getFrameCount()Gets the number of frames the gif has.- Returns:
- the number of frames the gif has
-
getImage
Gets the image from a frame. The first frame is 1.- Parameters:
frame- the frame to get the image from- Returns:
- the image
-
getLogicalScreen
public int[] getLogicalScreen()Gets the logical screen. The images may be smaller and placed in some position in this screen to playback some animation. No image will be be bigger that this.- Returns:
- the logical screen dimensions as [x,y]
-