A CPU generates a mask pattern by generating patterns corresponding to a
predetermined number of times in the sub-scanning direction in accordance
with the number of printing elements of a printhead which corresponds to
the amount by which scanning is performed once in the sub-scanning
direction, and repeating this operation by the number of times
corresponding to a predetermined number of columns. The generated mask
pattern is stored in an RAM. An image is then printed by using image data
and the mask pattern stored in the RAM for each printing timing signal in
the main scanning direction.