An image processing apparatus comprising: classification means for classifying areas included in an image in which one scene is captured, based on the distribution of brightness values of the image; and accepting means for accepting selection of an area that is to be processed, from among the classified areas, characterized by further comprising: extension means for extending a first output range corresponding to an input range of brightness values of pixels in the selected area, so as to be wider than a second output range that is the output range when the area is not selected, and for extending a third output range corresponding to an input range of brightness values of an image corresponding to the selected area, among a plurality of images obtained by capturing the one scene at exposures that are different from each other, so as to be wider than a fourth output range that is the output range when the area is not selected; and output means for outputting an image for which an output range of brightness values has been extended to the first output range and that includes at least the selected area, wherein the image is a combined image in which, regarding the selected area, an image for which an output range has been extended to the third output range, of the plurality of images, and an image for which an output range has not been extended to the third output range, of the plurality of images, are combined. classification means for classifying areas included in an image in which one scene is captured, based on the distribution of brightness values of the image; and accepting means for accepting selection of an area that is to be processed, from among the classified areas, characterized by further comprising: extension means for extending a first output range corresponding to an input range of brightness values of pixels in the selected area, so as to be wider than a second output range that is the output range when the area is not selected, and for extending a third output range corresponding to an input range of brightness values of an image corresponding to the selected area, among a plurality of images obtained by capturing the one scene at exposures that are different from each other, so as to be wider than a fourth output range that is the output range when the area is not selected; and output means for outputting an image for which an output range of brightness values has been extended to the first output range and that includes at least the selected area, wherein the image is a combined image in which, regarding the selected area, an image for which an output range has been extended to the third output range, of the plurality of images, and an image for which an output range has not been extended to the third output range, of the plurality of images, are combined. extension means for extending a first output range corresponding to an input range of brightness values of pixels in the selected area, so as to be wider than a second output range that is the output range when the area is not selected, and for extending a third output range corresponding to an input range of brightness values of an image corresponding to the selected area, among a plurality of images obtained by capturing the one scene at exposures that are different from each other, so as to be wider than a fourth output range that is the output range when the area is not selected; and output means for outputting an image for which an output range of brightness values has been extended to the first output range and that includes at least the selected area, wherein the image is a combined image in which, regarding the selected area, an image for which an output range has been extended to the third output range, of the plurality of images, and an image for which an output range has not been extended to the third output range, of the plurality of images, are combined.