public final class GIFFileFormat extends FileFormat
Modifier and Type | Field and Description |
---|---|
(package private) int |
backgroundPixel |
(package private) int |
bitsPerPixel |
(package private) int |
defaultDepth |
(package private) int |
delayTime |
(package private) int |
disposalMethod |
(package private) static int |
GIF_APPLICATION_EXTENSION_BLOCK_ID |
(package private) static int |
GIF_COMMENT_BLOCK_ID |
(package private) static int |
GIF_EXTENSION_BLOCK_ID |
(package private) static int |
GIF_GRAPHICS_CONTROL_BLOCK_ID |
(package private) static int |
GIF_IMAGE_BLOCK_ID |
(package private) static int |
GIF_PLAIN_TEXT_BLOCK_ID |
(package private) static int |
GIF_TRAILER_ID |
(package private) static byte[] |
GIF89a |
(package private) static byte[] |
NETSCAPE2_0 |
(package private) int |
repeatCount |
(package private) int |
screenHeight |
(package private) int |
screenWidth |
(package private) java.lang.String |
signature |
(package private) int |
transparentPixel |
compression, FORMAT_PACKAGE, FORMAT_SUFFIX, FORMATS, inputStream, loader, outputStream
Constructor and Description |
---|
GIFFileFormat() |
Modifier and Type | Method and Description |
---|---|
(package private) void |
getExtensions()
Read extensions until an image descriptor appears.
|
(package private) static PaletteData |
grayRamp(int numGrays)
Answer a palette containing numGrays
shades of gray, ranging from black to white.
|
(package private) boolean |
isFileFormat(LEDataInputStream stream)
Return whether or not the specified input stream
represents a supported file format.
|
(package private) ImageData[] |
loadFromByteStream()
Load the GIF image(s) stored in the input stream.
|
(package private) byte[] |
readApplicationExtension()
We have just read the Application extension identifier
from the input stream.
|
(package private) byte[] |
readCommentExtension()
We have just read the Comment extension identifier
from the input stream.
|
(package private) byte[] |
readExtension()
Read a control extension.
|
(package private) byte[] |
readGraphicsControlExtension()
We have just read the GraphicsControl extension identifier
from the input stream.
|
(package private) int |
readID()
Read and return the next block or extension identifier from the file.
|
(package private) ImageData |
readImageBlock(PaletteData defaultPalette)
Return a DeviceIndependentImage representing the
image block at the current position in the input stream.
|
(package private) PaletteData |
readPalette(int numColors)
Read a palette from the input stream.
|
(package private) byte[] |
readPlainTextExtension()
We have just read the PlainText extension identifier
from the input stream.
|
(package private) void |
unloadIntoByteStream(ImageLoader loader) |
(package private) void |
writeGraphicsControlBlock(ImageData image)
Write out a GraphicsControlBlock to describe
the specified device independent image.
|
(package private) void |
writePalette(PaletteData palette,
int depth)
Write the specified palette to the output stream.
|
load, loadFromStream, save, unloadIntoStream
java.lang.String signature
int screenWidth
int screenHeight
int backgroundPixel
int bitsPerPixel
int defaultDepth
int disposalMethod
int delayTime
int transparentPixel
int repeatCount
static final int GIF_APPLICATION_EXTENSION_BLOCK_ID
static final int GIF_GRAPHICS_CONTROL_BLOCK_ID
static final int GIF_PLAIN_TEXT_BLOCK_ID
static final int GIF_COMMENT_BLOCK_ID
static final int GIF_EXTENSION_BLOCK_ID
static final int GIF_IMAGE_BLOCK_ID
static final int GIF_TRAILER_ID
static final byte[] GIF89a
static final byte[] NETSCAPE2_0
static PaletteData grayRamp(int numGrays)
boolean isFileFormat(LEDataInputStream stream)
FileFormat
isFileFormat
in class FileFormat
ImageData[] loadFromByteStream()
loadFromByteStream
in class FileFormat
int readID()
void getExtensions()
byte[] readExtension()
byte[] readCommentExtension()
byte[] readPlainTextExtension()
byte[] readGraphicsControlExtension()
byte[] readApplicationExtension()
ImageData readImageBlock(PaletteData defaultPalette)
PaletteData readPalette(int numColors)
void unloadIntoByteStream(ImageLoader loader)
unloadIntoByteStream
in class FileFormat
void writeGraphicsControlBlock(ImageData image)
void writePalette(PaletteData palette, int depth)