Path: utzoo!news-server.csri.toronto.edu!rutgers!usc!neuro.usc.edu!annala From: annala@neuro.usc.edu (A J Annala) Newsgroups: comp.graphics.visualization Subject: Re: Print grayscale image on HP-LJ Message-ID: <31037@usc> Date: 13 Mar 91 06:11:56 GMT References: <22062@duke.cs.duke.edu> Sender: news@usc Organization: USC Neural, Informational & Behavioral Sciences Program, LA, CA Lines: 14 Nntp-Posting-Host: neuro.usc.edu > Is there an existing subroutine in C that prints a grayscale >image of xdim-ydim-nbit (usually 512x480x8) on a HP LaserJet with >some kind of dithering? If you need some stand alone code not embedded in a large imaging system then you should look into the c source code for Jeff Poskanzer's portable bitmap (pbm) package routines rasttopbm.c (convert sun rasterfile to pbm) and pbmtolj (pbm file to hplj printer). These routines are available w/o charge from many ftp sites and bulletin boards. You should be able to do some simple cut and paste work to generate a self contained subroutine to dump an arbitrary greyscale image to your hplj printer. Alexander James Annala USC Neuroscience Image Analysis Facility