ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/common/targa.h
Revision: 2.3
Committed: Tue Feb 25 02:47:22 2003 UTC (21 years, 2 months ago) by greg
Content type: text/plain
Branch: MAIN
CVS Tags: rad3R5
Changes since 2.2: +2 -57 lines
Log Message:
Replaced inline copyright notice with #include "copyright.h"

File Contents

# Content
1 /* RCSid $Id$ */
2 /*
3 * tardev.h - header file for reading and writing Targa format files.
4 */
5 #include "copyright.h"
6
7 /* header structure adapted from tardev.h */
8 struct hdStruct {
9 char textSize; /* size of info. line ( < 256) */
10 char mapType; /* color map type */
11 char dataType; /* data type */
12 int mapOrig; /* first color index */
13 int mapLength; /* length of file map */
14 char CMapBits; /* bits per map entry */
15 int XOffset; /* picture offset */
16 int YOffset;
17 int x; /* picture size */
18 int y;
19 int dataBits; /* bits per pixel */
20 int imType; /* image descriptor byte */
21 };
22
23 #define IM_NODATA 0 /* no data included */
24 #define IM_CMAP 1 /* color-mapped */
25 #define IM_RGB 2 /* straight RGB */
26 #define IM_MONO 3 /* straight monochrome */
27 #define IM_CCMAP 9 /* compressed color-mapped */
28 #define IM_CRGB 10 /* compressed RGB */
29 #define IM_CMONO 11 /* compressed monochrome */
30
31 /* color map types */
32 #define CM_NOMAP 0 /* no color map */
33 #define CM_HASMAP 1 /* has color map */
34
35 #define bits_bytes(n) (((n)+7)>>3) /* number of bits to number of bytes */