Package steganography.image.encoders
Class GifDecoder.GifImage
- java.lang.Object
-
- steganography.image.encoders.GifDecoder.GifImage
-
- Enclosing class:
- GifDecoder
public final class GifDecoder.GifImage extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description java.lang.String
appAuthCode
java.lang.String
appId
int
bgColIndex
int
colorResolution
int[]
globalColTbl
boolean
hasGlobColTbl
java.lang.String
header
int
pxAspectRatio
int
repetitions
int
sizeOfGlobColTbl
boolean
sortFlag
-
Constructor Summary
Constructors Constructor Description GifImage()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getBackgroundColor()
Returns the background color of the first frame in this GIF image.int
getDelay(int index)
If not 0, the delay specifies how many hundredths (1/100) of a second to wait before displaying the frame after the current frame.java.awt.image.BufferedImage
getFrame(int index)
int
getFrameCount()
int
getHeight()
int
getWidth()
-
-
-
Field Detail
-
header
public java.lang.String header
-
hasGlobColTbl
public boolean hasGlobColTbl
-
colorResolution
public int colorResolution
-
sortFlag
public boolean sortFlag
-
sizeOfGlobColTbl
public int sizeOfGlobColTbl
-
bgColIndex
public int bgColIndex
-
pxAspectRatio
public int pxAspectRatio
-
globalColTbl
public int[] globalColTbl
-
appId
public java.lang.String appId
-
appAuthCode
public java.lang.String appAuthCode
-
repetitions
public int repetitions
-
-
Method Detail
-
getBackgroundColor
public final int getBackgroundColor()
Returns the background color of the first frame in this GIF image. If the frame has a local color table, the returned color will be from that table. If not, the color will be from the global color table. Returns 0 if there is neither a local nor a global color table.Index of the current frame, 0 to N-1
- Returns:
- 32 bit ARGB color in the form 0xAARRGGBB
-
getDelay
public final int getDelay(int index)
If not 0, the delay specifies how many hundredths (1/100) of a second to wait before displaying the frame after the current frame.- Parameters:
index
- Index of the current frame, 0 to N-1- Returns:
- Delay as number of hundredths (1/100) of a second
-
getFrame
public final java.awt.image.BufferedImage getFrame(int index)
- Parameters:
index
- Index of the frame to return as image, starting from 0. For incremental calls such as [0, 1, 2, ...] the method's run time is O(1) as only one frame is drawn per call. For random access calls such as [7, 12, ...] the run time is O(N+1) with N being the number of previous frames that need to be drawn before N+1 can be drawn on top. Once a frame has been drawn it is being cached and the run time is more or less O(0) to retrieve it from the list.- Returns:
- A BufferedImage for the specified frame.
-
getFrameCount
public final int getFrameCount()
- Returns:
- The number of frames contained in this GIF image
-
getHeight
public final int getHeight()
- Returns:
- The height of the GIF image
-
getWidth
public final int getWidth()
- Returns:
- The width of the GIF image
-
-