ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/common/targa.h
Revision: 1.1
Committed: Thu Apr 5 14:05:49 1990 UTC (34 years, 1 month ago) by greg
Content type: text/plain
Branch: MAIN
Log Message:
Initial revision

File Contents

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