主权项 |
1. An image processing apparatus comprising:
a processor; and a memory storing instructions that, when executed by the processor, cause the image processing apparatus to perform:
acquiring target image data indicating a target image, which is a target of an image processing, and template image data indicating a template image;specifying an object in the target image;specifying an inscribed figure inscribed in a composition target area in the template image and a circumscribed figure circumscribed to the composition target area, the composition target area having a shape different from both a shape of the inscribed figure and a shape of the circumscribed figure;calculating a size ratio between the specified inscribed figure and an area determined based on the object in the target image;setting a first area including the object to the target image based on the calculated size ratio; andgenerating a composited image in which an image, which is in the first area of the target image and whose size has been adjusted based on the size ratio, is composited in the composition target area in the template image, wherein the first area is set such that, when the image in the first area whose size has been adjusted based on the size ratio is superimposed on the composition target area, the object contacts with the inscribed figure and an outer edge of the first area matches an outline of the circumscribed figure. |