|
|||||||||||
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.
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 | |
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 |
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_NOT_SPECIFIED
public static final int DISPOSAL_METHOD_DO_NOT_DISPOSE
public static final int DISPOSAL_METHOD_RESTORE_TO_BACKGROUND_COLOR
public static final int DISPOSAL_METHOD_RESTORE_TO_PREVIOUS
public static final int LAYOUT_TOP_LEFT
public static final int LAYOUT_TOP_CENTER
public static final int LAYOUT_TOP_RIGHT
public static final int LAYOUT_MIDDLE_LEFT
public static final int LAYOUT_MIDDLE_CENTER
public static final int LAYOUT_MIDDLE_RIGHT
public static final int LAYOUT_BOTTOM_LEFT
public static final int LAYOUT_BOTTOM_CENTER
public static final int LAYOUT_BOTTOM_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 nullpublic 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_RIGHT
java.lang.NullPointerException
- If image is null
java.lang.IllegalArgumentException
- If unknown layout constraintpublic 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_RIGHT
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.NullPointerException
- If image is null
java.lang.IllegalArgumentException
- If unknown disposal method
java.lang.IllegalArgumentException
- If unknown layout constraintpublic 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_RIGHT
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
delay
- 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 constraintpublic 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 nullpublic 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 methodpublic 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_COLOR
delay
- 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 methodMethod Detail |
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 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_RIGHT
java.lang.IllegalArgumentException
- If unknown layout constraintpublic void setDelay(int delay)
delay
- the specified delay time in 1/100 seconds (100 means 1 second delay)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |