typedef struct ColorMapObject {
int ColorCount;
int BitsPerPixel;
+ int SortFlag;
GifColorType *Colors;
} ColorMapObject;
ColorMapObject *ColorMap; /* The local color map */
} GifImageDesc;
+/* This is the in-core version of an extension record */
+typedef struct {
+ int Function; /* Holds the type of the Extension block. */
+ int ByteCount;
+ char *Bytes;
+} ExtensionBlock;
+
+typedef struct {
+ int Function; /* DEPRECATED: Use ExtensionBlocks[x].Function instead */
+ int ExtensionBlockCount;
+ ExtensionBlock *ExtensionBlocks;
+} Extensions;
+
typedef struct GifFileType {
GifWord SWidth, SHeight, /* Screen dimensions. */
SColorResolution, /* How many colors can we generate? */
- SBackGroundColor; /* I hope you understand this one... */
+ SBackGroundColor, /* I hope you understand this one... */
+ SAspectRatio; /* Pixel aspect ratio, in 1/64 units, starting at 1:4. */
ColorMapObject *SColorMap; /* NULL if not exists. */
+ Extensions Extensions;
int ImageCount; /* Number of current image */
GifImageDesc Image; /* Block describing current image */
struct SavedImage *SavedImages; /* Use this to accumulate file state */
#define APPLICATION_EXT_FUNC_CODE 0xff /* application block */
/* public interface to ungif.c */
-int DGifSlurp(GifFileType * GifFile);
-GifFileType *DGifOpen(void *userPtr, InputFunc readFunc);
-int DGifCloseFile(GifFileType * GifFile);
+int DGifSlurp(GifFileType * GifFile) DECLSPEC_HIDDEN;
+GifFileType *DGifOpen(void *userPtr, InputFunc readFunc) DECLSPEC_HIDDEN;
+int DGifCloseFile(GifFileType * GifFile) DECLSPEC_HIDDEN;
#define D_GIF_ERR_OPEN_FAILED 101 /* And DGif possible errors. */
#define D_GIF_ERR_READ_FAILED 102
* Support for the in-core structures allocation (slurp mode).
*****************************************************************************/
-/* This is the in-core version of an extension record */
-typedef struct {
- int ByteCount;
- char *Bytes;
- int Function; /* Holds the type of the Extension block. */
-} ExtensionBlock;
-
/* This holds an image header, its unpacked raster bits, and extensions */
typedef struct SavedImage {
GifImageDesc ImageDesc;
unsigned char *RasterBits;
- int Function; /* DEPRECATED: Use ExtensionBlocks[x].Function instead */
- int ExtensionBlockCount;
- ExtensionBlock *ExtensionBlocks;
+ Extensions Extensions;
} SavedImage;
#endif /* _UNGIF_H_ */