to.etc.sjit
Class AnimGifDecoder

java.lang.Object
  extended by to.etc.sjit.AnimGifDecoder

public class AnimGifDecoder
extends java.lang.Object

This class allows quick decoding of GIF images into BufferedImages. The main use is in web applications. The image type generated can be specified during the decode process. For maximum speed this class does not implement any of the standard Java interfaces like ImageConsumer and ImageProducer and the like.

Author:
Frits Jalvingh

Field Summary
 byte m_h_bgindex
           
 int m_h_color_res
           
 boolean m_h_has_global_ct
           
 int m_h_lh
           
 int m_h_lw
           
 byte m_h_pxaspect
           
 byte[] m_h_sig
           
 boolean m_h_sorted
           
 int m_h_sz_global_ct
           
 java.lang.String m_h_version
           
 int m_n_gc_colors
           
 
Constructor Summary
AnimGifDecoder(java.io.InputStream is)
           
 
Method Summary
 boolean canAccept()
          Returns T if the stream (seems) to represent a GIF file.
 java.awt.image.BufferedImage read(int bufimatype)
          Reads the specified image number from the GIF, creating a BufferedImage of the specified type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_h_sig

public byte[] m_h_sig

m_h_version

public java.lang.String m_h_version

m_h_lw

public int m_h_lw

m_h_lh

public int m_h_lh

m_n_gc_colors

public int m_n_gc_colors

m_h_sorted

public boolean m_h_sorted

m_h_sz_global_ct

public int m_h_sz_global_ct

m_h_has_global_ct

public boolean m_h_has_global_ct

m_h_color_res

public int m_h_color_res

m_h_pxaspect

public byte m_h_pxaspect

m_h_bgindex

public byte m_h_bgindex
Constructor Detail

AnimGifDecoder

public AnimGifDecoder(java.io.InputStream is)
Method Detail

canAccept

public boolean canAccept()
                  throws java.io.IOException
Returns T if the stream (seems) to represent a GIF file. Checks for the GIF8xa marker.

Throws:
java.io.IOException

read

public java.awt.image.BufferedImage read(int bufimatype)
                                  throws java.io.IOException
Reads the specified image number from the GIF, creating a BufferedImage of the specified type.

Throws:
java.io.IOException