Package application.model
Class GifSequenceWriter
java.lang.Object
application.model.GifSequenceWriter
public class GifSequenceWriter
extends java.lang.Object
-
Field Summary
Fields Modifier and Type Field Description protected javax.imageio.ImageWriter
gifWriter
protected javax.imageio.metadata.IIOMetadata
imageMetaData
protected javax.imageio.ImageWriteParam
imageWriteParam
-
Constructor Summary
Constructors Constructor Description GifSequenceWriter(javax.imageio.stream.ImageOutputStream outputStream, int imageType, int timeBetweenFramesMS, boolean loopContinuously)
Creates a new GifSequenceWriter -
Method Summary
Modifier and Type Method Description void
close()
Close this GifSequenceWriter object.void
writeToSequence(java.awt.image.RenderedImage img)
-
Field Details
-
gifWriter
protected javax.imageio.ImageWriter gifWriter -
imageWriteParam
protected javax.imageio.ImageWriteParam imageWriteParam -
imageMetaData
protected javax.imageio.metadata.IIOMetadata imageMetaData
-
-
Constructor Details
-
GifSequenceWriter
public GifSequenceWriter(javax.imageio.stream.ImageOutputStream outputStream, int imageType, int timeBetweenFramesMS, boolean loopContinuously) throws java.io.IOExceptionCreates 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:
javax.imageio.IIOException
- if no gif ImageWriters are foundjava.io.IOException
-
-
Method Details
-
writeToSequence
public void writeToSequence(java.awt.image.RenderedImage img) throws java.io.IOException- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOExceptionClose this GifSequenceWriter object. This does not close the underlying stream, just finishes off the GIF.- Throws:
java.io.IOException
- Thrown when IOException is thrown
-