When composition of a first captured image having a tilted subject image
is corrected, the first image is rotated such that the subject image
stands in an erect position, according to the attitude of the camera
achieved during capture of the first image. Images corresponding to
missing portions, which arise in the image area for recording due to
rotation, are extracted from a second captured image as compensation
images. The second image is obtained by capturing an image of the same
subject as that captured by the first image, at the different angle of
view and attitude of the camera. An image obtained by enlarging the
compensation images extracted from the second image according to the
angle of view employed for capturing the first image is synthesized with
the rotated first image, to thus make the subject image stand in an erect
position and to obtain a corrected image without involving a decreased
number of pixels.