|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectartisynth.core.moviemaker.AnimatedGifWriter
public class AnimatedGifWriter
Creates an animated Gif. Code adapted from discussions on the Oracle Forums: https://forums.oracle.com/thread/1264385
Constructor Summary | |
---|---|
AnimatedGifWriter()
|
Method Summary | |
---|---|
static void |
main(java.lang.String[] args)
Main function Usage: java artisynth.core.moviemaker.AnimatedGifWriter [options] |
static java.lang.String[] |
parseArgs(java.lang.String[] args,
argparser.DoubleHolder delayHolder,
argparser.IntHolder loopHolder)
Parses options, fills in the delay and loop values |
static void |
parseArgs(java.lang.String args,
argparser.DoubleHolder delayHolder,
argparser.IntHolder loopHolder)
Parses a string containing options, fills in the delay and loop values |
static void |
write(java.io.File file,
java.awt.image.BufferedImage[] frames,
double delayTime,
int loopCount)
Writes a sequence of images to an animated GIF |
static void |
write(java.io.File file,
java.util.List<? extends java.awt.image.BufferedImage> frames,
double delayTime,
int loopCount)
Writes a sequence of images to an animated GIF |
static void |
write(java.io.File out,
java.lang.String[] fileNames,
double delayTime,
int loopCount)
Writes a sequence of images to an animated GIF |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AnimatedGifWriter()
Method Detail |
---|
public static void write(java.io.File file, java.awt.image.BufferedImage[] frames, double delayTime, int loopCount) throws java.io.IOException
file
- output fileframes
- input image sequencedelayTime
- time between frames (s)loopCount
- number of times to loop (-1 for infinite)
java.io.IOException
- if cannot write to the output filepublic static void write(java.io.File file, java.util.List<? extends java.awt.image.BufferedImage> frames, double delayTime, int loopCount) throws java.io.IOException
file
- output fileframes
- input image sequencedelayTime
- time between frames (s)loopCount
- number of times to loop (-1 for infinite)
java.io.IOException
- if cannot write to the output filepublic static void write(java.io.File out, java.lang.String[] fileNames, double delayTime, int loopCount) throws java.io.IOException
out
- output filefileNames
- list of input frame file names (any supported format)delayTime
- time between frames (s)loopCount
- number of times to loop (-1 for infinite)
java.io.IOException
- if cannot read or write filespublic static void parseArgs(java.lang.String args, argparser.DoubleHolder delayHolder, argparser.IntHolder loopHolder)
args
- list of argumentsdelayHolder
- output delay time (s)loopHolder
- output loop countpublic static java.lang.String[] parseArgs(java.lang.String[] args, argparser.DoubleHolder delayHolder, argparser.IntHolder loopHolder)
args
- list of argumentsdelayHolder
- output delay time (s)loopHolder
- output loop countpublic static void main(java.lang.String[] args) throws java.lang.Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |