In this way, the pixel pitch in the sub-scanning direction is subtly adjusted according to a scanning timing in the man scanning direction, and image degradation due to the driving error of the deflection means can be suppressed.The program can be recorded to a recording medium, such as a CD-ROM, to be widely distributed and obtained by any user.