An image compositing device, comprising: a motion area detecting section to detect a motion area of a subject based on a base image and at least one comparative image that are photographed at different times; a compositing area setting section to set a compositing area in the at least one comparative image based on the detected motion area; and a composite image generating section to composite the set compositing area to be used for replacing the base image so as to generate a composite image, the motion area detecting section extracts a contour in a difference image between the base image and the at least one comparative image; the compositing area setting section sets the compositing area based on the contour extracted in the difference image, characterized by a face area detecting section to detect a plurality of face areas in the base image and the at least one comparative image; a face area display section to display the plurality of face areas detected in the base image and the at least one comparative image in a selectable manner by a user; and a comparative image selecting section to make a selection, wherein when replacing a first face area selected in the base image with a second face area in a selected comparative image, the second face area including a common subject with the first face area, if there is an interference between the second face area and at least one of the other face areas in the selected comparative image, the comparative image selecting section selects another comparative image other than the selected comparative image, having a third face area including the common subject with no interference with any other face areas therein, for replacing the first face area with the third face area. a motion area detecting section to detect a motion area of a subject based on a base image and at least one comparative image that are photographed at different times; a compositing area setting section to set a compositing area in the at least one comparative image based on the detected motion area; and a composite image generating section to composite the set compositing area to be used for replacing the base image so as to generate a composite image, the motion area detecting section extracts a contour in a difference image between the base image and the at least one comparative image; the compositing area setting section sets the compositing area based on the contour extracted in the difference image, characterized by a face area detecting section to detect a plurality of face areas in the base image and the at least one comparative image; a face area display section to display the plurality of face areas detected in the base image and the at least one comparative image in a selectable manner by a user; and a comparative image selecting section to make a selection, wherein when replacing a first face area selected in the base image with a second face area in a selected comparative image, the second face area including a common subject with the first face area, if there is an interference between the second face area and at least one of the other face areas in the selected comparative image, the comparative image selecting section selects another comparative image other than the selected comparative image, having a third face area including the common subject with no interference with any other face areas therein, for replacing the first face area with the third face area.