- Main Page
- Data Structures
- Files

# /home/dwoods/DevIL/src-IL/include/il_gif.h

    00001 //-----------------------------------------------------------------------------
    00002 //
    00003 // ImageLib Sources
    00004 // Copyright (C) 2000-2009 by Denton Woods
    00005 // Last modified: 02/14/2009
    00006 //
    00007 // Filename: src-IL/include/il_gif.h
    00008 //
    00009 // Description: Reads from a Graphics Interchange Format (.gif) file.
    00010 //
    00011 //-----------------------------------------------------------------------------
    00012
    00013
    00014 #ifndef GIF_H
    00015 #define GIF_H
    00016
    00017 #include "il_internal.h"
    00018
    00019 #define GIF87A 87
    00020 #define GIF89A 89
    00021
    00022 #ifdef _WIN32
    00023         #pragma pack(push, gif_struct, 1)
    00024 #endif
    00025 typedef struct GIFHEAD
    00026 {
    00027         char            Sig[6];
    00028         ILushort        Width;
    00029         ILushort        Height;
    00030         ILubyte         ColourInfo;
    00031         ILubyte         Background;
    00032         ILubyte         Aspect;
    00033 } IL_PACKSTRUCT GIFHEAD;
    00034
    00035 typedef struct IMAGEDESC
    00036 {
    00037         ILubyte         Separator;
    00038         ILushort        OffX;
    00039         ILushort        OffY;
    00040         ILushort        Width;
    00041         ILushort        Height;
    00042         ILubyte         ImageInfo;
    00043 } IL_PACKSTRUCT IMAGEDESC;
    00044
    00045 typedef struct GFXCONTROL
    00046 {
    00047         ILubyte         Size;
    00048         ILubyte         Packed;
    00049         ILushort        Delay;
    00050         ILubyte         Transparent;
    00051         ILubyte         Terminator;
    00052         ILboolean       Used; //this stores if a gfxcontrol was read - it is IL_FALSE (!)
    00053
    00054                         //if a gfxcontrol was read from the file, IL_TRUE otherwise
    00055 } IL_PACKSTRUCT GFXCONTROL;
    00056 #ifdef _WIN32
    00057         #pragma pack(pop, gif_struct)
    00058 #endif
    00059
    00060 // Internal functions
    00061 ILboolean iLoadGifInternal(void);
    00062 ILboolean ilLoadGifF(ILHANDLE File);
    00063 ILboolean iIsValidGif(void);
    00064 ILboolean iGetPalette(ILubyte Info, ILpal *Pal, ILboolean UsePrevPal, ILimage *PrevImage);
    00065 ILboolean GetImages(ILpal *GlobalPal, GIFHEAD *GifHead);
    00066 ILboolean SkipExtensions(GFXCONTROL *Gfx);
    00067 ILboolean GifGetData(ILimage *Image, ILubyte *Data, ILuint ImageSize, ILuint Width, ILuint Height, ILuint Stride, ILuint PalOffset, GFXCONTROL *Gfx);
    00068 ILboolean RemoveInterlace(ILimage *image);
    00069 ILboolean ConvertTransparent(ILimage *Image, ILubyte TransColour);
    00070
    00071 #endif//GIF_H