public class GIF
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static int |
DISPOSE_METHOD_NONE
Indicates the method NONE
|
private static int |
DISPOSE_METHOD_NOT_DISPOSE
Indicates the method NOT DISPOSE
|
private static int |
DISPOSE_METHOD_RESTORE_BACKGROUND
Indicates the method RESTORE BACKGROUND
|
private static int |
DISPOSE_METHOD_RESTORE_PREVIOUS
Indicates the method RESTORE PREVIOUS
|
private static com.sun.imageio.plugins.gif.GIFImageReader |
GIFReader
GIF image reader
|
private int |
height
Image height
|
private java.awt.image.BufferedImage[] |
images
Images contains in the GIF
|
private int |
width
Image width
|
Constructor and Description |
---|
GIF(java.io.InputStream inputStream)
Constructs GIF
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
computeMD5()
Compute GIF MD5
|
void |
destroy()
Destroy the gif to free memory
|
int |
getHeight()
Image height
|
java.awt.image.BufferedImage |
getImage(int index)
Get a image
|
int |
getWidth()
Image width
|
boolean |
isUsable()
Indicates if this instance can be use.
|
int |
numberOfImage()
Number of images
|
private static com.sun.imageio.plugins.gif.GIFImageReader |
obtainImageReader()
Obtain GIF image reader
|
private static final int DISPOSE_METHOD_NONE
private static final int DISPOSE_METHOD_NOT_DISPOSE
private static final int DISPOSE_METHOD_RESTORE_BACKGROUND
private static final int DISPOSE_METHOD_RESTORE_PREVIOUS
private static final com.sun.imageio.plugins.gif.GIFImageReader GIFReader
private int height
private java.awt.image.BufferedImage[] images
private int width
public GIF(java.io.InputStream inputStream) throws java.io.IOException
inputStream
- Stream to read the GIFjava.io.IOException
- On reading problemprivate static com.sun.imageio.plugins.gif.GIFImageReader obtainImageReader()
public java.lang.String computeMD5() throws java.security.NoSuchAlgorithmException, java.io.IOException
java.security.NoSuchAlgorithmException
- If MD5 unknownjava.io.IOException
- On computing problempublic void destroy()
public int getHeight()
public java.awt.image.BufferedImage getImage(int index)
index
- Image indexpublic int getWidth()
public boolean isUsable()
destroy()
never calltrue
if the instance can be usepublic int numberOfImage()