aboutsummaryrefslogtreecommitdiff
path: root/mesalib/progs/util/imagesgi.h
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-10-08 13:15:52 +0000
committermarha <marha@users.sourceforge.net>2009-10-08 13:15:52 +0000
commita0c4815433ccd57322f4f7703ca35e9ccfa59250 (patch)
treef5213802ec12adb86ec3136001c1c29fe5343700 /mesalib/progs/util/imagesgi.h
parentc73dc01b6de45612b24dc2dd34fba24d81ebf46c (diff)
downloadvcxsrv-a0c4815433ccd57322f4f7703ca35e9ccfa59250.tar.gz
vcxsrv-a0c4815433ccd57322f4f7703ca35e9ccfa59250.tar.bz2
vcxsrv-a0c4815433ccd57322f4f7703ca35e9ccfa59250.zip
Added MesaLib-7.6
Diffstat (limited to 'mesalib/progs/util/imagesgi.h')
-rw-r--r--mesalib/progs/util/imagesgi.h55
1 files changed, 55 insertions, 0 deletions
diff --git a/mesalib/progs/util/imagesgi.h b/mesalib/progs/util/imagesgi.h
new file mode 100644
index 000000000..e5ecece49
--- /dev/null
+++ b/mesalib/progs/util/imagesgi.h
@@ -0,0 +1,55 @@
+/******************************************************************************
+** Filename : imageSgi.h
+** UNCLASSIFIED
+**
+** Description : Utility to read SGI image format files. This code was
+** originally a SGI image loading utility provided with the
+** Mesa 3D library @ http://www.mesa3d.org by Brain Paul.
+** This has been extended to read all SGI image formats
+** (e.g. INT, INTA, RGB, RGBA).
+**
+** Revision History:
+** Date Name Description
+** 06/08/99 BRC Initial Release
+**
+******************************************************************************/
+
+#ifndef __IMAGESGI_H
+#define __IMAGESGI_H
+
+#define IMAGE_SGI_TYPE_VERBATIM 0
+#define IMAGE_SGI_TYPE_RLE 1
+
+struct sImageSgiHeader // 512 bytes
+{
+ short magic; // IRIS image file magic number (474)
+ char type; // Storage format (e.g. RLE or VERBATIM)
+ char numBytesPerPixelChannel; // Number of bytes per pixel channel
+ unsigned short dim; // Number of dimensions (1 to 3)
+ unsigned short xsize; // Width (in pixels)
+ unsigned short ysize; // Height (in pixels)
+ unsigned short zsize; // Number of channels (1 to 4)
+ int minimumPixelValue; // Minimum pixel value (0 to 255)
+ int maximumPixelValue; // Maximum pixel value (0 to 255)
+ char padding1[4]; // (ignored)
+ char imageName[80]; // Image name
+ int colormap; // colormap ID (0=normal, 0=dithered,
+ // 2=screen, 3=colormap)
+ char padding2[404]; // (ignored)
+};
+
+struct sImageSgi
+{
+ struct sImageSgiHeader header;
+ unsigned char *data;
+};
+
+#ifndef __IMAGESGI_CPP
+
+// RGB image load utility
+extern struct sImageSgi *ImageSgiOpen(char const * const fileName);
+extern void ImageSgiClose(struct sImageSgi *image);
+
+#endif
+
+#endif /* __IMAGESGI_H */