Debian Codegraph @

texk/xdvipsk/thirdparty/libtiff/archive/tools/rasterfile.h

raw
1 #include "tiff.h"
2
3 /*
4 * Description of header for files containing raster images
5 */
6 struct rasterfile
7 {
8 char ras_magic[4]; /* magic number */
9 int32_t ras_width; /* width (pixels) of image */
10 int32_t ras_height; /* height (pixels) of image */
11 int32_t ras_depth; /* depth (1, 8, or 24 bits) of pixel */
12 int32_t ras_length; /* length (bytes) of image */
13 int32_t ras_type; /* type of file; see RT_* below */
14 int32_t ras_maptype; /* type of colormap; see RMT_* below */
15 int32_t ras_maplength; /* length (bytes) of following map */
16 /* color map follows for ras_maplength bytes, followed by image */
17 };
18 #define RAS_MAGIC "\x59\xa6\x6a\x95"
19 #define RAS_MAGIC_INV "\x95\x6a\xa6\x59"
20
21 /* Sun supported ras_type's */
22 #define RT_OLD 0 /* Raw pixrect image in 68000 byte order */
23 #define RT_STANDARD 1 /* Raw pixrect image in 68000 byte order */
24 #define RT_BYTE_ENCODED 2 /* Run-length compression of bytes */
25 #define RT_EXPERIMENTAL 0xffff /* Reserved for testing */
26
27 /* Sun registered ras_maptype's */
28 #define RMT_RAW 2
29 /* Sun supported ras_maptype's */
30 #define RMT_NONE 0 /* ras_maplength is expected to be 0 */
31 #define RMT_EQUAL_RGB 1 /* red[ras_maplength/3],green[],blue[] */
32
33 /*
34 * NOTES:
35 * Each line of the image is rounded out to a multiple of 16 bits.
36 * This corresponds to the rounding convention used by the memory pixrect
37 * package (/usr/include/pixrect/memvar.h) of the SunWindows system.
38 * The ras_encoding field (always set to 0 by Sun's supported software)
39 * was renamed to ras_length in release 2.0. As a result, rasterfiles
40 * of type 0 generated by the old software claim to have 0 length; for
41 * compatibility, code reading rasterfiles must be prepared to compute the
42 * true length from the width, height, and depth fields.
43 */