🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.mac
Article #40249

UnpackBits question

#40249
From: Bill Roberts
Date: Mon, 03 Apr 1989 00:58
20 lines
1297 bytes
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'"
Technical Details
Message-ID: <1709@ncar.ucar.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!ncar!hao.ucar.edu!bill

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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