home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / netpbma.zip / ppm / tga.h < prev    next >
C/C++ Source or Header  |  1993-10-04  |  1KB  |  40 lines

  1. /* tga.h - header file for Targa files
  2. */
  3.  
  4. /* Header definition. */
  5. struct ImageHeader {
  6.     unsigned char IDLength;        /* length of Identifier String */
  7.     unsigned char CoMapType;        /* 0 = no map */
  8.     unsigned char ImgType;        /* image type (see below for values) */
  9.     unsigned char Index_lo, Index_hi;    /* index of first color map entry */
  10.     unsigned char Length_lo, Length_hi;    /* number of entries in color map */
  11.     unsigned char CoSize;        /* size of color map entry (15,16,24,32) */
  12.     unsigned char X_org_lo, X_org_hi;    /* x origin of image */
  13.     unsigned char Y_org_lo, Y_org_hi;    /* y origin of image */
  14.     unsigned char Width_lo, Width_hi;    /* width of image */
  15.     unsigned char Height_lo, Height_hi;    /* height of image */
  16.     unsigned char PixelSize;        /* pixel size (8,16,24,32) */
  17.     unsigned char AttBits;        /* 4 bits, number of attribute bits per pixel */
  18.     unsigned char Rsrvd;        /* 1 bit, reserved */
  19.     unsigned char OrgBit;        /* 1 bit, origin: 0=lower left, 1=upper left */
  20.     unsigned char IntrLve;        /* 2 bits, interleaving flag */
  21.     };
  22.  
  23. typedef char ImageIDField[256];
  24.  
  25. /* Definitions for image types. */
  26. #define TGA_Null 0
  27. #define TGA_Map 1
  28. #define TGA_RGB 2
  29. #define TGA_Mono 3
  30. #define TGA_RLEMap 9
  31. #define TGA_RLERGB 10
  32. #define TGA_RLEMono 11
  33. #define TGA_CompMap 32
  34. #define TGA_CompMap4 33
  35.  
  36. /* Definitions for interleave flag. */
  37. #define TGA_IL_None 0
  38. #define TGA_IL_Two 1
  39. #define TGA_IL_Four 2
  40.