Top Fields Constructors Methods
org.eclipse.swt.internal.image

public final Class GIFFileFormat

extends FileFormat
Class Inheritance
Imports
org.eclipse.swt.*, org.eclipse.swt.graphics.*, java.io.*

Field Summary

Modifier and TypeField and Description
pack-priv int
pack-priv int
pack-priv int
pack-priv int
pack-priv int
pack-priv static final byte[]
pack-priv static final int
pack-priv static final int
pack-priv static final int
pack-priv static final int
pack-priv static final int
pack-priv static final int
pack-priv static final int
pack-priv static final byte[]
pack-priv int
pack-priv int
pack-priv int
pack-priv String
pack-priv int
Inherited from org.eclipse.swt.internal.image.FileFormat:
compressionFORMAT_PACKAGEFORMAT_SUFFIXFORMATSinputStreamloaderoutputStream

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
pack-priv static PaletteData
grayRamp(int numGrays)

Answer a palette containing numGrays shades of gray, ranging from black to white.

pack-priv boolean
isFileFormat(LEDataInputStream stream)

Implements abstract org.eclipse.swt.internal.image.FileFormat.isFileFormat.

Return whether or not the specified input stream represents a supported file format.
pack-priv ImageData[]
loadFromByteStream()

Implements abstract org.eclipse.swt.internal.image.FileFormat.loadFromByteStream.

Load the GIF image(s) stored in the input stream.
pack-priv byte[]
readApplicationExtension()

We have just read the Application extension identifier from the input stream.

pack-priv byte[]
readCommentExtension()

We have just read the Comment extension identifier from the input stream.

pack-priv byte[]
readExtension()

Read a control extension.

pack-priv byte[]
readGraphicsControlExtension()

We have just read the GraphicsControl extension identifier from the input stream.

pack-priv int
readID()

Read and return the next block or extension identifier from the file.

pack-priv ImageData
readImageBlock(PaletteData defaultPalette)

Return a DeviceIndependentImage representing the image block at the current position in the input stream.

pack-priv PaletteData
readPalette(int numColors)

Read a palette from the input stream.

pack-priv byte[]
readPlainTextExtension()

We have just read the PlainText extension identifier from the input stream.

pack-priv void
pack-priv void
writeGraphicsControlBlock(ImageData image)

Write out a GraphicsControlBlock to describe the specified device independent image.

pack-priv void
writePalette(PaletteData palette, int depth)

Write the specified palette to the output stream.

Inherited from org.eclipse.swt.internal.image.FileFormat:
getFileFormatloadloadFromStreamsaveunloadIntoStream

Field Detail

backgroundPixelback to summary
pack-priv int backgroundPixel
bitsPerPixelback to summary
pack-priv int bitsPerPixel
defaultDepthback to summary
pack-priv int defaultDepth
delayTimeback to summary
pack-priv int delayTime
disposalMethodback to summary
pack-priv int disposalMethod
GIF89aback to summary
pack-priv static final byte[] GIF89a
GIF_APPLICATION_EXTENSION_BLOCK_IDback to summary
pack-priv static final int GIF_APPLICATION_EXTENSION_BLOCK_ID
GIF_COMMENT_BLOCK_IDback to summary
pack-priv static final int GIF_COMMENT_BLOCK_ID
GIF_EXTENSION_BLOCK_IDback to summary
pack-priv static final int GIF_EXTENSION_BLOCK_ID
GIF_GRAPHICS_CONTROL_BLOCK_IDback to summary
pack-priv static final int GIF_GRAPHICS_CONTROL_BLOCK_ID
GIF_IMAGE_BLOCK_IDback to summary
pack-priv static final int GIF_IMAGE_BLOCK_ID
GIF_PLAIN_TEXT_BLOCK_IDback to summary
pack-priv static final int GIF_PLAIN_TEXT_BLOCK_ID
GIF_TRAILER_IDback to summary
pack-priv static final int GIF_TRAILER_ID
NETSCAPE2_0back to summary
pack-priv static final byte[] NETSCAPE2_0
repeatCountback to summary
pack-priv int repeatCount
screenHeightback to summary
pack-priv int screenHeight
screenWidthback to summary
pack-priv int screenWidth
signatureback to summary
pack-priv String signature
transparentPixelback to summary
pack-priv int transparentPixel

Constructor Detail

GIFFileFormatback to summary
public GIFFileFormat()

Method Detail

grayRampback to summary
pack-priv static PaletteData grayRamp(int numGrays)

Answer a palette containing numGrays shades of gray, ranging from black to white.

isFileFormatback to summary
pack-priv boolean isFileFormat(LEDataInputStream stream)

Implements abstract org.eclipse.swt.internal.image.FileFormat.isFileFormat.

Doc from org.eclipse.swt.internal.image.FileFormat.isFileFormat.

Return whether or not the specified input stream represents a supported file format.

Annotations
@Override
loadFromByteStreamback to summary
pack-priv ImageData[] loadFromByteStream()

Implements abstract org.eclipse.swt.internal.image.FileFormat.loadFromByteStream.

Load the GIF image(s) stored in the input stream. Return an array of ImageData representing the image(s).

Annotations
@Override
readApplicationExtensionback to summary
pack-priv 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.

readCommentExtensionback to summary
pack-priv 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.

readExtensionback to summary
pack-priv byte[] readExtension()

Read a control extension. Return the extension block data.

readGraphicsControlExtensionback to summary
pack-priv byte[] readGraphicsControlExtension()

We have just read the GraphicsControl extension identifier from the input stream. Read in the control information, store it, and return it.

readIDback to summary
pack-priv int readID()

Read and return the next block or extension identifier from the file.

readImageBlockback to summary
pack-priv ImageData readImageBlock(PaletteData defaultPalette)

Return a DeviceIndependentImage representing the image block at the current position in the input stream. Throw an error if an error occurs.

readPaletteback to summary
pack-priv PaletteData readPalette(int numColors)

Read a palette from the input stream.

readPlainTextExtensionback to summary
pack-priv 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.

unloadIntoByteStreamback to summary
pack-priv void unloadIntoByteStream(ImageLoader loader)

Implements abstract org.eclipse.swt.internal.image.FileFormat.unloadIntoByteStream.

Annotations
@Override
writeGraphicsControlBlockback to summary
pack-priv void writeGraphicsControlBlock(ImageData image)

Write out a GraphicsControlBlock to describe the specified device independent image.

writePaletteback to summary
pack-priv void writePalette(PaletteData palette, int depth)

Write the specified palette to the output stream.