Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!uunet!husc6!bbn!rochester!PT.CS.CMU.EDU!andrew.cmu.edu!ks26+
From: ks26+@andrew.cmu.edu (Kenneth Sykes)
Newsgroups: comp.graphics
Subject: Re: MacPaint format
Message-ID: 
Date: Tue, 8-Dec-87 17:16:34 EST
Article-I.D.: andrew.cVj7d2y00XoGR2g0-1
Posted: Tue Dec  8 17:16:34 1987
Date-Received: Sun, 13-Dec-87 14:49:55 EST
Organization: Carnegie Mellon University
Lines: 22
In-Reply-To: <518@naucse.UUCP>


The file description posted by Warren E. Lewis (8-Dec-87) is complete,
with the exception of what the PackBits/UnpackBits procedures do.  

The packed information consists of a control byte (8 bit signed integer)
followed by 
a set of 'appropriate' data.  If the control byte is greater than zero (n =
c), then the
next n bytes are to be copied directly to the output bitmap (this is called a
MIXED
block).  If the control byte is less than zero, then negate the control byte
and add 1
(n = -c + 1).  Then make n copies of the next byte in the output bit map
(this is called
a REPEAT block).  After the control byte has been processed and the output
bitmap
updated, the next control byte is immediately after the data associated with
the
current control byte.

Hope this helps any non-Mac programmers get Mac pictures up-and-running.

-- Ken Sykes