home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / GRAPHICS / MISC / PVQUAN15.ZIP / GIFLIB.ZIP / GIF_LIB.H < prev    next >
Encoding:
C/C++ Source or Header  |  1992-03-09  |  2.5 KB  |  66 lines

  1. /******************************************************************************
  2. * In order to make life a little bit easier when using the GIF file format,   *
  3. * this library was written, and which does all the dirty work...          *
  4. *                                          *
  5. *                    Written by Gershon Elber,  Jun. 1989  *
  6. *******************************************************************************
  7. * History:                                      *
  8. * 14 Jun 89 - Version 1.0 by Gershon Elber.                      *
  9. *  3 Sep 90 - Version 1.1 by Gershon Elber (Support for Gif89, Unique names). *
  10. ******************************************************************************/
  11.  
  12. #ifndef GIF_LIB_H
  13. #define GIF_LIB_H
  14.  
  15. #ifdef __GNUC__
  16. #define cdecl
  17. #endif
  18.  
  19. #include <stdio.h>
  20. #define GIF_LIB_VERSION    " Version 1.1, "
  21.  
  22. #define    GIF_ERROR    0
  23. #define GIF_OK        1
  24.  
  25. #ifndef TRUE
  26. #define TRUE        1
  27. #define FALSE        0
  28. #endif
  29.  
  30. typedef    int        GifBooleanType;
  31. typedef    unsigned char    GifPixelType;
  32. typedef unsigned char *    GifRowType;
  33. typedef unsigned char    GifByteType;
  34.  
  35. typedef enum {
  36.     UNDEFINED_RECORD_TYPE,
  37.     SCREEN_DESC_RECORD_TYPE,
  38.      IMAGE_DESC_RECORD_TYPE,                /* Begin with ',' */
  39.     EXTENSION_RECORD_TYPE,                   /* Begin with '!' */
  40.     TERMINATE_RECORD_TYPE                   /* Begin with ';' */
  41. } GifRecordType;
  42.  
  43. /******************************************************************************
  44. * O.k. here are the routines one can access in order to decode GIF file:      *
  45. * (GIF_LIB file DGIF_LIB.C).                              *
  46. ******************************************************************************/
  47.  
  48. FILE *  cdecl DGifOpenFile(char *GifFileName);
  49. void    cdecl DGifGetScreenDesc(int *Width, int *Height, int *ColorRes, int *BackGround,
  50.                                 int *BitsPerPixel, unsigned char *palette);
  51. int     cdecl DGifGetRecordType(GifRecordType *GifType);
  52. void    cdecl DGifGetImageDesc(unsigned int *Left, unsigned int *Top, unsigned int *Width, unsigned int *Height, unsigned char *palette);
  53. void    cdecl DGifSetupDecompress(long size);
  54. int     cdecl DGifGetLine(GifPixelType *GifLine, int GifLineLen);
  55. void    cdecl DGifCloseFile(void);
  56.  
  57. int     cdecl EGifOpenFileName(char *FileName);
  58. void    cdecl EGifPutScreenDesc(int Width, int Height, int ColorRes, int BackGround,
  59.                                 int BitsPerPixel, unsigned char ColorMap[][3]);
  60. void    cdecl EGifPutImageDesc(int Left, int Top, int Width, int Height, int BitsPerPixel);
  61. int     cdecl EGifPutLine(unsigned char *Line, int LineLen);
  62. void    cdecl EGifCloseFile(void);
  63.  
  64. #endif /* GIF_LIB_H */
  65.  
  66.