ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/meta/targa.h
Revision: 1.2
Committed: Mon Jul 14 22:24:00 2003 UTC (21 years, 3 months ago) by schorsch
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 1.1: +14 -1 lines
Log Message:
Instrumented headers against multiple inclusion and for use from C++.
Moved includes in headers out of "C" scope.

File Contents

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