j2d.animation
Class GifUtils

java.lang.Object
  extended by j2d.animation.GifUtils

public class GifUtils
extends java.lang.Object

Created by User: lyon Date: May 4, 2003 Time: 11:35:37 AM


Constructor Summary
GifUtils()
           
 
Method Summary
static java.awt.Image[] getGifs()
          Get a gif animation as an array of image.
static void writeGif(java.awt.Image[] imgs, int speed)
          save imgs out to a gif animation file Does this work? I think it might be buggy.
static void writeGif(java.awt.Image[] still_images, java.lang.String annotation, boolean looped, double frames_per_second, java.io.OutputStream os)
          Save still_images to a gif animation file.
static void writeGif(java.awt.Image img, java.lang.String fn)
          Saves a 256 color image to a file.
static void writeGifs(java.awt.Image sourceImage, ImageProcessorFactory ipf, int numberOfImages, int speed)
          Create a gif animation from an ImageProcessorFactory
static void writeGifStills(java.awt.Image[] imgs)
          Save imgs into a directory, one image per file.
static void writeGifStills(java.awt.Image[] imgs, java.io.File fileName)
          Save imgs array into a directory, fn, using GIF form, one image per file.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GifUtils

public GifUtils()
Method Detail

writeGif

public static void writeGif(java.awt.Image[] still_images,
                            java.lang.String annotation,
                            boolean looped,
                            double frames_per_second,
                            java.io.OutputStream os)
                     throws java.io.IOException
Save still_images to a gif animation file. Annotation is used for the sequence. If looped is true, the animation repeats.

Parameters:
still_images - images to be written
annotation - text to be embedded into the gif animation
looped - true means looped on playback
frames_per_second - an int
os - OutputStream to send animation to.
Throws:
java.io.IOException - If you run out of disk space

writeGifStills

public static void writeGifStills(java.awt.Image[] imgs)
Save imgs into a directory, one image per file. Using GIF format

Parameters:
imgs - a sequence of images to be written

writeGifStills

public static void writeGifStills(java.awt.Image[] imgs,
                                  java.io.File fileName)
Save imgs array into a directory, fn, using GIF form, one image per file.

Parameters:
imgs - array of images to be saved
fileName - to be used as the root for the output files

writeGif

public static void writeGif(java.awt.Image img,
                            java.lang.String fn)
Saves a 256 color image to a file.

Parameters:
img - An image to be saved
fn - a string containing the file

writeGif

public static void writeGif(java.awt.Image[] imgs,
                            int speed)
save imgs out to a gif animation file Does this work? I think it might be buggy.

Parameters:
imgs - array of 256 color images
speed - speed, in fps, to display gif animation

writeGifs

public static void writeGifs(java.awt.Image sourceImage,
                             ImageProcessorFactory ipf,
                             int numberOfImages,
                             int speed)
Create a gif animation from an ImageProcessorFactory

Parameters:
sourceImage - the input image
ipf - the image processor factory instance

getGifs

public static java.awt.Image[] getGifs()
Get a gif animation as an array of image.

Returns:
the image array