Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!cbosgd!ihnp4!ptsfa!ames!husc6!cmcl2!esquire!sbb From: sbb@esquire.UUCP Newsgroups: comp.sys.mac Subject: Re: How does UnpackBits work? Message-ID: <98@esquire.UUCP> Date: Wed, 3-Jun-87 14:22:58 EDT Article-I.D.: esquire.98 Posted: Wed Jun 3 14:22:58 1987 Date-Received: Sat, 6-Jun-87 04:47:56 EDT References: Reply-To: sbb@esquire.UUCP (Stephen B. Baumgarten) Organization: DP&W, New York, NY Lines: 25 Keywords: UnpackBits, LaserWriter, mainframe Summary: See paintps.shar in comp.sources.mac In article mp1w+@andrew.cmu.edu (Marc Russell Pawliger) writes: > >I have been trying to implement UnpackBits in c with mediocre success. > >I am able to read in a file I made that consists of straight lines of bitmap, >however when I have to read a compressed file (a MacPaint file), the routine >gets messed up. > >Any code fragments greatly appreciated. Brian Powell recently posted paintps.shar to comp.sources.mac, and it does just what you and another poster interested in UnpackBits want. Paintps takes an uploaded MacPaint file and turns it into PostScript so that it can be printed on a LaserWriter. His UnpackBits routine looks pretty straightforward and it's all commented, so I guess you could get his permission and use it. In addition to paintps, the shar file also includes 3 different version of the LaserPrep header, so that ANY PostScript generated on a Mac (by doing the CMD-F trick while printing from any application) can be printed on a LW connected to a Sun, mainframe, or whatever. If you (or anyone else) missed the original posting, I'll be glad to repost to this group, since it works perfectly and I use it all the time myself. - Steve