jmpiazza@sunybcs.UUCP (Joseph M. Piazza) (05/12/86)
Can someone tell me enough PostSript to send a bit map to the LaserWriter? I'm downloading digitized images from a VAX. I've examined a PostScript file from MacPaint (using a command-F) and it looks fairly easy: md begin 1320 od (; user: )jn %%EndProlog %%Page: ? ? op 0 0 moveto 578 3 0 133 74 578 3 F 1 dobits 00... 578 20 0 148 74 578 20 F 1 dobits 00... 578 18 0 168 74 578 18 F 1 dobits 00... 578 18 0 168 74 578 18 F 1 dobits 00... page cp %%Trailer end 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. Thanks, joe piazza
browne@savax.UUCP (Duff Browne) (05/15/86)
> > Can someone tell me enough PostSript to send a bit map to the LaserWriter? > > ... > 578 20 0 148 74 578 20 F 1 dobits > ..... and more ... > > The command of interest seems to be "dobits." > A pointer to a simple reference on PostScript would also > be helpful. > > Thanks, > > joe piazza I have a copy of Adobe's Postscript Language Manual, and there's not a thing in it that mentions "dobits". I would assume that dobits is defined in the Laserprep, and that's it. There is a section in the manual - the Postscript Cookbook - that has a program dealing with image operators and bit pattern screens (programs 19 & 20). If you can't find a friend with a manual, Adobe systems Inc. is located in Palo Alto, CA. Maybe jyou could call them up with questions on obtaining a manual or help. Duff Browne
brian@ut-sally.UUCP (Brian H. Powell) (05/21/86)
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