Package icyllis.arc3d.core.image

# Class GIFDecoder

java.lang.Object
icyllis.arc3d.core.image.GIFDecoder

public class GIFDecoder extends Object
GIF decoder that created with compressed data and decode frame by frame, GIFDecoder is not thread safe, but can be locked and use across threads.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static int`
  `sDefaultDelayMillis`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `GIFDecoder(ByteBuffer buf)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static boolean`
  `checkMagic(byte[] buf)`
  `int`
  `decodeNextFrame(ByteBuffer pixels)`
  `int`
  `getScreenHeight()`
  `int`
  `getScreenWidth()`
  `int`
  `readByte()`
  `void`
  `skipExtension()`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### sDefaultDelayMillis

    public static volatile int sDefaultDelayMillis

- ## Constructor Details

  - ### GIFDecoder

    public GIFDecoder(ByteBuffer buf) throws IOException
    Throws:
      `IOException`

- ## Method Details

  - ### checkMagic

    public static boolean checkMagic(@Nonnull byte[] buf)

  - ### getScreenWidth

    public int getScreenWidth()

  - ### getScreenHeight

    public int getScreenHeight()

  - ### decodeNextFrame

    public int decodeNextFrame(ByteBuffer pixels) throws IOException
    Returns:
      the frame delay in milliseconds
    Throws:
      `IOException`

  - ### skipExtension

    public void skipExtension() throws IOException
    Throws:
      `IOException`

  - ### readByte

    public int readByte() throws IOException
    Throws:
      `IOException`