ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/common/targa.h
Revision: 2.5
Committed: Fri Jun 27 06:53:22 2003 UTC (20 years, 10 months ago) by greg
Content type: text/plain
Branch: MAIN
CVS Tags: rad5R4, rad5R2, rad4R2P2, rad5R0, rad5R1, rad3R7P2, rad3R7P1, rad4R2, rad4R1, rad4R0, rad3R6, rad3R6P1, rad3R8, rad3R9, rad4R2P1, rad5R3, HEAD
Changes since 2.4: +1 -3 lines
Log Message:
Broke standard.h into rtio.h, rterror.h, rtmath.h, and rtmisc.h

File Contents

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