1. An image forming apparatus comprising: a setting unit configured to set a thinning amount smaller than one pixel for each line data in a high density area in image data; a comparison unit configured to compare the thinning amount set by the setting unit with a predetermined threshold; and a processing unit configured to execute, based on a result of comparison by the comparison unit, a thinning process by using a thinning amount larger than the thinning amount set by the setting unit or a thinning amount smaller than the thinning amount set by the setting unit as for M pixels out of N pixels (N>M) contained in the line data, and a thinning process by using the thinning amount set by the setting unit as for the rest of the N pixels contained in the line data.