Structures
In version 1.0, there's only one structure: GIF_INFO. It is used by every function in the GIFLIB. You should have one structure for each GIF you decode.
GIF_INFO STRUCT
GIFVersion db 3 dup(?)
dwLSWidth dd ?
dwLSHeight dd ?
lpColorTable dd ?
ColorCount dd ?
dwImageWidth dd ?
dwImageHeight dd ?
lpImageData dd ?
dwImageFormat dd ?
lpGIFData dd ?
dwGIFDataSize dd ?
InternalData db 44 dup (?)
GIF_INFO ENDS
GIFVersion | These are the second 3 bytes of the file, that indicate the version number of the GIF File, like "87a" or "89a". |
dwLSWidth | Logical screen width (see GIF format) |
dwLSHeight | Logical screen height (see GIF format) |
lpColorTable | Pointer to the GIF color table (RR GG BB RR GG BB format) |
ColorCount | Number of colors in the GIF |
dwImageWidth | Actual image width (use this one to get the image dimensions) |
dwImageHeight | Actual image height (use this one to get the image dimensions) |
lpImageData |
Output buffer
for decoded data (in the format specified by dwImageFormat). |
dwImageFormat | Specifies the image format (IMAGEFORMAT_XXXX constants). You can use a format that has a higher maximum number of colors than the original GIF, but lower is not supported (256 color output from a 16 color gif is allowed, 16 color output from a 256 color gif is NOT). |
lpGIFData | Points to the actual GIF data (in the GIF file format). |
dwGIFDataSize | Size of the data pointed to by lpGIFData |
InternalData | Data that is used internally by GIFLIB. |