public class AnimatedGifDemo
extends java.lang.Object
| Constructor and Description |
|---|
AnimatedGifDemo() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
checkDelay(java.lang.String delay)
Checks that a String intended as a delayTime is an integer>0.
|
static void |
configure(javax.imageio.metadata.IIOMetadata meta,
java.lang.String delayTime,
int imageIndex)
See http://forums.sun.com/thread.jspa?messageID=10755673#10755673
|
static void |
main(java.lang.String[] args)
Parse the arguments and if successful, attempt to write the animated GIF.
|
static void |
printUsage()
Dump the usage to the System.err stream.
|
static void |
saveAnimate(java.io.File file,
java.awt.image.BufferedImage[] frames,
java.lang.String[] delayTimes)
See http://forums.sun.com/thread.jspa?messageID=9988198
|
static void |
saveAnimate(java.io.File file,
java.util.Iterator<java.awt.image.BufferedImage> frames,
java.util.Iterator<java.lang.String> delayTimes)
Rewrite of the saveAnimate that takes an iterator so that all images
need not be in memory at once.
|
public static void configure(javax.imageio.metadata.IIOMetadata meta,
java.lang.String delayTime,
int imageIndex)
delayTime - String Frame delay for this frame, in hundredths of a second.public static void saveAnimate(java.io.File file,
java.awt.image.BufferedImage[] frames,
java.lang.String[] delayTimes)
throws java.io.IOException
file - File A File in which to store the animation.frames - BufferedImage[] Array of BufferedImages, the frames of the
animation.delayTimes - String[] Array of Strings, representing the frame delay
times.java.io.IOExceptionpublic static void saveAnimate(java.io.File file,
java.util.Iterator<java.awt.image.BufferedImage> frames,
java.util.Iterator<java.lang.String> delayTimes)
throws java.io.IOException
file - File A File in which to store the animation.frames - Iterator of BufferedImages, the frames of the animation.delayTimes - Iterator of Strings, representing the frame delay times in hundredths of a second.
in formatted tenths-of-seconds (hundred-millisecond units).java.io.IOExceptionpublic static void printUsage()
public static java.lang.String checkDelay(java.lang.String delay)
public static void main(java.lang.String[] args)
throws java.lang.Exception
java.lang.Exception