An image is output, the image having high quality in which density unevenness due to an end-deviation is excellently reduced in all colors in forming an image with use of a bidirectional inkjet printing head provided with ejection port arrays of a plurality of colors for small droplets of ink. Thereby, distributions of print permission rates of mask patterns to be used in performing a multi-pass printing are made different from each other in accordance with a distance between the two ejection port arrays for the same kind of ink. Thus, the degree of the end-deviation depending on the distance between the two ejection port arrays can be suppressed for every ejection port array.