Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!newstop!exodus!rberlin From: rberlin@birdland.sun.com (Rich Berlin) Newsgroups: comp.lang.postscript Subject: Ordered Dither in PostScript (was Re: Halftoning Algorithm) Message-ID: Date: 28 Nov 90 18:40:17 GMT References: <7344@hub.ucsb.edu> <3273@medusa.informatik.uni-erlangen.de> Sender: news@exodus.Eng.Sun.COM Organization: Sun Microsystems Lines: 33 In-reply-to: philip@beeblebrox.dle.dg.com's message of 23 Nov 90 15:07:12 GMT Some of the disagreement over whether this is possible may be due to confusion over different dithering algorithms. The Floyd-Steinberg algorithm, as someone mentioned, does error diffusion and as such needs access to the entire image space. The other method suggested was ordered dither, and this indeed can be implemented using the PostScript operators setscreen and settransfer. (It is really setscreen that implements the dither; the transfer function is used to compensate for ink spread etc., i.e. to even out the results.) What makes ordered dither suitable for a PostScript implementation while error diffusion is not possible? The distinction is that the ordered algorithm overlays a threshold matrix over the image and uses that matrix to determine how to color the cells. This is analogous to laying a "screen" over the image, which is what traditional halftoning does. In neither case does the algorithm call for adjusting the values of neighboring pixels, so this technique will work despite the fact that the spot function knows nothing about the image being rendered. (For more info, see Foley and Van Dam, 1st ed. page 600-601.) The materials handed out at the Adobe Developer's conference in June of this year include a simple example of how to feed a threshold matrix to setscreen. (Unfortunately, there's a copyright notice glaring up at me from the bottom of the page, so I don't feel free to publish the example. Perhaps someone at Adobe would be so kind?) PostScript level II, according to the last specification I saw, includes a simpler method of doing ordered dither. My understanding is that support for error diffusion is NOT part of that work, however. -- Rich