A_LASER (Apple Laserwriter Program) Robert B. Goldstein Eye Research Institute of Retina Foundation 20 Staniford St Boston, MA 02114 (617) 742-3140 A_LASER is a program that read a grey-scale image into VAX memory and produces an ASCII output postscript file that can be directly copied to an Apple Laserwriter to print the image. The output file is always named a_laser.ps, however a command file is included that invokes a_laser, renames the output file, and queues the output file to a printer queue (PRLW.COM) Presently, the bulk of A_LASER is the code to read the image into VAX memory in the first place. This subroutine is imlod_2. Since most sites will have their own format for images, the programmer should replace this code with his own routines. For our site, the input image sizes are restricted to 128, 256, or 512 square images. This restriction carries over to the A_LASER program, but can probably be easily eliminated. An image of a GIRL is provided, and ALASER should correctly operate on this image. It is nessary to define the symbol PIX: to point the the current directory (ie - assign [] pix). A_LASER then converts the input image to Postscript. The program uses the IMAGE function in postscript to accomplish this, and also sends the images in strips to eliminate memory overflows within the laserwriter. ___________ __ ____ Description of PRLW The command to use to print an image is $ prlw imagename size_in_inches copies The size_in_inches and copies can be omitted. For example, to print 3 copies of GIRL, each 5 inches large, you issue prlw girl 5 3 The command prlw clbcar will print one copy of the cblcar image, using its default size. Some technical details of what prlw does: Page 2 prlw writes an auxiliary commmand file that runs the a_laser program. A_laser produces a file, called a_laser.ps, which contains the postscript commands to convert the image to printable form. prlw then renames alaser.ps to be imagename.ps, then sends the file to the new queue named lw. The auxil command file prlw.com is automatically deleted. The postscript file imagename.ps is deleted upon sucessful printing by the queue manager. A new device, called laserwriter , was defined, and a queue started on it. The name of the queue is lw. To abort the printing of an image after it is sent to the lw queue, you issue stop/abort lw