1. An image processing apparatus for quantizing image data, comprising: a corrector, configured to add a value of a diffusing error for a pixel of interest to input image data of the pixel of interest, wherein the value of the diffusing error is calculated from error data which are occurred in quantization of pixels adjacent to the pixel of interest; a quantization section, configured to quantize the image data, to which the value of the diffusing error is added, using a quantization threshold value; a calculator, configured to calculate error data of the pixel of interest from the result of the quantization and the image data to which the value of the diffusing error is added; a detector, configured to detect pixels which are adjacent to the pixel of interest and have quantization results corresponding to the input image data of the pixel of interest; and a setting section, configured to calculate information between pixels based on differences between input image data and quantization results of adjacent pixels which fall within ranges corresponding to the detected adjacent pixels, and to set the quantization threshold value for the pixel of interest based on the information between pixels.