Class GifEncoder


  • public class GifEncoder
    extends java.lang.Object
    A helper class with static methods for saving Charts as a GIF file
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.lang.String GIF_FILE_EXTENSION  
    • Constructor Summary

      Constructors 
      Constructor Description
      GifEncoder()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void saveGif​(java.lang.String filePath, java.util.List<java.awt.image.BufferedImage> images)
      images saved as GIF file, repeated countless times with 100ms delay
      static void saveGif​(java.lang.String filePath, java.util.List<java.awt.image.BufferedImage> images, int repeat, int delay)
      images saved as GIF file, Set repeat times and delay time
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • GIF_FILE_EXTENSION

        private static final java.lang.String GIF_FILE_EXTENSION
        See Also:
        Constant Field Values
    • Constructor Detail

      • GifEncoder

        public GifEncoder()
    • Method Detail

      • saveGif

        public static void saveGif​(java.lang.String filePath,
                                   java.util.List<java.awt.image.BufferedImage> images)
        images saved as GIF file, repeated countless times with 100ms delay
        Parameters:
        filePath - GIF file path
        images - Multiple BufferedImages for Chart
      • saveGif

        public static void saveGif​(java.lang.String filePath,
                                   java.util.List<java.awt.image.BufferedImage> images,
                                   int repeat,
                                   int delay)
        images saved as GIF file, Set repeat times and delay time
        Parameters:
        filePath - GIF file path
        images - Multiple BufferedImages for Chart
        repeat - repeat times, less than 0 does not repeat,0 countless times
        delay - delay time in milliseconds