Enum GifError

java.lang.Object
java.lang.Enum<GifError>
pl.droidsonroids.gif.GifError
All Implemented Interfaces:
Serializable, Comparable<GifError>

public enum GifError
extends Enum<GifError>
Encapsulation of decoding errors occurring in native code. Three digit codes are equal to GIFLib error codes.
  • Enum Constant Details

    • NO_ERROR

      public static final GifError NO_ERROR
      Special value indicating lack of errors.
    • OPEN_FAILED

      public static final GifError OPEN_FAILED
      Failed to open given input.
    • READ_FAILED

      public static final GifError READ_FAILED
      Failed to read from given input.
    • NOT_GIF_FILE

      public static final GifError NOT_GIF_FILE
      Data is not in GIF format.
    • NO_SCRN_DSCR

      public static final GifError NO_SCRN_DSCR
      No screen descriptor detected.
    • NO_IMAG_DSCR

      public static final GifError NO_IMAG_DSCR
      No image descriptor detected.
    • NO_COLOR_MAP

      public static final GifError NO_COLOR_MAP
      Neither global nor local color map found.
    • WRONG_RECORD

      public static final GifError WRONG_RECORD
      Wrong record type detected.
    • DATA_TOO_BIG

      public static final GifError DATA_TOO_BIG
      Number of pixels bigger than width * height.
    • NOT_ENOUGH_MEM

      public static final GifError NOT_ENOUGH_MEM
      Failed to allocate required memory.
    • CLOSE_FAILED

      public static final GifError CLOSE_FAILED
      Failed to close given input.
    • NOT_READABLE

      public static final GifError NOT_READABLE
      Given file was not opened for read.
    • IMAGE_DEFECT

      public static final GifError IMAGE_DEFECT
      Image is defective, decoding aborted.
    • EOF_TOO_SOON

      public static final GifError EOF_TOO_SOON
      Image EOF detected before image complete. EOF means GIF terminator, not the end of input source.
    • NO_FRAMES

      public static final GifError NO_FRAMES
      No frames found, at least one frame required.
    • INVALID_SCR_DIMS

      public static final GifError INVALID_SCR_DIMS
      Invalid screen size, dimensions must be positive.
    • INVALID_IMG_DIMS

      @Deprecated public static final GifError INVALID_IMG_DIMS
      Deprecated.
      This error is no longer thrown.
      Invalid image size, dimensions must be positive.
    • IMG_NOT_CONFINED

      public static final GifError IMG_NOT_CONFINED
      Image size exceeds screen size. Occurs only if input source changes after opening. Otherwise canvas is extended.
    • REWIND_FAILED

      public static final GifError REWIND_FAILED
      Input source rewind has failed, animation is stopped.
    • INVALID_BYTE_BUFFER

      public static final GifError INVALID_BYTE_BUFFER
      Invalid and/or indirect byte buffer specified.
    • UNKNOWN

      public static final GifError UNKNOWN
      Unknown error, should never appear
  • Field Details

    • description

      @NonNull public final String description
      Human readable description of the error.
  • Method Details

    • values

      public static GifError[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static GifError valueOf​(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • getErrorCode

      public int getErrorCode()
      Returns:
      error code