An image forming apparatus for forming an image from image data formed with a plurality of pixels, the image forming apparatus comprising: a position deciding unit configured to decide a correction target position in the image data from a position of a reference pixel in the image data based on size-adjustment proportion; a correcting unit configured to perform correction with respect to the correction target position by adding a pixel at the correction target position or deleting a pixel at the correction target position; and a size adjusting unit configured to adjust a size of the image data by performing sub-scanning direction processing including causing the position deciding unit to sequentially decide positions of a plurality of correction target pixels in one line of pixels along a sub-scanning direction and causing the correcting unit to sequentially perform correction with respect to the correction target positions, and performing main-scanning direction processing including performing the sub-scanning direction processing for all the lines of pixels in the sub-scanning direction, thereby obtaining size-adjusted image data; characterised in that when one pixel is added to every L number of pixels aligned in the sub-scanning direction or one pixel is deleted from every L number of pixels in the sub-scanning direction to obtain a predetermined size-adjustment proportion, the position deciding unit is configured to decide the correction target position by calculating, based on L, an integer closest to a square root of L and setting a shift amount between the reference pixel and the correction target position to the integer. a position deciding unit configured to decide a correction target position in the image data from a position of a reference pixel in the image data based on size-adjustment proportion; a correcting unit configured to perform correction with respect to the correction target position by adding a pixel at the correction target position or deleting a pixel at the correction target position; and a size adjusting unit configured to adjust a size of the image data by performing sub-scanning direction processing including causing the position deciding unit to sequentially decide positions of a plurality of correction target pixels in one line of pixels along a sub-scanning direction and causing the correcting unit to sequentially perform correction with respect to the correction target positions, and performing main-scanning direction processing including performing the sub-scanning direction processing for all the lines of pixels in the sub-scanning direction, thereby obtaining size-adjusted image data; performing sub-scanning direction processing including causing the position deciding unit to sequentially decide positions of a plurality of correction target pixels in one line of pixels along a sub-scanning direction and causing the correcting unit to sequentially perform correction with respect to the correction target positions, and performing main-scanning direction processing including performing the sub-scanning direction processing for all the lines of pixels in the sub-scanning direction, thereby obtaining size-adjusted image data; characterised in that when one pixel is added to every L number of pixels aligned in the sub-scanning direction or one pixel is deleted from every L number of pixels in the sub-scanning direction to obtain a predetermined size-adjustment proportion, the position deciding unit is configured to decide the correction target position by calculating, based on L, an integer closest to a square root of L and setting a shift amount between the reference pixel and the correction target position to the integer.