GifDecoder

GIF Decoder quelloffen übernommen. Class GifDecoder - Decodes a GIF file into one or more frames.

Example:
   GifDecoder d = new GifDecoder();
   d.read("sample.gif");
   int n = d.getFrameCount();
   for (int i = 0; i < n; i++) {
      BufferedImage frame = d.getFrame(i);  // frame i
      int t = d.getDelay(i);  // display duration of frame in milliseconds
      // do something with frame
   }
No copyright asserted on the source code of this class. May be used for any purpose, however, refer to the Unisys LZW patent for any additional restrictions. Please forward any corrections to kweiner@fmsware.com.

Author

Kevin Weiner, FM Software; LZW decoder adapted from John Cristy's ImageMagick.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
File read status: Error decoding file (may be partially decoded)
Link copied to clipboard
val STATUS_OK: Int = 0
File read status: No errors.
Link copied to clipboard
File read status: Unable to open source.

Functions

Link copied to clipboard
open fun getDelay(n: Int): Int
Gets display duration for specified frame.
Link copied to clipboard
open fun getFrame(n: Int): BufferedImage
Gets the image contents of frame n.
Link copied to clipboard
open fun getFrameCount(): Int
Gets the number of frames read from file.
Link copied to clipboard
Gets image size.
Link copied to clipboard
Gets the first (or only) image read.
Link copied to clipboard
open fun getLoopCount(): Int
Gets the "Netscape" iteration count, if any.
Link copied to clipboard
open fun read(is: InputStream): Int
Reads GIF image from stream
open fun read(name: String): Int
Reads GIF file from specified file/URL source (URL assumed if name contains ":/" or "file:")