Class GIFFileFormat
java.lang.Object
org.eclipse.swt.internal.image.FileFormat
org.eclipse.swt.internal.image.FileFormat.StaticImageFileFormat
org.eclipse.swt.internal.image.GIFFileFormat
-
Nested Class Summary
Nested classes/interfaces inherited from class FileFormat
FileFormat.StaticImageFileFormat -
Field Summary
FieldsModifier and TypeFieldDescription(package private) int(package private) int(package private) int(package private) int(package private) int(package private) static final int(package private) static final int(package private) static final int(package private) static final int(package private) static final int(package private) static final int(package private) static final int(package private) static final byte[](package private) static final byte[](package private) int(package private) int(package private) int(package private) String(package private) intFields inherited from class FileFormat
compression, DEFAULT_ZOOM, inputStream, loader, outputStream -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static PaletteDatagrayRamp(int numGrays) Answer a palette containing numGrays shades of gray, ranging from black to white.(package private) booleanisFileFormat(LEDataInputStream stream) Return whether or not the specified input stream represents a supported file format.(package private) ImageData[]Load the GIF image(s) stored in the input stream.(package private) byte[]We have just read the Application extension identifier from the input stream.(package private) byte[]We have just read the Comment extension identifier from the input stream.(package private) byte[]Read a control extension.(package private) byte[]We have just read the GraphicsControl extension identifier from the input stream.(package private) intreadID()Read and return the next block or extension identifier from the file.(package private) ImageDatareadImageBlock(PaletteData defaultPalette) Return a DeviceIndependentImage representing the image block at the current position in the input stream.(package private) PaletteDatareadPalette(int numColors) Read a palette from the input stream.(package private) byte[]We have just read the PlainText extension identifier from the input stream.(package private) voidunloadIntoByteStream(ImageLoader loader) (package private) voidWrite out a GraphicsControlBlock to describe the specified device independent image.(package private) voidwritePalette(PaletteData palette, int depth) Write the specified palette to the output stream.Methods inherited from class FileFormat.StaticImageFileFormat
loadFromByteStream, loadFromByteStreamBySizeMethods inherited from class FileFormat
canLoadAtZoom, isDynamicallySizableFormat, load, load, loadFromStream, loadFromStreamBySize, save, unloadIntoStream
-
Field Details
-
signature
String signature -
screenWidth
int screenWidth -
screenHeight
int screenHeight -
backgroundPixel
int backgroundPixel -
bitsPerPixel
int bitsPerPixel -
defaultDepth
int defaultDepth -
disposalMethod
int disposalMethod -
delayTime
int delayTime -
transparentPixel
int transparentPixel -
repeatCount
int repeatCount -
GIF_APPLICATION_EXTENSION_BLOCK_ID
static final int GIF_APPLICATION_EXTENSION_BLOCK_ID- See Also:
-
GIF_GRAPHICS_CONTROL_BLOCK_ID
static final int GIF_GRAPHICS_CONTROL_BLOCK_ID- See Also:
-
GIF_PLAIN_TEXT_BLOCK_ID
static final int GIF_PLAIN_TEXT_BLOCK_ID- See Also:
-
GIF_COMMENT_BLOCK_ID
static final int GIF_COMMENT_BLOCK_ID- See Also:
-
GIF_EXTENSION_BLOCK_ID
static final int GIF_EXTENSION_BLOCK_ID- See Also:
-
GIF_IMAGE_BLOCK_ID
static final int GIF_IMAGE_BLOCK_ID- See Also:
-
GIF_TRAILER_ID
static final int GIF_TRAILER_ID- See Also:
-
GIF89a
static final byte[] GIF89a -
NETSCAPE2_0
static final byte[] NETSCAPE2_0
-
-
Constructor Details
-
GIFFileFormat
public GIFFileFormat()
-
-
Method Details
-
grayRamp
Answer a palette containing numGrays shades of gray, ranging from black to white. -
isFileFormat
Description copied from class:FileFormatReturn whether or not the specified input stream represents a supported file format.- Specified by:
isFileFormatin classFileFormat- Throws:
IOException
-
loadFromByteStream
ImageData[] loadFromByteStream()Load the GIF image(s) stored in the input stream. Return an array of ImageData representing the image(s).- Specified by:
loadFromByteStreamin classFileFormat.StaticImageFileFormat
-
readID
int readID()Read and return the next block or extension identifier from the file. -
readExtension
byte[] readExtension()Read a control extension. Return the extension block data. -
readCommentExtension
byte[] readCommentExtension()We have just read the Comment extension identifier from the input stream. Read in the rest of the comment and return it. GIF comment blocks are variable size. -
readPlainTextExtension
byte[] readPlainTextExtension()We have just read the PlainText extension identifier from the input stream. Read in the plain text info and text, and return the text. GIF plain text blocks are variable size. -
readGraphicsControlExtension
byte[] readGraphicsControlExtension()We have just read the GraphicsControl extension identifier from the input stream. Read in the control information, store it, and return it. -
readApplicationExtension
byte[] readApplicationExtension()We have just read the Application extension identifier from the input stream. Read in the rest of the extension, look for and store 'number of repeats', and return the data. -
readImageBlock
Return a DeviceIndependentImage representing the image block at the current position in the input stream. Throw an error if an error occurs. -
readPalette
Read a palette from the input stream. -
unloadIntoByteStream
- Specified by:
unloadIntoByteStreamin classFileFormat
-
writeGraphicsControlBlock
Write out a GraphicsControlBlock to describe the specified device independent image. -
writePalette
Write the specified palette to the output stream.
-