|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.gif4j.GifFrame
An instance of this class is used as a container to aggregate and encode the gif format specific
information about a single image frame. This information includes:
BufferedImage instanceGifImage logical screen.
This position can be set absolutely by Point instance or relatively by layout constraint (see LAYOUT_TOP_LEFT etc).
DISPOSAL_METHOD_NOT_SPECIFIED, DISPOSAL_METHOD_DO_NOT_DISPOSE, DISPOSAL_METHOD_RESTORE_TO_PREVIOUS, DISPOSAL_METHOD_RESTORE_TO_BACKGROUND_COLOR )
GifImage) -
This block contains a color table, which is a sequence of bytes representing
red-green-blue color triplets. The Local Color Table is used by the image that immediately follows.
If present, this color table temporarily becomes the active color table and
the following image should be processed using it. One color from this table can be marked as TRANSPARENT_COLOR.
GifImage,
BufferedImage,
ColorModel,
IndexColorModel| Field Summary | |
static int |
DISPOSAL_METHOD_DO_NOT_DISPOSE
Do not dispose. |
static int |
DISPOSAL_METHOD_NOT_SPECIFIED
No disposal specified. |
static int |
DISPOSAL_METHOD_RESTORE_TO_BACKGROUND_COLOR
Restore to background color. |
static int |
DISPOSAL_METHOD_RESTORE_TO_PREVIOUS
Restore to previous. |
static int |
LAYOUT_BOTTOM_CENTER
The bottom-center layout constraint. |
static int |
LAYOUT_BOTTOM_LEFT
The bottom-left layout constraint. |
static int |
LAYOUT_BOTTOM_RIGHT
The bottom-right layout constraint. |
static int |
LAYOUT_MIDDLE_CENTER
The middle-center layout constraint. |
static int |
LAYOUT_MIDDLE_LEFT
The middle-left layout constraint. |
static int |
LAYOUT_MIDDLE_RIGHT
The middle-right layout constraint. |
static int |
LAYOUT_TOP_CENTER
The top-center layout constraint |
static int |
LAYOUT_TOP_LEFT
The top-left layout constraint. |
static int |
LAYOUT_TOP_RIGHT
The top-right layout constraint. |
| Constructor Summary | |
GifFrame(java.awt.image.BufferedImage image)
Constructs GifFrame from the specified BufferedImage
with the absolute position (0,0), indefinite delay and DISPOSAL_METHOD_DO_NOT_DISPOSE disposal method. |
|
GifFrame(java.awt.image.BufferedImage image,
int layoutConstraint)
Constructs GifFrame from the specified BufferedImage
with the relative position (final position is calculated according to one of the predifined
layout constraint before the final encoding process starts), indefinite delay and DISPOSAL_METHOD_DO_NOT_DISPOSE disposal method. |
|
GifFrame(java.awt.image.BufferedImage image,
int layoutConstraint,
int disposalMethod)
Constructs GifFrame from the specified BufferedImage
with the relative position (final position is calculated according to one of the predifined
layout constraint before the final encoding process starts), indefinite delay and one of the predefined disposal methods. |
|
GifFrame(java.awt.image.BufferedImage image,
int layoutConstraint,
int disposalMethod,
int delay)
Constructs GifFrame from the specified BufferedImage
with the relative position (final position is calculated according to one of the predifined
layout constraint before the final encoding process starts), the specified delay and one of the predefined disposal methods. |
|
GifFrame(java.awt.image.BufferedImage image,
java.awt.Point position)
Constructs GifFrame from the specified BufferedImage
with the specified absolute position, indefinite delay and DISPOSAL_METHOD_DO_NOT_DISPOSE disposal method. |
|
GifFrame(java.awt.image.BufferedImage image,
java.awt.Point position,
int disposalMethod)
Constructs GifFrame from the specified BufferedImage
with the specified absolute position, one of the predefined disposal methods and indefinite delay. |
|
GifFrame(java.awt.image.BufferedImage image,
java.awt.Point position,
int disposalMethod,
int delay)
Constructs GifFrame from the specified BufferedImage
with the specified absolute position, delay and one of the predefined disposal methods. |
|
| Method Summary | |
java.awt.image.BufferedImage |
getAsBufferedImage()
Returns a copy of the frame's image as an instance of BufferedImage. |
java.awt.Image |
getAsImage()
Returns a copy of the frame's image as an instance of Image. |
java.awt.image.IndexColorModel |
getColorModel()
Returns a copy of the frame's image color model as an instance of IndexColorModel |
int |
getDelay()
Get frame's delay time |
int |
getDisposalMethod()
Get frame's disposal method which indicates how to dispose of the current frame before displaying the next. |
int |
getHeight()
Returns frame's height |
int |
getWidth()
Returns frame's width |
int |
getX()
Get x coordinate of the top left corner of the frame within the logical screen. |
int |
getY()
Get y coordinate of the top left corner of the frame within the logical screen. |
boolean |
isInterlaced()
Returns interlace flag - indicates if the image is interlaced. |
void |
setDelay(int delay)
Set the specified delay time |
void |
setDisposalMethod(int disposalMethod)
Set the one of the predefined disposal methods to this GifFrame |
void |
setInterlaced(boolean interlaced)
Set interlace flag - indicates if the image is interlaced. |
void |
setLayoutConstraint(int layoutConstraint)
Set the relative position of the this GifFrame (final position is calculated according
to one of the predefined layout constraints before the final encoding process starts) |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int DISPOSAL_METHOD_DO_NOT_DISPOSE
public static final int DISPOSAL_METHOD_NOT_SPECIFIED
public static final int DISPOSAL_METHOD_RESTORE_TO_BACKGROUND_COLOR
public static final int DISPOSAL_METHOD_RESTORE_TO_PREVIOUS
public static final int LAYOUT_BOTTOM_CENTER
public static final int LAYOUT_BOTTOM_LEFT
public static final int LAYOUT_BOTTOM_RIGHT
public static final int LAYOUT_MIDDLE_CENTER
public static final int LAYOUT_MIDDLE_LEFT
public static final int LAYOUT_MIDDLE_RIGHT
public static final int LAYOUT_TOP_CENTER
public static final int LAYOUT_TOP_LEFT
public static final int LAYOUT_TOP_RIGHT
| Constructor Detail |
public GifFrame(java.awt.image.BufferedImage image)
GifFrame from the specified BufferedImage
with the absolute position (0,0), indefinite delay and DISPOSAL_METHOD_DO_NOT_DISPOSE disposal method.
image - image to init frame from
java.lang.NullPointerException - If image is null
public GifFrame(java.awt.image.BufferedImage image,
int layoutConstraint)
GifFrame from the specified BufferedImage
with the relative position (final position is calculated according to one of the predifined
layout constraint before the final encoding process starts), indefinite delay and DISPOSAL_METHOD_DO_NOT_DISPOSE disposal method.
image - image to init frame fromlayoutConstraint - one of the predefined layout constraints:
LAYOUT_TOP_LEFT,
LAYOUT_TOP_CENTER,
LAYOUT_TOP_RIGHT,
LAYOUT_MIDDLE_LEFT,
LAYOUT_MIDDLE_CENTER,
LAYOUT_MIDDLE_RIGHT,
LAYOUT_BOTTOM_LEFT,
LAYOUT_BOTTOM_CENTER,
LAYOUT_BOTTOM_RIGHTjava.lang.NullPointerException - If image is null
java.lang.IllegalArgumentException - If unknown layout constraint
public GifFrame(java.awt.image.BufferedImage image,
int layoutConstraint,
int disposalMethod)
GifFrame from the specified BufferedImage
with the relative position (final position is calculated according to one of the predifined
layout constraint before the final encoding process starts), indefinite delay and one of the predefined disposal methods.
image - image to init frame fromlayoutConstraint - one of the predefined layout constraints:
LAYOUT_TOP_LEFT,
LAYOUT_TOP_CENTER,
LAYOUT_TOP_RIGHT,
LAYOUT_MIDDLE_LEFT,
LAYOUT_MIDDLE_CENTER,
LAYOUT_MIDDLE_RIGHT,
LAYOUT_BOTTOM_LEFT,
LAYOUT_BOTTOM_CENTER,
LAYOUT_BOTTOM_RIGHTdisposalMethod - one of the predefined disposal methods:
DISPOSAL_METHOD_NOT_SPECIFIED,
DISPOSAL_METHOD_DO_NOT_DISPOSE,
DISPOSAL_METHOD_RESTORE_TO_PREVIOUS,
DISPOSAL_METHOD_RESTORE_TO_BACKGROUND_COLOR
java.lang.NullPointerException - If image is null
java.lang.IllegalArgumentException - If unknown disposal method
java.lang.IllegalArgumentException - If unknown layout constraint
public GifFrame(java.awt.image.BufferedImage image,
int layoutConstraint,
int disposalMethod,
int delay)
GifFrame from the specified BufferedImage
with the relative position (final position is calculated according to one of the predifined
layout constraint before the final encoding process starts), the specified delay and one of the predefined disposal methods.
image - image to init frame fromlayoutConstraint - one of the predefined layout constraints:
LAYOUT_TOP_LEFT,
LAYOUT_TOP_CENTER,
LAYOUT_TOP_RIGHT,
LAYOUT_MIDDLE_LEFT,
LAYOUT_MIDDLE_CENTER,
LAYOUT_MIDDLE_RIGHT,
LAYOUT_BOTTOM_LEFT,
LAYOUT_BOTTOM_CENTER,
LAYOUT_BOTTOM_RIGHTdisposalMethod - one of the predefined disposal methods:
DISPOSAL_METHOD_NOT_SPECIFIED,
DISPOSAL_METHOD_DO_NOT_DISPOSE,
DISPOSAL_METHOD_RESTORE_TO_PREVIOUS,
DISPOSAL_METHOD_RESTORE_TO_BACKGROUND_COLORdelay - the specified delay time in 1/100 seconds (100 means 1 second delay)
java.lang.NullPointerException - image is null
java.lang.IllegalArgumentException - If unknown disposal method
java.lang.IllegalArgumentException - If unknown layout constraint
public GifFrame(java.awt.image.BufferedImage image,
java.awt.Point position)
GifFrame from the specified BufferedImage
with the specified absolute position, indefinite delay and DISPOSAL_METHOD_DO_NOT_DISPOSE disposal method.
image - image to init frame fromposition - absolute position
java.lang.NullPointerException - If image is null
public GifFrame(java.awt.image.BufferedImage image,
java.awt.Point position,
int disposalMethod)
GifFrame from the specified BufferedImage
with the specified absolute position, one of the predefined disposal methods and indefinite delay.
image - image to init frame fromposition - absolute positiondisposalMethod - one of the predefined disposal methods:
DISPOSAL_METHOD_NOT_SPECIFIED,
DISPOSAL_METHOD_DO_NOT_DISPOSE,
DISPOSAL_METHOD_RESTORE_TO_PREVIOUS,
DISPOSAL_METHOD_RESTORE_TO_BACKGROUND_COLOR
java.lang.NullPointerException - If image is null
java.lang.IllegalArgumentException - If unknown disposal method
public GifFrame(java.awt.image.BufferedImage image,
java.awt.Point position,
int disposalMethod,
int delay)
GifFrame from the specified BufferedImage
with the specified absolute position, delay and one of the predefined disposal methods.
image - image to init frame fromposition - absolute positiondisposalMethod - one of the predefined disposal methods:
DISPOSAL_METHOD_NOT_SPECIFIED,
DISPOSAL_METHOD_DO_NOT_DISPOSE,
DISPOSAL_METHOD_RESTORE_TO_PREVIOUS,
DISPOSAL_METHOD_RESTORE_TO_BACKGROUND_COLORdelay - the specified delay time in 1/100 seconds (100 means 1 second delay)
java.lang.NullPointerException - If image is null
java.lang.IllegalArgumentException - If unknown disposal method| Method Detail |
public java.awt.image.BufferedImage getAsBufferedImage()
BufferedImage.
BufferedImageBufferedImagepublic java.awt.Image getAsImage()
Image.
ImageImagepublic java.awt.image.IndexColorModel getColorModel()
IndexColorModel
IndexColorModelpublic int getDelay()
public int getDisposalMethod()
DISPOSAL_METHOD_NOT_SPECIFIED,
DISPOSAL_METHOD_DO_NOT_DISPOSE,
DISPOSAL_METHOD_RESTORE_TO_PREVIOUS,
DISPOSAL_METHOD_RESTORE_TO_BACKGROUND_COLOR
public int getHeight()
public int getWidth()
public int getX()
public int getY()
public boolean isInterlaced()
public void setDelay(int delay)
delay - the specified delay time in 1/100 seconds (100 means 1 second delay)public void setDisposalMethod(int disposalMethod)
GifFrame
disposalMethod - one of the predefined disposal methods:
DISPOSAL_METHOD_NOT_SPECIFIED,
DISPOSAL_METHOD_DO_NOT_DISPOSE,
DISPOSAL_METHOD_RESTORE_TO_PREVIOUS,
DISPOSAL_METHOD_RESTORE_TO_BACKGROUND_COLOR
java.lang.IllegalArgumentException - If unknown disposal methodpublic void setInterlaced(boolean interlaced)
interlaced - interlace flagpublic void setLayoutConstraint(int layoutConstraint)
GifFrame (final position is calculated according
to one of the predefined layout constraints before the final encoding process starts)
layoutConstraint - one of the predefined layout constraints:
LAYOUT_TOP_LEFT,
LAYOUT_TOP_CENTER,
LAYOUT_TOP_RIGHT,
LAYOUT_MIDDLE_LEFT,
LAYOUT_MIDDLE_CENTER,
LAYOUT_MIDDLE_RIGHT,
LAYOUT_BOTTOM_LEFT,
LAYOUT_BOTTOM_CENTER,
LAYOUT_BOTTOM_RIGHTjava.lang.IllegalArgumentException - If unknown layout constraint
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||