# E:/DevIL/src-IL/src/il_gif.c File Reference

`#include "il_internal.h"`
`#include "il_gif.h"`

## Defines

#define | MAX_CODES 4096

## Functions

ILboolean | ilIsValidGif (ILconst_string FileName)
| Checks if the file specified in FileName is a valid Gif file.
ILboolean | ilIsValidGifF (ILHANDLE File)
| Checks if the ILHANDLE contains a valid Gif file at the current position.
ILboolean | ilIsValidGifL (const void *Lump, ILuint Size)
| Checks if Lump is a valid Gif lump.
ILboolean | iIsValidGif ()
ILboolean | ilLoadGif (ILconst_string FileName)
| Reads a Gif file.
ILboolean | ilLoadGifF (ILHANDLE File)
| Reads an already-opened Gif file.
ILboolean | ilLoadGifL (const void *Lump, ILuint Size)
| Reads from a memory "lump" that contains a Gif.
ILboolean | iLoadGifInternal ()
ILboolean | iGetPalette (ILubyte Info, ILpal *Pal, ILboolean UsePrevPal, ILimage *PrevImage)
ILboolean | GetImages (ILpal *GlobalPal, GIFHEAD *GifHead)
ILboolean | SkipExtensions (GFXCONTROL *Gfx)
ILint | get_next_code (void)
ILboolean | GifGetData (ILimage *Image, ILubyte *Data, ILuint ImageSize, ILuint Width, ILuint Height, ILuint Stride, ILuint PalOffset, GFXCONTROL *Gfx)
ILboolean | RemoveInterlace (ILimage *image)
ILboolean | iCopyPalette (ILpal *Dest, ILpal *Src)
ILboolean | ConvertTransparent (ILimage *Image, ILubyte TransColour)

## Variables

ILenum | GifType
ILint | curr_size
ILint | clear
ILint | ending
ILint | newcodes
ILint | top_slot
ILint | slot
ILint | navail_bytes = 0
ILint | nbits_left = 0
ILubyte | b1
ILubyte | byte_buff [257]
ILubyte * | pbytes
ILubyte * | stack
ILubyte * | suffix
ILshort * | prefix
ILboolean | success
ILuint | code_mask [13]

## Define Documentation

#define MAX_CODES 4096

Referenced by GifGetData().

## Function Documentation

ILboolean ConvertTransparent | ( | ILimage * | Image,
|  | ILubyte | TransColour |
| ) |  |  |

Referenced by GetImages().

ILint get_next_code | ( | void |  | ) |

Referenced by GifGetData().

ILboolean GetImages | ( | ILpal * | GlobalPal,
|  | GIFHEAD * | GifHead |
| ) |  |  |

Referenced by iLoadGifInternal().

ILboolean GifGetData | ( | ILimage * | Image,
|  | ILubyte * | Data,
|  | ILuint | ImageSize,
|  | ILuint | Width,
|  | ILuint | Height,
|  | ILuint | Stride,
|  | ILuint | PalOffset,
|  | GFXCONTROL * | Gfx |
| ) |  |  |

Referenced by GetImages().

ILboolean iCopyPalette | ( | ILpal * | Dest,
|  | ILpal * | Src |
| ) |  |  |

Referenced by GetImages().

ILboolean iGetPalette | ( | ILubyte | Info,
|  | ILpal * | Pal,
|  | ILboolean | UsePrevPal,
|  | ILimage * | PrevImage |
| ) |  |  |

Referenced by GetImages(), and iLoadGifInternal().

ILboolean iIsValidGif | ( | void |  | ) |

Referenced by ilIsValidGifF(), and ilIsValidGifL().

ILboolean ilIsValidGif | ( | ILconst_string | FileName | ) |

Checks if the file specified in FileName is a valid Gif file.

Referenced by ilIsValid().

ILboolean ilIsValidGifF | ( | ILHANDLE | File | ) |

Checks if the ILHANDLE contains a valid Gif file at the current position.

Referenced by ilDetermineTypeF(), ilIsValidF(), and ilIsValidGif().

ILboolean ilIsValidGifL | ( | const void * | Lump,
|  | ILuint | Size |
| ) |  |  |

Checks if Lump is a valid Gif lump.

Referenced by ilDetermineTypeL(), and ilIsValidL().

ILboolean ilLoadGif | ( | ILconst_string | FileName | ) |

Reads a Gif file.

Referenced by ilLoad(), and ilLoadImage().

ILboolean ilLoadGifF | ( | ILHANDLE | File | ) |

Reads an already-opened Gif file.

Referenced by ilLoadF(), and ilLoadGif().

ILboolean ilLoadGifL | ( | const void * | Lump,
|  | ILuint | Size |
| ) |  |  |

Reads from a memory "lump" that contains a Gif.

Referenced by ilLoadL().

ILboolean iLoadGifInternal | ( | void |  | ) |

Referenced by ilLoadGifF(), and ilLoadGifL().

ILboolean RemoveInterlace | ( | ILimage * | image | ) |

Referenced by GetImages().

ILboolean SkipExtensions | ( | GFXCONTROL * | Gfx | ) |

Referenced by GetImages().

## Variable Documentation

ILubyte b1

Referenced by DxtcReadColors(), get_next_code(), Mark(), and YCbCr2RGB().

ILubyte byte_buff[257]

Referenced by get_next_code().

ILint clear

Referenced by GifGetData().

ILuint code_mask[13]

Initial value:

    {
       0L,
       0x0001L, 0x0003L,
       0x0007L, 0x000FL,
       0x001FL, 0x003FL,
       0x007FL, 0x00FFL,
       0x01FFL, 0x03FFL,
       0x07FFL, 0x0FFFL
    }

Referenced by get_next_code().

ILint curr_size

Referenced by get_next_code(), and GifGetData().

ILint ending

Referenced by get_next_code(), and GifGetData().

ILenum GifType

Referenced by iLoadGifInternal().

ILint navail_bytes = 0

Referenced by get_next_code(), and GifGetData().

ILint nbits_left = 0

Referenced by get_next_code(), and GifGetData().

ILint newcodes

Referenced by GifGetData().

ILubyte* pbytes

Referenced by get_next_code().

ILshort* prefix

Referenced by GifGetData().

ILint slot

Referenced by GifGetData().

ILubyte* stack

Referenced by GifGetData().

ILboolean success

Referenced by get_next_code().

ILubyte* suffix

Referenced by GifGetData().

ILint top_slot

Referenced by GifGetData().