Article View: net.micro.mac
Article #5756Re: PostScript for sending bitmap to LaserWriter
From: Brian H. Powell
Date: Wed, 21 May 1986 04:00
Date: Wed, 21 May 1986 04:00
52 lines
2991 bytes
2991 bytes
Sorry this is behind the times, but I'm just now catching up on reading
news after finals.
In article <3146@sunybcs.UUCP>, jmpiazza@sunybcs.UUCP (Joseph M. Piazza) writes:
>
> Can someone tell me enough PostSript to send a bit map to the LaserWriter?
>
> 578 3 0 133 74 578 3 F 1 dobits
>
>The command of interest seems to be "dobits." I need to know what the specific
> commands are doing. A pointer to a simple reference on PostScript would also
> be helpful.
As someone else pointed out, this isn't a native PostScript routine. It
is defined in Apple's LaserPrep (appledict version 12, LaserWriter version 1.1)
file. What follows is what Brian Reid (Reid@Glacier) has to say about it.
(taken from his annotated LaserPrep header.) The second line points out what
the parameters above are.
% standard copybits routine:
% arguments: xscale yscale xloc yloc rowbytes xwidth ywidth fsmooth bitmode
% This procedure is the basis for all QuickDraw bit operations.
% xscale and yscale tell how much to scale the bit image in 72nds of an inch
% xloc and yloc are the location of the top left corner of the bitmap
% rowbytes is the total number of bytes in each scanline of hex data in the
% image.
% Note that rowbytes must be even.
% xwidth and ywidth are the actual number of bits in the x and y coordinates
% of the image. fsmooth is a flag to tell whether or not to use bit
% smoothing. Bit smoothing is a
% proprietary algorithm that provides smoothing of the data around a 5 by 5
% local area of each data pixel.
% bitmode can be any of the QuickDraw source transfer modes excluding srcXor
% and notSrcXor.
% Note that this is the only QuickDraw procedure that can implement
% more than the simple srcCopy transfer mode.
You might look at the PostScript generated by MacWrite for included
Bitmaps. By the way, you can't just pass an arbitrarily large bitmap to
dobits; the LW will run out of memory. For an example of how to get around
this without breaking smoothing, see my (soon!!) forthcoming program paintps,
which runs on unix machines and generates PostScript from macpaint pictures.
Brian H. Powell
UUCP: {ihnp4,seismo,ctvax}!ut-sally!brian
ARPA: brian@sally.UTEXAS.EDU
U.S. Mail: Southwestern Bell
P.O. Box 5899 345-0932
Austin, TX 78763-5899
AT&T
(512) 345-0932
Technical Details
Message-ID:
<4953@ut-sally.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!linus!philabs!cmcl2!seismo!lll-crg!mordor!ut-sally!brianReferences:
<3146@sunybcs.UUCP>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!seismo!lll-crg!mordor!ut-sally!brian From: brian@ut-sally.UUCP (Brian H. Powell) Newsgroups: net.micro.mac Subject: Re: PostScript for sending bitmap to LaserWriter Message-ID: <4953@ut-sally.UUCP> Date: Wed, 21-May-86 00:00:59 EDT Article-I.D.: ut-sally.4953 Posted: Wed May 21 00:00:59 1986 Date-Received: Sat, 24-May-86 01:53:02 EDT References: <3146@sunybcs.UUCP> Organization: U. Texas CS Dept., Austin, Texas Lines: 52 Keywords: LaserWriter, PostScript, bit map Summary: dobits info enclosed