A method is disclosed which reduces the boundary effects on an image based
on maintaining local gray. The image is first halftoned and an adjustment
is then made at the boundary region to minimize the brightness deviation
of the halftone from the original contone. The adjustment is composed of
three steps. First, a low-pass filtering is performed in halftones in the
boundary regions, which are typically a few pixels wide along the
boundary. The filtering result is then compared to the original contone
image and an error map is generated. Finally, the pixels in the boundary
regions are adjusted to reduce the magnitudes of the errors.