about summary refs log tree commit diff
path: root/converter/other/sgi.h
blob: 2f57f52dddf8e07fdfc6126c7a563db333d35511 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#ifndef SGI_H_INCLUDED
#define SGI_H_INCLUDED

/* sgi.h - definitions for SGI format */

typedef struct {
    short           magic;
    unsigned char   storage;
    char            bpc;            /* pixel size: 1 = bytes, 2 = shorts */
    unsigned short  dimension;      /* 1 = single row, 2 = B/W, 3 = RGB */
    unsigned short  xsize,          /* width in pixels */
                    ysize,          /* height in pixels */
                    zsize;          /* # of channels; B/W=1, RGB=3, RGBA=4 */
    long            pixmin, pixmax; /* min/max pixel values */
    char            dummy1[4];
    char            name[80];
    long            colormap;
    char            dummy2[404];
} Header;
#define HeaderSize  512

#define SGI_MAGIC           (short)474

#define STORAGE_VERBATIM    0
#define STORAGE_RLE         1

#define CMAP_NORMAL         0
#define CMAP_DITHERED       1   /* can't handle this */
#define CMAP_SCREEN         2   /* can't handle this */
#define CMAP_COLORMAP       3   /* can't handle this */

#endif