In an image forming apparatus that outputs a reference clock, divides the outputted reference clock based on a set multiple, and generates an image clock based on the division, a width of a synchronization signal that indicates dynamic deviation characteristics is detected, and the multiple is set in accordance with the detected width of the synchronization signal.