One aspect of the invention provides a method of halftoning an image which
involves determining a quantization error for a selected target pixel of
an image, selecting a diffusion mask, the mask relating to the target
pixel and pixels neighboring thereto, receiving a first pair of
neighboring pixel values for a first pixel pair including a first
neighboring pixel and a second neighboring pixel, and receiving a second
pair of neighboring pixel values for a second pixel pair including a
third neighboring pixel and a fourth neighboring pixel. The method
further involves determining a ranking order of the first, second, third
and fourth neighboring pixels by comparing pixel values of the first,
second, third and fourth neighboring pixels, and diffusing error to at
least one of the first, second, third and fourth neighboring pixels based
on the determined ranking order of the first, second, third and fourth
neighboring pixels.