home *** CD-ROM | disk | FTP | other *** search
/ rtsi.com / 2014.01.www.rtsi.com.tar / www.rtsi.com / OS9 / OSK / GRAPHICS / mgif.lzh / GIF / mgif.h < prev    next >
Text File  |  1992-01-13  |  2KB  |  105 lines

  1. /*
  2.  *    mgif.h - defines and typedefs for mgif (mgif.c and readgif.c)
  3.  */
  4.  
  5. /*
  6.  *    errors for ReadGIF
  7.  */
  8. #define EGIFOK        0
  9. #define EGIFMAGIC    1    /* bad magic */
  10. #define EGIFSDESC    2    /* bad screen descriptor */
  11. #define EGIFEOF        3    /* premature EOF */
  12. #define EGIFIDBAD    4    /* bad image descriptor */
  13. #define EGIFBIG        5    /* image too big */
  14. #define EGIFRAST    6    /* error reading raster */
  15. #define EGIFFILE    7    /* file error (open, etc) */
  16.  
  17. /*
  18.  *    output mode for ReadGIF
  19.  */
  20. #define SILENT        0
  21. #define INQUIRE        1
  22. #define VERBOSE        2
  23. #define NORMAL        4
  24.  
  25. /*
  26.  *    array dimensions, etc
  27.  */
  28. #define MAXIMG        400000L        /* image (raster) buffer, bytes */
  29. #define MAXRAW        400000L        /* raw coded data buffer, bytes */
  30.                     /* these were 400000 and 250000 */
  31. #define HASHSIZ        4096        /* size of hash tables */
  32. #define OUTSIZ        1025        /* size of output table */
  33. #define HISTSIZ        256        /* size of histogram table */
  34. #define MAPSIZ        256        /* size of color map table */
  35. #define MAXPIXLINE    650        /* max num pixels in display row, */
  36.                     /* need at least 642 for array dims */
  37. #define MAX_X        640        /* number of pixels on screen, horiz*/
  38. #define MAX_Y        400        /* number of pixels on screen, vert*/
  39. #define LEFT        0        /* dither directions */
  40. #define RIGHT        1
  41.  
  42. /*
  43.  *    built-in convolution kernels
  44.  */
  45. #define USER_KERN    0
  46. #define LP1_KERN    1
  47. #define LP2_KERN    2
  48. #define LP3_KERN    3
  49. #define HP1_KERN    4
  50. #define HP2_KERN    5
  51. #define HP3_KERN    6
  52. #define SE1_KERN    7
  53. #define SE2_KERN    8
  54. #define SE3_KERN    9
  55. #define LE1_KERN    10
  56. #define LE2_KERN    11
  57. #define LE3_KERN    12
  58. #define LE4_KERN    13
  59. #define GE1_KERN    14
  60. #define GE2_KERN    15
  61. #define GE3_KERN    16
  62. #define GE4_KERN    17
  63. #define GE5_KERN    18
  64. #define GE6_KERN    19
  65. #define GE7_KERN    20
  66. #define GE8_KERN    21
  67.  
  68.  
  69. /*
  70.  *    types and structures
  71.  */
  72. typedef unsigned char uchar_t;
  73. typedef unsigned int  uint_t;
  74. typedef unsigned long ulong_t;
  75.  
  76. typedef struct            /* screen descriptor */
  77. {
  78.     int    s_dx,        /* image size */
  79.         s_dy;
  80.     int    s_colors,     /* # colors */
  81.         s_bits,        /* bits/pixel */
  82.         s_cr;        /* color resolution */
  83.     char    s_gcm,        /* global color map flag */
  84.         s_bgnd;        /* background color */
  85.  
  86. }        screen_t;
  87.  
  88. typedef struct            /* image descriptor */
  89. {
  90.     int    i_x,        /* position rel to upper left */
  91.         i_y,
  92.         i_dx,        /* size */
  93.         i_dy,
  94.         i_colors,    /* num colors in image */
  95.         i_bits;        /* bits/pixel */
  96.     char    i_gcm,        /* use global color map */
  97.         i_intlace;    /* 0=sequential or !0=interlaced */
  98.  
  99. }        image_t;
  100.  
  101.  
  102.  
  103. /*---------------------------- end of mgif.h ------------------------------*/
  104.  
  105.