Package 

Interface GifDecoder


  • 
    public interface GifDecoder
    
                        

    Shared interface for GIF decoders.

    • Method Detail

      • getStatus

         abstract int getStatus()

        Returns the current status of the decoder.

        Status will update per frame to allow the caller to tell whether or not the current framewas decoded successfully and/or completely. Format and open failures persist across frames.

      • advance

         abstract void advance()

        Move the animation frame counter forward.

      • getDelay

         abstract int getDelay(int n)

        Gets display duration for specified frame.

        Parameters:
        n - int index of frame.
      • getNextDelay

         abstract int getNextDelay()

        Gets display duration for the upcoming frame in ms.

      • getFrameCount

         abstract int getFrameCount()

        Gets the number of frames read from file.

      • getCurrentFrameIndex

         abstract int getCurrentFrameIndex()

        Gets the current index of the animation frame, or -1 if animation hasn't not yet started.

      • resetFrameIndex

         abstract void resetFrameIndex()

        Resets the frame pointer to before the 0th frame, as if we'd never used this decoder todecode any frames.

      • getLoopCount

        @Deprecated() abstract int getLoopCount()

        Gets the "Netscape" loop count, if any. A count of 0 means repeat indefinitely.

      • getTotalIterationCount

         abstract int getTotalIterationCount()

        Gets the total countwhich represents how many times the animation sequence should be displayed.A count of 0 (TOTAL_ITERATION_COUNT_FOREVER) means repeat indefinitely.It must not be a negative value.

        The total count is calculated as follows by using getNetscapeLoopCount.This behavior is the same as most web browsers.

      • getByteSize

         abstract int getByteSize()

        Returns an estimated byte size for this decoder based on the data provided to , as well as internal buffers.

      • read

         abstract int read(@Nullable() InputStream is, int contentLength)

        Reads GIF image from stream.

        Parameters:
        is - containing GIF file.
      • clear

         abstract void clear()
      • read

         abstract int read(@Nullable() Array<byte> data)

        Reads GIF image from byte array.

        Parameters:
        data - containing GIF file.