🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.micro.mac
Article #5752

MacPaint Document Format Revealed

#5752
From: pri=8 Ephraim Vishniac x76659 ms...
Date: Tue, 20 May 1986 12:42
20 lines
1648 bytes
Perenially, people ask about the MacPaint document format.  Here it is:


A MacPaint document is of type PNTG, creator MPNT.  Everything of interest
is in the data fork.  The data fork starts with a 512-byte header, which
gives the MacPaint version number and the current patterns.  If you're not
MacPaint, just make the header all zeroes.

The rest of the data fork represents the 8"x10" bit image.  At 72dpi, that's
720 scan lines of 576 pixels each.  Uncompressed, each scan line would be 72
bytes and the document would be over 50 Kbytes.  To save space, each line is
compressed using PackBits.  If you're writing your own "MacPaint" documents,
you can either use PackBits to compress your output data, or you can prefix
each scan line with a decimal 71 to indicate that 72 bytes of uncompressed
data follow.  (This is the lazy man's method.)  To compress such a document,
just open it from MacPaint and Save it.

If you're not clear on any of this, just make yourself some simple paintings
and inspect them with FEdit.  I found this very useful both for understanding
MacPaint and for learning about PackBits.
Technical Details
Message-ID: <810@wang.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!linus!philabs!cmcl2!harvard!husc6!panda!genrad!decvax!wanginst!wang!ephraim

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!linus!philabs!cmcl2!harvard!husc6!panda!genrad!decvax!wanginst!wang!ephraim
From: ephraim@wang.UUCP (pri=8 Ephraim Vishniac x76659 ms1459)
Newsgroups: net.micro.mac
Subject: MacPaint Document Format Revealed
Message-ID: <810@wang.UUCP>
Date: Tue, 20-May-86 08:42:31 EDT
Article-I.D.: wang.810
Posted: Tue May 20 08:42:31 1986
Date-Received: Sat, 24-May-86 01:06:21 EDT
Distribution: net
Organization: Wang Labs, Lowell MA
Lines: 20