home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / dos / grafik / sega / pvquant / include / gif_lib.h next >
Encoding:
C/C++ Source or Header  |  1991-11-21  |  2.4 KB  |  61 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. #include <stdio.h>
  16. #define GIF_LIB_VERSION    " Version 1.1, "
  17.  
  18. #define    GIF_ERROR    0
  19. #define GIF_OK        1
  20.  
  21. #ifndef TRUE
  22. #define TRUE        1
  23. #define FALSE        0
  24. #endif
  25.  
  26. typedef    int        GifBooleanType;
  27. typedef    unsigned char    GifPixelType;
  28. typedef unsigned char *    GifRowType;
  29. typedef unsigned char    GifByteType;
  30.  
  31. typedef enum {
  32.     UNDEFINED_RECORD_TYPE,
  33.     SCREEN_DESC_RECORD_TYPE,
  34.      IMAGE_DESC_RECORD_TYPE,                /* Begin with ',' */
  35.     EXTENSION_RECORD_TYPE,                   /* Begin with '!' */
  36.     TERMINATE_RECORD_TYPE                   /* Begin with ';' */
  37. } GifRecordType;
  38.  
  39. /******************************************************************************
  40. * O.k. here are the routines one can access in order to decode GIF file:      *
  41. * (GIF_LIB file DGIF_LIB.C).                              *
  42. ******************************************************************************/
  43.  
  44. FILE *  cdecl DGifOpenFile(char *GifFileName);
  45. void    cdecl DGifGetScreenDesc(int *Width, int *Height, int *ColorRes, int *BackGround,
  46.                                 int *BitsPerPixel, char *palette);
  47. int     cdecl DGifGetRecordType(GifRecordType *GifType);
  48. void    cdecl DGifGetImageDesc(unsigned int *Left, unsigned int *Top, unsigned int *Width, unsigned int *Height, char *palette);
  49. void    cdecl DGifSetupDecompress(long size);
  50. int     cdecl DGifGetLine(GifPixelType *GifLine, int GifLineLen);
  51. void    cdecl DGifCloseFile(void);
  52.  
  53. int     cdecl EGifOpenFileName(char *FileName);
  54. void    cdecl EGifPutScreenDesc(int Width, int Height, int ColorRes, int BackGround,
  55.                                 int BitsPerPixel, unsigned char ColorMap[][3]);
  56. void    cdecl EGifPutImageDesc(int Left, int Top, int Width, int Height, int BitsPerPixel);
  57. int     cdecl EGifPutLine(char *Line, int LineLen);
  58. void    cdecl EGifCloseFile(void);
  59.  
  60. #endif /* GIF_LIB_H */
  61.