[comp.graphics] Print a 75 ppi image on a 300 ppi laserprinter

fang@dukempd.phy.duke.edu (Fang Zhong) (09/29/89)

	We have PCVISIONplus Frame Grabber board and DOT-X Video Monitor
running with IBM PC-AT. We use ImageTool from Werner Frei Associates
to digitize and store images.  The images on the monitor have the resolution
of 75 pixel per inch and eight bits per pixel.
	We want to print the images on a HP series II laserprinter with the
resolution of 300 pixel per inch.  One pixel on the monitor can be represented
by 4x4 pixels on the laserprinter.  Since there is only one bit per pixel on
the laserprinter, we thought that we could decorate the 4x4 pixels correspondingthe original eight bits depth.
	Has anyone done this before?  What the alogarithsm is used?

	We were told that we needed to buy additional memory expansion module
for the HP series II laserprinter in order to print 300x300 images.  Is there
a way that we can send half image to the laserprinter and have it printed,
then send the another half afterwards?

	Thanks in advance for any help.

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

johnl@esegue.segue.boston.ma.us (John R. Levine) (09/30/89)

In article <814@dukempd.phy.duke.edu> fang@dukempd.phy.duke.edu (Fang Zhong) writes:
>We want to print the [75 dpi] images on a HP series II laserprinter with the
>resolution of 300 pixel per inch.  ...
>	We were told that we needed to buy additional memory expansion module
>for the HP series II laserprinter in order to print 300x300 images.  ...

If you read the manual that came with your printer, you'll find that
Laserjets can print at 300, 150, 100, or 75 DPI.  At coarser
resolutions it uses blocks of 300 dpi dots to represent each logical
dot.  The printer buffers the logical dots, so that at 75 dpi, even
the original Laserjet I could print a full page bit image.  It's no big
deal to program; I wrote a little program to dump 100 dpi screen
images in an afternoon.
-- 
John R. Levine, Segue Software, POB 349, Cambridge MA 02238, +1 617 492 3869
johnl@esegue.segue.boston.ma.us, {ima|lotus}!esegue!johnl, Levine@YALE.edu
Massachusetts has 64 licensed drivers who are over 100 years old.  -The Globe

jleonard@jarthur.Claremont.EDU (Jon H. Leonard) (10/01/89)

In article <814@dukempd.phy.duke.edu> fang@dukempd.phy.duke.edu (Fang Zhong) writes:
>... 75 pixel per inch and eight bits per pixel.
>	We want to print the images on a HP series II laserprinter with the
>resolution of 300 pixel per inch.  One pixel on the monitor can be represented
>by 4x4 pixels on the laserprinter.  Since there is only one bit per pixel on
>the laserprinter, we thought that we could decorate the 4x4 pixels correspondingthe original eight bits depth.
>	Has anyone done this before?  What the alogarithsm is used?

	I've used a Laserjet II to print greyscale images by using only some of
the dots.  The limitation is that for a 4x4 blocks there are only 17 different
grey values possible, (moving dots doesn't change how dark it looks) so most
of the 8-bit information would be lost.
	What I did was to pick a method of getting a value from 0 to 16
for each of the output pixels, and then set the pixel only if the value for
the matching location in a mask grid was less than or equal to the pixel value.

The grid I used was a repetition of

	1  9  3 11
       13  5 15  7
        4 12  2 10
       16  8 14  6

This looked ok, but I found that a 8x8 grid (65 grey values) was needed for
 output to look nice.  This can be done without sacrificing the 75 dpi
initial resolution -- not having all the pixels in one block the same is ok. 

>... Is there
>a way that we can send half image to the laserprinter and have it printed,
>then send the another half afterwards?

	Beyond running the same piece of paper through twice, no.  (To do
that, just set the location of each half of the image right for each pass.
It works, but has alignment problems and is a kluge.)  It is possible to print
 a half page of 300x300 graphics on an unexpanded Laserjet II, so this or
 small images work fine.  A 1-meg memory expansion is a better solution.

	Jon Leonard
        jleonard@jarthur.claremont.edu

cs4g6ag@maccs.dcss.mcmaster.ca (Stephen M. Dunn) (10/02/89)

   The LaserJet (or at least the LJ II) has three different dot densities
available - 75 dpi, 150 dpi, and 300 dpi.  If you want the 75 dpi mode,
don't bother beefing up your image to 300 dpi and printing it in 300 dpi
mode; it takes LOTS of time, and you'll have to add more memory to the
LJ.  Just send it out in 75 dpi mode - faster and cheaper.
-- 
Stephen M. Dunn                         cs4g6ag@maccs.dcss.mcmaster.ca
       <std_disclaimer.h> = "\nI'm only an undergraduate!!!\n";
**********************************************************************
TORONTO BLUE JAYS - 1989 AMERICAN LEAGUE EAST CHAMPIONS!  GO JAYS GO!!

leonard@bucket.UUCP (Leonard Erickson) (10/02/89)

The Laserjet and Laserjet II will print the image quite cheerfully
at 75 dpi. Check the codes for doing raster graphics. You get to
choose the resolution. If you choose 75dpi, it will print the image
with dots 4 times as big! No need to change the data.
-- 
Leonard Erickson		...!tektronix!reed!percival!bucket!leonard
CIS: [70465,203]
"I'm all in favor of keeping dangerous weapons out of the hands of fools.
Let's start with typewriters." -- Solomon Short

mislan@cspi.com (David Mislan) (10/05/89)

	There are two methods you can use to render grayscale level images
on a binary output device such as a laser printer: half-toning and
dithering. Half tone consists of using, for instance, a 6x6 square on the
printer to represent each pixel in the image. By printing or leaving blank a
certain number of pixels,different gray levels can be obtained (in this case,
37, which should be adequate for most applications). The problem with this
is that you may not be able to fit large images on the page.

	The second technique is called dithering and is meant to use one dot
per pixel. This technique works well for large images, but you will lose some
detail, in particular on small images. 

	For a better description of these very useful techniques, let me refer
you to the classic computer graphics text "Fundamentals of Interactive Computer
Graphics" by J.D. Foley and A. Van Dam, chapter 17 (Addison-Wesley publishers
Library Catalog no. T385.F63)

	You will most certainly need to expand the memory on your laserjet
