Article-I.D.: wanginst.1270
Posted: Mon Nov 4 08:10:27 1985
Date-Received: Tue, 5-Nov-85 21:26:16 EST
References: <2271@sdcc6.UUCP>
Organization: Wang Institute, Tyngsboro, Ma. 01879
Lines: 18
> Does anyone out there know how to write a screen bitmap into a MacPaint
> type document from program control. I wan't my program to be able to
> save images it creates in MacPaint type files.
>
A MacPaint painting file is type "PNTG", creator "MPNT". It consists
of a 512 byte header, which can be all zeroes, followed by the page
image. The page image consists of 720 rows (ten inches worth).
A row consists of 72 bytes (576 pixels = 8 inches), compressed using
PackBits. If you're too lazy to really use packbits, just precede
each row of data with a 71 (decimal) to indicate that 72 bytes of
uncompressed data follow. The file will be compressed the first time
that it's re-saved from MacPaint.
--
Ephraim Vishniac
[apollo, bbncca, cadmus, decvax, harvard, linus, masscomp]!wanginst!vishniac
vishniac%Wang-Inst@Csnet-Relay