Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!cica!tut.cis.ohio-state.edu!ucbvax!hplabs!hpfcso!hpldola!paul From: paul@hpldola.HP.COM (Paul Bame) Newsgroups: comp.graphics Subject: Re: Print a 75 ppi image on a 300 ppi laserprinter Message-ID: <11390023@hpldola.HP.COM> Date: 11 Oct 89 22:37:33 GMT References: <814@dukempd.phy.duke.edu> Organization: HP Elec. Design Div. -ColoSpgs Lines: 75 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.