| 1 |
/* RCSid $Id: targa.h,v 2.3 2003/02/25 02:47:22 greg Exp $ */
|
| 2 |
/*
|
| 3 |
* tardev.h - header file for reading and writing Targa format files.
|
| 4 |
*/
|
| 5 |
#ifndef _RAD_TARGA_H_
|
| 6 |
#define _RAD_TARGA_H_
|
| 7 |
#ifdef __cplusplus
|
| 8 |
extern "C" {
|
| 9 |
#endif
|
| 10 |
|
| 11 |
#include "copyright.h"
|
| 12 |
|
| 13 |
/* 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 |
|
| 43 |
|
| 44 |
#ifdef __cplusplus
|
| 45 |
}
|
| 46 |
#endif
|
| 47 |
#endif /* _RAD_TARGA_H_ */
|