about summary refs log tree commit diff
path: root/urt/rle_code.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 /urt/rle_code.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 'urt/rle_code.h')
-rw-r--r--urt/rle_code.h70
1 files changed, 70 insertions, 0 deletions
diff --git a/urt/rle_code.h b/urt/rle_code.h
new file mode 100644
index 00000000..955e7d42
--- /dev/null
+++ b/urt/rle_code.h
@@ -0,0 +1,70 @@
+/*
+ * This software is copyrighted as noted below.  It may be freely copied,
+ * modified, and redistributed, provided that the copyright notice is 
+ * preserved on all copies.
+ * 
+ * There is no warranty or other guarantee of fitness for this software,
+ * it is provided solely "as is".  Bug reports or fixes may be sent
+ * to the author, who may or may not act on them as he desires.
+ *
+ * You may not include this software in a program or other software product
+ * without supplying the source, or without informing the end-user that the 
+ * source is available for no extra charge.
+ *
+ * If you modify this software, you should include a notice giving the
+ * name of the person performing the modification, the date of modification,
+ * and the reason for such modification.
+ */
+/* 
+ * rle_code.h - Definitions for Run Length Encoding.
+ * 
+ * Author:	Spencer W. Thomas
+ * 		Computer Science Dept.
+ * 		University of Utah
+ * Date:	Mon Aug  9 1982
+ * Copyright (c) 1982 Spencer W. Thomas
+ * 
+ * $Header: /usr/users/spencer/src/urt/include/RCS/rle_code.h,v 3.0 90/08/03 15:19:48 spencer Exp $
+ */
+
+#ifndef RLE_MAGIC
+
+/* 
+ * Opcode definitions
+ */
+
+#define     LONG                0x40
+#define	    RSkipLinesOp	1
+#define	    RSetColorOp		2
+#define	    RSkipPixelsOp	3
+#define	    RByteDataOp		5
+#define	    RRunDataOp		6
+#define	    REOFOp		7
+
+#define     H_CLEARFIRST        0x1	/* clear framebuffer flag */
+#define	    H_NO_BACKGROUND	0x2	/* if set, no bg color supplied */
+#define	    H_ALPHA		0x4   /* if set, alpha channel (-1) present */
+#define	    H_COMMENT		0x8	/* if set, comments present */
+
+struct XtndRsetup
+{
+    char    hc_xpos[2],
+            hc_ypos[2],
+            hc_xlen[2],
+            hc_ylen[2];
+    char    h_flags,
+            h_ncolors,
+	    h_pixelbits,
+	    h_ncmap,
+	    h_cmaplen;
+};
+#define	    SETUPSIZE	((4*2)+5)
+
+/* "Old" RLE format magic numbers */
+#define	    RMAGIC	('R' << 8)	/* top half of magic number */
+#define	    WMAGIC	('W' << 8)	/* black&white rle image */
+
+#define	    RLE_MAGIC	((short)0xcc52)	/* RLE file magic number */
+
+#endif /* RLE_MAGIC */
+