An image forming apparatus is provided with a modulator producing a modulated signal of a pulse width decided on given image data and a driver driving an optical generator such as laser to generate a light beam. The image forming apparatus is further provided with a scanner periodically scanning the light beam generated by the optical generator and a power detector detecting information indicative of a power of the light beam scanned by the scanner. A pulse width adjustor uses the information detected by the power detector, in order to adjust the pulse width of the light beam.