An image processing apparatus comprising: capturing means configured to fix exposure settings in accordance with operation of a shutter button to a first position, and capture, consecutively, second image data while a flash light is not emitted and first image data while the flash light is emitted, in accordance with operation of the shutter button to a second position, wherein the first image data and the second image data correspond to the same scene; correction means configured to generate, from the first image data captured while the flash flight is emitted, first developed image data by correcting the first image data with a first white balance correction value corresponding to flash light, and to generate, from the first image data captured while the flash light is emitted, second developed image data by correcting the first image data with a second white balance correction value corresponding to ambient light; division means configured to divide the first image data into a plurality of blocks, and to divide the second image data into a plurality of corresponding blocks; combining ratio calculation means configured to calculate for each block i a flash component c[i], and an ambient light component a[i], from a luminance value (b[i]) of the respective block of the first image data and a luminance value (a[i]) of the respective block of the second image data, and calculate for each block i a combining ratio a[i] based on the flash component c[i] and the ambient light component a[i] of the respective block, wherein the luminance value (b[i]) of the respective block of the first image data, and the luminance value (a[i]) of the respective block of the second image data, are obtained using an average color value of the respective block calculated by averaging pixel values of each color over the respective block, wherein the flash component c[i] of the respective block is obtained by subtracting the luminance value (a[i]) of the respective block of the second image data from the luminance value (b[i]) of the respective block of first image data, wherein the ambient light component a[i] of the respective block is the luminance value (a[i]) of the respective block of the second image data, and wherein the combining ratio a[i] is obtained by calculating the ratio α i = c i a i + c i for each respective block; and combining means configured to combine for each block the first developed image data and the second developed image data according to said combining ratio α. capturing means configured to fix exposure settings in accordance with operation of a shutter button to a first position, and capture, consecutively, second image data while a flash light is not emitted and first image data while the flash light is emitted, in accordance with operation of the shutter button to a second position, wherein the first image data and the second image data correspond to the same scene; correction means configured to generate, from the first image data captured while the flash flight is emitted, first developed image data by correcting the first image data with a first white balance correction value corresponding to flash light, and to generate, from the first image data captured while the flash light is emitted, second developed image data by correcting the first image data with a second white balance correction value corresponding to ambient light; division means configured to divide the first image data into a plurality of blocks, and to divide the second image data into a plurality of corresponding blocks; combining ratio calculation means configured to calculate for each block i a flash component c[i], and an ambient light component a[i], from a luminance value (b[i]) of the respective block of the first image data and a luminance value (a[i]) of the respective block of the second image data, and calculate for each block i a combining ratio a[i] based on the flash component c[i] and the ambient light component a[i] of the respective block, wherein the luminance value (b[i]) of the respective block of the first image data, and the luminance value (a[i]) of the respective block of the second image data, are obtained using an average color value of the respective block calculated by averaging pixel values of each color over the respective block, wherein the flash component c[i] of the respective block is obtained by subtracting the luminance value (a[i]) of the respective block of the second image data from the luminance value (b[i]) of the respective block of first image data, wherein the ambient light component a[i] of the respective block is the luminance value (a[i]) of the respective block of the second image data, and wherein the combining ratio a[i] is obtained by calculating the ratio α i = c i a i + c i for each respective block; and combining means configured to combine for each block the first developed image data and the second developed image data according to said combining ratio α.