Xref: utzoo comp.sys.mac:29427 comp.sys.mac.programmer:5321 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!ncar!hao.ucar.edu!bill From: bill@hao.ucar.edu (Bill Roberts) Newsgroups: comp.sys.mac,comp.sys.mac.programmer Subject: UnpackBits question Keywords: Macpaint file, LSC Message-ID: <1709@ncar.ucar.edu> Date: 3 Apr 89 00:58:22 GMT Sender: news@ncar.ucar.edu Reply-To: bill@hao.ucar.edu (Bill Roberts) Distribution: usa Organization: High Altitude Observatory/NCAR, Boulder CO Lines: 20 I want to read a Macpaint file, unpack the bit image and write out the unpacked bits to a file. Simply enough, right? But IM sez UnpackBits (VAR srcPtr, dstPtr: Ptr; dstBytes: INTEGER); where dstBytes is the length that the expanded data will be; it should be the value that was passed to PackBits. Now, I don't know what that value is. Can anyone give me a hint on how to find out this value. IM sez srcPtr will be incremented the number of expanded bytes, but that doesn't help me. I read the file ok and then do an lseek() to set the file cursor past the header stuff. Thanks in advance. I hope this isn't a stupid question! --Bill UUCP: {nbires, noao}!ncar!hao!bill CSNET: bill@ncar.csnet ARPA: bill%ncar@CSNET-RELAY.ARPA INTERNET: bill@hao.ucar.edu "... the Eagle Wing palace of the Queen Chinee'"