1. An image forming apparatus that converts N-valued input image data specifying pixel values of pixels, N being an integer equal to or greater than two, to output image data, the image forming apparatus comprising: a concentration determiner for determining a concentration for each pixel in a set of pixels including a pixel of interest and a plurality of neighboring pixels disposed near the pixel of interest; a ranking unit for assigning a rank to the pixel of interest and to each of the neighboring pixels responsive to the concentrations determined by the concentration determiner; and a pixel value distributor for redistributing pixel values among the pixel of interest and the neighboring pixels according to the ranks assigned by the ranking unit.