about summary refs log tree commit diff
path: root/converter/other/sgi.h
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2006-08-19 03:12:28 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2006-08-19 03:12:28 +0000
commit1fd361a1ea06e44286c213ca1f814f49306fdc43 (patch)
tree64c8c96cf54d8718847339a403e5e67b922e8c3f /converter/other/sgi.h
downloadnetpbm-mirror-1fd361a1ea06e44286c213ca1f814f49306fdc43.tar.gz
netpbm-mirror-1fd361a1ea06e44286c213ca1f814f49306fdc43.tar.xz
netpbm-mirror-1fd361a1ea06e44286c213ca1f814f49306fdc43.zip
Create Subversion repository
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@1 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'converter/other/sgi.h')
-rw-r--r--converter/other/sgi.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/converter/other/sgi.h b/converter/other/sgi.h
new file mode 100644
index 00000000..3700d356
--- /dev/null
+++ b/converter/other/sgi.h
@@ -0,0 +1,33 @@
+#ifndef SGI_H_INCLUDED
+#define SGI_H_INCLUDED
+
+/* sgi.h - definitions for SGI format */
+
+typedef struct {
+    short           magic;
+    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   /* not supported */
+#define CMAP_SCREEN         2   /* not supported */
+#define CMAP_COLORMAP       3   /* not supported */
+
+#endif
+