3333public class GifSequenceWriter implements AutoCloseable
3434{
3535 private final int imageType ;
36+ private final Duration timeBetweenFramesMS ;
3637 private final boolean loopContinuously ;
3738 protected ImageWriter gifWriter ;
3839 protected ImageWriteParam imageWriteParam ;
@@ -42,21 +43,21 @@ public class GifSequenceWriter implements AutoCloseable
4243 *
4344 * @param outputStream the ImageOutputStream to be written to
4445 * @param imageType one of the imageTypes specified in BufferedImage
45- * @param timeBetweenFramesMS the time between frames in miliseconds
46+ * @param timeBetweenFrames the time between frames in miliseconds
4647 * @param loopContinuously wether the gif should loop repeatedly
4748 * @throws IIOException if no gif ImageWriters are found
4849 *
4950 * @author Elliot Kroo (elliot[at]kroo[dot]net)
5051 */
51- public GifSequenceWriter (ImageOutputStream outputStream , int imageType , Duration timeBetweenFramesMS ,
52- boolean loopContinuously ) throws IIOException , IOException
52+ public GifSequenceWriter (ImageOutputStream outputStream , int imageType , Duration timeBetweenFrames ,
53+ boolean loopContinuously ) throws IOException
5354 {
5455 this .imageType = imageType ;
56+ this .timeBetweenFramesMS = timeBetweenFrames ;
5557 this .loopContinuously = loopContinuously ;
56- // my method to create a writer
5758 gifWriter = getWriter ();
5859 imageWriteParam = gifWriter .getDefaultWriteParam ();
59- imageMetaData = getMetadata (timeBetweenFramesMS );
60+ imageMetaData = getMetadata (timeBetweenFrames );
6061 gifWriter .setOutput (outputStream );
6162 gifWriter .prepareWriteSequence (null );
6263 }
0 commit comments