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.