GifSequenceWriter.java
/**
     public GifSequenceWriter(
     BufferedOutputStream outputStream,
     int imageType,
     int timeBetweenFramesMS,
     boolean loopContinuously) {

     */
public GifSequenceWriter(
BufferedOutputStream outputStream,
int imageType,
int timeBetweenFramesMS,
boolean loopContinuously) {
public GifSequenceWriter ( BufferedOutputStream outputStream int imageType int timeBetweenFramesMS boolean loopContinuously ) {
public static void main(String[] args) throws Exception {
        if (args.length > 1) {
            BufferedImage firstImage = ImageIO.read(new File(args[0]));
            ImageOutputStream output =
                    new FileImageOutputStream(new File(args[args.length - 1]));
            GifSequenceWriter writer =
                    new GifSequenceWriter(output, firstImage.getType(), 1, false);
            writer.writeToSequence(firstImage);
            for(int i=1; i<args.length-1; i++) {
                BufferedImage nextImage = ImageIO.read(new File(args[i]));
                writer.writeToSequence(nextImage);
            }
            writer.close();
            output.close();
        } else {
            System.out.println(
                    "Usage: java GifSequenceWriter [list of gif files] [output file]");
        }
    }
public static void main ( String [ ] args ) throws Exception { if ( args . length > 1 ) { BufferedImage firstImage = ImageIO . read ( new File ( args [ 0 ] ) ) ; ImageOutputStream output = new FileImageOutputStream ( new File ( args [ args . length - 1 ] ) ) ; GifSequenceWriter writer = new GifSequenceWriter ( output , firstImage . getType ( ) , 1 , false ) ; writer . writeToSequence ( firstImage ) ; for ( int i = 1 ; i < args . length - 1 ; i ++ ) { BufferedImage nextImage = ImageIO . read ( new File ( args [ i ] ) ) ; writer . writeToSequence ( nextImage ) ; } writer . close ( ) ; output . close ( ) ; } else { System . out . println ( "Usage: java GifSequenceWriter [list of gif files] [output file]" ) ; } }
public GifSequenceWriter(
BufferedOutputStream outputStream,
int imageType,
int timeBetweenFramesMS,
boolean loopContinuously) {
public GifSequenceWriter ( BufferedOutputStream outputStream int imageType int timeBetweenFramesMS boolean loopContinuously ) {
// grab the output image type from the first image in the sequence // create a new BufferedOutputStream with the last argument // create a gif sequence with the type of the first image, 1 second // between frames, which loops continuously // write out the first image to our sequence...