1. An image processing apparatus that restores a multilevel image before halftone processing, from a halftone image obtained by the halftone processing employing a threshold matrix, the image processing apparatus comprising: a restoration unit that, accumulates significant dot values within a reference window that encompasses a pixel of interest in the halftone image, and that restores a multilevel pixel value that corresponds to that pixel of interest by referring to a conversion table based on the accumulated values; wherein the size of the reference window is determined such that a product of a bit depth in the halftone image and the number of pixels within the reference window becomes a minimum value that exceeds the number of tones in the multilevel image.