ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/common/targa.h
Revision: 2.4
Committed: Fri Jun 6 16:38:47 2003 UTC (20 years, 10 months ago) by schorsch
Content type: text/plain
Branch: MAIN
Changes since 2.3: +13 -1 lines
Log Message:
*** empty log message ***

File Contents

# User Rev Content
1 schorsch 2.4 /* RCSid $Id: targa.h,v 2.3 2003/02/25 02:47:22 greg Exp $ */
2 greg 1.1 /*
3     * tardev.h - header file for reading and writing Targa format files.
4 greg 2.2 */
5 schorsch 2.4 #ifndef _RAD_TARGA_H_
6     #define _RAD_TARGA_H_
7     #ifdef __cplusplus
8     extern "C" {
9     #endif
10    
11 greg 2.3 #include "copyright.h"
12 greg 2.2
13 greg 1.1 /* header structure adapted from tardev.h */
14     struct hdStruct {
15     char textSize; /* size of info. line ( < 256) */
16     char mapType; /* color map type */
17     char dataType; /* data type */
18     int mapOrig; /* first color index */
19     int mapLength; /* length of file map */
20     char CMapBits; /* bits per map entry */
21     int XOffset; /* picture offset */
22     int YOffset;
23     int x; /* picture size */
24     int y;
25     int dataBits; /* bits per pixel */
26     int imType; /* image descriptor byte */
27     };
28    
29     #define IM_NODATA 0 /* no data included */
30     #define IM_CMAP 1 /* color-mapped */
31     #define IM_RGB 2 /* straight RGB */
32     #define IM_MONO 3 /* straight monochrome */
33     #define IM_CCMAP 9 /* compressed color-mapped */
34     #define IM_CRGB 10 /* compressed RGB */
35     #define IM_CMONO 11 /* compressed monochrome */
36    
37     /* color map types */
38     #define CM_NOMAP 0 /* no color map */
39     #define CM_HASMAP 1 /* has color map */
40    
41     #define bits_bytes(n) (((n)+7)>>3) /* number of bits to number of bytes */
42 schorsch 2.4
43    
44     #ifdef __cplusplus
45     }
46     #endif
47     #endif /* _RAD_TARGA_H_ */