ranab.img.gif
Class GifImage

java.lang.Object
  extended by ranab.img.BaseImage
      extended by ranab.img.gif.GifImage

public class GifImage
extends ranab.img.BaseImage

GIF encoder class. It supports transparency, multiple images and animation.


Field Summary
 
Fields inherited from class ranab.img.BaseImage
miHeight, miWidth
 
Constructor Summary
GifImage(int width, int height)
          Constructor
 
Method Summary
 void addImage(GifImage gi)
          Add image - animation
 void encode(java.io.OutputStream os)
          Encode GIF image
 GifCommentEx getCommentBlock()
          Get the gif comment block.
 GifGraphicEx getGraphicBlock()
          Get graphic extension block.
 java.awt.Graphics2D getGraphics()
          Get graphics
 java.lang.String getMimeType()
          get mime type
 GifNsAppEx getNsApplicationBlock()
          Get Netscape application block.
 void printColor()
          print the global color table (debug only)
 void resetDelay()
          Reset delay.
 void resetTransparency()
          Reset transparency
 void setDelay(int delay)
          Set delay.
 void setIterationCount(int count)
          set iteration count
 void setTransparency(java.awt.Color col)
          Set transparency.
 void updateColorTable(java.awt.Color col)
          Update color table
 
Methods inherited from class ranab.img.BaseImage
getHeight, getWidth
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GifImage

public GifImage(int width,
                int height)
Constructor

Method Detail

getGraphics

public java.awt.Graphics2D getGraphics()
Get graphics

Specified by:
getGraphics in class ranab.img.BaseImage

getMimeType

public java.lang.String getMimeType()
get mime type

Specified by:
getMimeType in class ranab.img.BaseImage

getCommentBlock

public GifCommentEx getCommentBlock()
Get the gif comment block. You can change the default comment using this block.


getGraphicBlock

public GifGraphicEx getGraphicBlock()
Get graphic extension block. Image transparency, animation delay is controlled by this block.


getNsApplicationBlock

public GifNsAppEx getNsApplicationBlock()
Get Netscape application block.


setTransparency

public void setTransparency(java.awt.Color col)
Set transparency.


resetTransparency

public void resetTransparency()
Reset transparency


setDelay

public void setDelay(int delay)
Set delay.


resetDelay

public void resetDelay()
Reset delay.


setIterationCount

public void setIterationCount(int count)
set iteration count


updateColorTable

public void updateColorTable(java.awt.Color col)
Update color table


printColor

public void printColor()
print the global color table (debug only)


addImage

public void addImage(GifImage gi)
Add image - animation


encode

public void encode(java.io.OutputStream os)
            throws java.io.IOException
Encode GIF image

Specified by:
encode in class ranab.img.BaseImage
Throws:
java.io.IOException