1. An image forming apparatus comprising: a reference area obtaining unit that generates and preserves, for a pixel-of-interest of an image, a plurality of pixels around the pixel-of-interest as a reference area; a modification information preserving unit that preserves modification information of pixels of the image; a modification information determining unit that determines whether there is modification information relating to pixels in the reference area which are preserved by the reference area obtaining unit; a modification-information-referring modification unit that modifies, if it is determined by the modification information determining unit that there is modification information, the pixel-of-interest referring to the modification information; a reference-area-referring modification unit that modifies the pixel-of-interest based on information in the reference area, if it is determined by the modification information determining unit that there is no modification information; a modification information updating unit that updates the modification information based on modification by the reference-area-referring modification unit; and a shift unit that modifies the write timing of the image.