An image forming apparatus that is capable of scanning at a proper speed
at all positions on a main scan line without being affected by variations
in the characteristics of a f-.theta. lens, variations in the laser beam
wavelength, irregularities in the rotational speed of a polygon mirror
and fluctuations in the characteristics of the f-.theta. lens due to
changes in ambient temperature. An image clock signal for exposure
control is generated for each of a plurality of segments obtained by
dividing a main scan line on a photosensitive drum scanned by a laser
beam, based on a modulation coefficient. The modulation coefficient is
corrected based on the detected phase difference between detection timing
of the terminating end of the main scan line and generation timing of the
last image clock signal for the last segment.