Patent ID: 7558440

Claim:
An image processing apparatus comprising: acquisition means for specifying a to-be-output area of an input image represented by image data as an output image and acquiring a site of the output image; selection means for selecting, on the basis of the size of the output image acquired by said acquisition means, one image output size from a plurality of image output sizes set in advance; layout determination means for determining a layout state of the output image in an output area having the image output size selected by said selection means; selection changing means for making said selection means select another image output size different from the image output size selected by said selection means if an extending length of an outstretch margin exceeds a corresponding length of the output area indicated by the layout state by more than a predetermined amount, wherein the outstretch margin is a portion of the output image extending beyond the output area in either a horizontal or vertical direction; and output area changing means for reducing the to-be-output area so that the output image fits within the output area if the extending length of the outstretch margin does not exceed the corresponding length of the output area by more than the predetermined amount.