1. An image processing apparatus comprising: an acquisition unit configured to acquire a plurality of output target images; an arrangement unit configured to arrange a plurality of images in rows and columns in an output region so that the plurality of images acquired by the acquisition unit are arranged in rows or columns for each predetermined number of images; an identification unit configured to, when the plurality of images is arranged in rows and columns, if there is a row or a column in which a number of images is less than the predetermined number of images, identify the number of images in the row or column; and a determination unit configured to, based on the number of images identified by the identification unit, determine a combination of the number of rows and the number of columns, when the plurality of images is arranged in rows and columns.