[comp.graphics.visualization] Print grayscale image on HP-LJ

fang@physics.phy.duke.edu (Fang Zhong) (03/12/91)

	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?
	Thanks in advance for any hints.

--
	Fang Zhong				1-919-684-8247
	Duke University Dept. of Physics	fang@phy.duke.edu
	Durham, N.C.      27706			

annala@neuro.usc.edu (A J Annala) (03/13/91)

>	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