Package adams.data.video
Class GifSequenceWriter
- java.lang.Object
-
- adams.data.video.GifSequenceWriter
-
public class GifSequenceWriter extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected ImageWriter
gifWriter
protected IIOMetadata
imageMetaData
protected ImageWriteParam
imageWriteParam
-
Constructor Summary
Constructors Constructor Description GifSequenceWriter(ImageOutputStream outputStream, int imageType, int timeBetweenFramesMS, boolean loopContinuously)
Creates a new GifSequenceWriter
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Close this GifSequenceWriter object.static void
main(String[] args)
public GifSequenceWriter( BufferedOutputStream outputStream, int imageType, int timeBetweenFramesMS, boolean loopContinuously) {void
writeToSequence(RenderedImage img)
-
-
-
Field Detail
-
gifWriter
protected ImageWriter gifWriter
-
imageWriteParam
protected ImageWriteParam imageWriteParam
-
imageMetaData
protected IIOMetadata imageMetaData
-
-
Constructor Detail
-
GifSequenceWriter
public GifSequenceWriter(ImageOutputStream outputStream, int imageType, int timeBetweenFramesMS, boolean loopContinuously) throws IIOException, IOException
Creates a new GifSequenceWriter- Parameters:
outputStream
- the ImageOutputStream to be written toimageType
- one of the imageTypes specified in BufferedImagetimeBetweenFramesMS
- the time between frames in milisecondsloopContinuously
- wether the gif should loop repeatedly- Throws:
IIOException
- if no gif ImageWriters are foundIOException
-
-
Method Detail
-
writeToSequence
public void writeToSequence(RenderedImage img) throws IOException
- Throws:
IOException
-
close
public void close() throws IOException
Close this GifSequenceWriter object. This does not close the underlying stream, just finishes off the GIF.- Throws:
IOException
-
-