Patent ID: 7518628

Claim:
An image forming apparatus, comprising: a light source to illuminate in response to image data; a deflector to deflect an optical beam output from the light source into a scanning beam running along a main scanning line across an image forming area in a main scanning direction; a plurality of beam detectors to detect the scanning beam at a plurality of different positions along the main scanning line, the plurality of beam detectors including first and second beam detectors detecting the scanning beam at positions in front-end and rear-end sides, respectively, in the main scanning direction; a clock generator to generate writing clock signals for controlling an illumination of the light source; a measurement mechanism to measure a count number of the writing clock signals generated during a scanning period between detections of the scanning beam by the first and second beam detectors; a frequency corrector to correct a frequency of the writing clock signals so the count number measured by the measurement mechanism becomes substantially equivalent to a predetermined reference count number; and a phase corrector to vary a phase of the writing clock signals so the count number is substantially constant before and after the phase of the writing clock signals is varied, wherein the phase corrector divides the scanning period into a plurality of sub-periods corresponding to a plurality of image areas, and varies the phase of the writing clock signals with respect to each of the plurality of image areas so a sum of phase variation amounts generated before and after the phase of the writing clock signals is varied becomes substantially zero.