Top Description Fields Constructors Methods
sun.awt.image

public Class GifImageDecoder

Additional top-level class in compilation unit: GifFrame.

extends ImageDecoder
Class Inheritance
Imports
java.util.Hashtable, java.io.InputStream, .IOException, java.awt.image.*

Gif Image converter
Authors
Arthur van Hoff, Jim Graham

Field Summary

Modifier and TypeField and Description
private static final int
pack-priv GifFrame
private static final int
private static final int
private static final int
private static final int
pack-priv int
pack-priv byte[]
pack-priv int
pack-priv IndexColorModel
pack-priv int
private static final int
private static final int
interlaceflags

The ImageConsumer hints flag for an interlaced GIF image.

private static final int
private static final int
normalflags

The ImageConsumer hints flag for a non-interlaced GIF image.

pack-priv int
private byte[]
private short[]
pack-priv Hashtable<String, Object>
pack-priv byte[]
pack-priv IndexColorModel
private byte[]
private static final int
pack-priv int
private static final int
private static final boolean
Inherited from sun.awt.image.ImageDecoder:
abortedfeederfinishedinputnextqueuesource

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private static void
error(String s1)

An error has occurred.

private static final int
ExtractByte(byte[] buf, int off)

private static final int
ExtractWord(byte[] buf, int off)

public static byte[]
grow_colormap(byte[] colormap, int newlen)

private static native void
private native boolean
parseImage(int x, int y, int width, int height, boolean interlace, int initCodeSize, byte[] block, byte[] rasline, IndexColorModel model)

public void
produceImage()

Implements abstract sun.awt.image.ImageDecoder.produceImage.

produce an image from the stream.

private int

Returns:

number of bytes that were not read due to EOF or error
readBytes
(byte[] buf, int off, int len)

Read a number of bytes into a buffer.

private void
readHeader()

Read Image header

private boolean
readImage(boolean first, int disposal_method, int delay)

Read Image data

private int
sendPixels(int x, int y, int width, int height, byte[] rasline, ColorModel model)

Inherited from sun.awt.image.ImageDecoder:
abortcloseheaderCompleteimageCompleteisConsumernextConsumerremoveConsumersetColorModelsetDimensionssetHintssetPixelssetPixelssetProperties

Field Detail

COLORMAPMASKback to summary
private static final int COLORMAPMASK
curframeback to summary
pack-priv GifFrame curframe
EX_APPLICATIONback to summary
private static final int EX_APPLICATION
EX_COMMENTback to summary
private static final int EX_COMMENT
EX_GRAPHICS_CONTROLback to summary
private static final int EX_GRAPHICS_CONTROL
EXBLOCKback to summary
private static final int EXBLOCK
global_bgpixelback to summary
pack-priv int global_bgpixel
global_colormapback to summary
pack-priv byte[] global_colormap
global_heightback to summary
pack-priv int global_height
global_modelback to summary
pack-priv IndexColorModel global_model
global_widthback to summary
pack-priv int global_width
IMAGESEPback to summary
private static final int IMAGESEP
interlaceflagsback to summary
private static final int interlaceflags

The ImageConsumer hints flag for an interlaced GIF image.

INTERLACEMASKback to summary
private static final int INTERLACEMASK
normalflagsback to summary
private static final int normalflags

The ImageConsumer hints flag for a non-interlaced GIF image.

num_global_colorsback to summary
pack-priv int num_global_colors
outCodeback to summary
private byte[] outCode
prefixback to summary
private short[] prefix
propsback to summary
pack-priv Hashtable<String, Object> props
saved_imageback to summary
pack-priv byte[] saved_image
saved_modelback to summary
pack-priv IndexColorModel saved_model
suffixback to summary
private byte[] suffix
TERMINATORback to summary
private static final int TERMINATOR
trans_pixelback to summary
pack-priv int trans_pixel
TRANSPARENCYMASKback to summary
private static final int TRANSPARENCYMASK
verboseback to summary
private static final boolean verbose

Constructor Detail

GifImageDecoderback to summary
public GifImageDecoder(InputStreamImageSource src, InputStream is)

Method Detail

errorback to summary
private static void error(String s1) throws ImageFormatException

An error has occurred. Throw an exception.

ExtractByteback to summary
private static final int ExtractByte(byte[] buf, int off)
ExtractWordback to summary
private static final int ExtractWord(byte[] buf, int off)
grow_colormapback to summary
public static byte[] grow_colormap(byte[] colormap, int newlen)
initIDsback to summary
private static native void initIDs()
parseImageback to summary
private native boolean parseImage(int x, int y, int width, int height, boolean interlace, int initCodeSize, byte[] block, byte[] rasline, IndexColorModel model)
produceImageback to summary
public void produceImage() throws IOException, ImageFormatException

Implements abstract sun.awt.image.ImageDecoder.produceImage.

produce an image from the stream.

Annotations
@SuppressWarnings:fallthrough, deprecation
readBytesback to summary
private int readBytes(byte[] buf, int off, int len)

Read a number of bytes into a buffer.

Returns:int

number of bytes that were not read due to EOF or error

readHeaderback to summary
private void readHeader() throws IOException, ImageFormatException

Read Image header

readImageback to summary
private boolean readImage(boolean first, int disposal_method, int delay) throws IOException

Read Image data

sendPixelsback to summary
private int sendPixels(int x, int y, int width, int height, byte[] rasline, ColorModel model)