ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/px/rasterfile.h
Revision: 3.1
Committed: Sat Feb 22 02:07:28 2003 UTC (21 years, 3 months ago) by greg
Content type: text/plain
Branch: MAIN
CVS Tags: rad3R5
Log Message:
Changes and check-in for 3.5 release
Includes new source files and modifications not recorded for many years
See ray/doc/notes/ReleaseNotes for notes between 3.1 and 3.5 release

File Contents

# Content
1 /* RCSid: $Id$ */
2 /* @(#)rasterfile.h 1.11 89/08/21 SMI */
3
4 /*
5 * Description of header for files containing raster images
6 */
7
8 #ifndef _rasterfile_h
9 #define _rasterfile_h
10
11 struct rasterfile {
12 int ras_magic; /* magic number */
13 int ras_width; /* width (pixels) of image */
14 int ras_height; /* height (pixels) of image */
15 int ras_depth; /* depth (1, 8, or 24 bits) of pixel */
16 int ras_length; /* length (bytes) of image */
17 int ras_type; /* type of file; see RT_* below */
18 int ras_maptype; /* type of colormap; see RMT_* below */
19 int ras_maplength; /* length (bytes) of following map */
20 /* color map follows for ras_maplength bytes, followed by image */
21 };
22 #define RAS_MAGIC 0x59a66a95
23
24 /* Sun supported ras_type's */
25 #define RT_OLD 0 /* Raw pixrect image in 68000 byte order */
26 #define RT_STANDARD 1 /* Raw pixrect image in 68000 byte order */
27 #define RT_BYTE_ENCODED 2 /* Run-length compression of bytes */
28 #define RT_FORMAT_RGB 3 /* XRGB or RGB instead of XBGR or BGR */
29 #define RT_FORMAT_TIFF 4 /* tiff <-> standard rasterfile */
30 #define RT_FORMAT_IFF 5 /* iff (TAAC format) <-> standard rasterfile */
31 #define RT_EXPERIMENTAL 0xffff /* Reserved for testing */
32
33 /* Sun registered ras_maptype's */
34 #define RMT_RAW 2
35 /* Sun supported ras_maptype's */
36 #define RMT_NONE 0 /* ras_maplength is expected to be 0 */
37 #define RMT_EQUAL_RGB 1 /* red[ras_maplength/3],green[],blue[] */
38
39 /*
40 * NOTES:
41 * Each line of the image is rounded out to a multiple of 16 bits.
42 * This corresponds to the rounding convention used by the memory pixrect
43 * package (/usr/include/pixrect/memvar.h) of the SunWindows system.
44 * The ras_encoding field (always set to 0 by Sun's supported software)
45 * was renamed to ras_length in release 2.0. As a result, rasterfiles
46 * of type 0 generated by the old software claim to have 0 length; for
47 * compatibility, code reading rasterfiles must be prepared to compute the
48 * true length from the width, height, and depth fields.
49 */
50
51 #endif /*!_rasterfile_h*/