to print large images. (The way it was explained to me is that the printer 
needs to have all of the data in memory prior to printing the page).


						Michel L. Marcuse
						Sr. Software Engineer,
						Scientific Imaging Division
						CSPI.

---
Disclaimer:	The opinions expressed herein are mine only and do not reflect
                those of my employer. 

paul@hpldola.HP.COM (Paul Bame) (10/12/89)

Rendering grayscale images on bi-level output devices is a common topic
in comp.graphics.  I'm throwing my $0.02 because this rendering is not
quite so black and white (sorry) as described and one of my ideas hasn't
been presented overtly in the previous discussions I've read here.

>	There are two methods you can use to render grayscale level images
>on a binary output device such as a laser printer: half-toning and
>dithering.

There are also hybrids...

>           Half tone consists of using, for instance, a 6x6 square on the
>printer to represent each pixel in the image. By printing or leaving blank a
>certain number of pixels,different gray levels can be obtained (in this case,
>37, which should be adequate for most applications).

The simple solution (e.g., random selection of the right percentage of
black pixels within the square) works OK but not always at 300dpi.  Better
(tho the image may look "rougher") at 300dpi is emulation of real
halftoning by emulating variable spot size.

>The problem with this
>is that you may not be able to fit large images on the page.

You can shrink large images first.  There is obviously a tradeoff between 
	* blurring (due to shrinking the image)
	* using large halftone squares (more gray levels) 
versus
	* having sharper images, 
	* small halftone squares (fewer gray levels)
		so you don't need to shrink the image
	* but with banding due to the limited number of gray levels available.  
There are hybrids...

>	The second technique is called dithering and is meant to use one dot
>per pixel. This technique works well for large images, but you will lose some
>detail, in particular on small images. 

Dithering is useful for approximating images on devices where the available
gray levels are less than the number of source gray levels (e.g., a
256-level image printed on a 4-level printer or on a 1-level printer [the
common case]).  The theory for dithering for other than bi-level devices may
not be described in Foley & VanDam but it is pretty easy to derive with some
thought - both error-diffusion and the patterned methods work (I've used
both).

The reason for noting this is that if you choose a half-tone scheme with,
say, 16 representable gray levels per "pixel" (4x4 square), [so the pixels
are small so you can print a large image without first shrinking it] you
will probably see banding when you force-fit your 256-level image to 16.  On
the other hand, you could use one of the popular dithering methods to reduce
your 256-level to a 16-level image and it would look much better.  This
gives you more latitude when trading off halftone square size (# of
representable gray levels) against image sharpness.  It all depends on 
what's most important.

>	For a better description of these very useful techniques, let me refer
>you to the classic computer graphics text "Fundamentals of Interactive Computer
>Graphics" by J.D. Foley and A. Van Dam, chapter 17 (Addison-Wesley publishers
>Library Catalog no. T385.F63)

There's also a work called, I believe, "Digital Halftoning" maybe from
MIT press (I've never seen it - only heard of it).  It's likely to be
a good deal better than my explanation.

>	You will most certainly need to expand the memory on your laserjet
>to print large images. (The way it was explained to me is that the printer 
>needs to have all of the data in memory prior to printing the page).

Correct!  The LaserJets are *page* printers and expect to compose a full
page before printing same.  You will require (300 * 8.5 * 11) bits of RAM (at
least) to print a full page of 300-dpi graphics.  The DeskJet series is
different.  They are *line* printers and need almost no RAM to be able
to print 300dpi images of unlimited length.