Entered image data is stored in a page buffer on a per-page basis, and image data that has been stored in the page buffer is subjected to error diffusion processing on a per-raster basis, thereby creating and outputting binarized data. Sub-scanning direction error due to error diffusion processing is stored in an error buffer at the time of binarization. The error buffer is initialized based upon positions, in the sub-scanning direction, of a raster that underwent error diffusion processing immediately previously and a raster to undergo error diffusion processing, and the number of rasters on a page. As a result, it is possible to avoid a deterioration in image quality at page boundaries and at the beginning of an image simultaneously when data for printing on elongated sheets of paper is processed.