## help with algorithm for half-toning (ordered dither)

### help with algorithm for half-toning (ordered dither)

Hi group, I need an algorithm to use a threshold matrix 6X6 and map it over
a 630X422 pixels.
the values in the larger matrix can be between 0 and 255 and the values in
6X6 matrix can be 1 to 18.

the basic structure of an ordered dither is

if g(x,y) < s(x,y)
G(x,y) = 255 (on)
else
G(x,y) = 0 (off)

where G(x,y) is the output value, g(x,y) is the input value and s(x,y) is
the threshold matrix.

Any help in this area would be appreciated.

We are in the process of trying to print a grey-scaled image on
an HP-laserjet, which has an output characteristic of 300 dpi, monochrome.
The image file contains 8 bit/pixel grey scale values.  Although we can
get a printable image using NeWS to do the half-toning, it appears that
a half-toning algorithm used for a CRT display device isn't really cut out
for producing an image tailored for a 300 dpi output device.  Anyone out
there know of a public domain filter that may do this?  A posting or direct
email response would be much appreciated.

(I did see the recent posting by Ed Falk, containing the two
dithering filters "odither.c" and "fsdither.c".  However, the real question
is, has anyone studied the characteristics of the HP-laserjet and tweeked
a half-toning algorithm accordingly?)

Thanks (wishful thinking)
Regards,

Paul Matz
PPG Biomedical Systems
One Campus Drive
Pleasantville, NY. 10570
914-741-4685

PS: Sorry if this gets posted twice.  Something is not quite right with
my postnews.