home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / listings / v_09_03 / 9n03096a < prev    next >
Text File  |  1991-01-09  |  2KB  |  67 lines

  1. /**********************************************
  2. * file d:\cips\cips.h
  3. *
  4. * Functions: This file contains no functions. 
  5. * It contains declarations of the data structures 
  6. * used by the C Image Processing Systems CIPS.
  7. *
  8. * Purpose: To declare data structures.
  9. *
  10. * Modifications: created June 1990 
  11. *********************************************/
  12.  
  13. #include "d:\c600\include\stdio.h"
  14. #include "d:\c600\include\graph.h"
  15. #include "d:\c600\include\io.h"
  16. #include "d:\c600\include\fcntl.h"
  17. #include "d:\c600\include\dos.h"
  18. #include "d:\c600\include\math.h"
  19. #include "d:\c600\include\sys\types.h"
  20. #include "d:\c600\include\sys\stat.h"
  21.  
  22. #define MAX_NAME_LENGTH    80
  23. #define ROWS      100
  24. #define COLS      100
  25. #define GRAY_LEVELS  255
  26.  
  27. /**********************************************
  28. * The following struct defines the information
  29. * you need to read from the tiff file
  30. * header.
  31. ***********************************************/
  32.  
  33. struct tiff_header_struct{
  34.   short lsb;
  35.   long  bits_per_pixel;
  36.   long  image_length;
  37.   long  image_width;
  38.   long  strip_offset;
  39. };
  40.  
  41. /****************************************
  42. *  The following four unions are used
  43. *  to put the bytes from the header
  44. *  into either an integer or a floating
  45. *  point number.
  46. *****************************************/
  47.  
  48. union short_char_union{
  49.    short s_num;
  50.    char  s_alpha[2];
  51. };
  52.  
  53. union int_char_union{
  54.    int  i_num;
  55.    char i_alpha[2];
  56. };
  57.  
  58. union long_char_union{
  59.    long  l_num;
  60.    char  l_alpha[4];
  61. };
  62.  
  63. union float_char_union{
  64.    float f_num;
  65.    char  f_alpha[4];
  66. };
  67.