A non-transitory computer-readable recording medium with an executable program stored thereon, the program instructing an imaging device comprising an imaging unit having an imaging element formed of a plurality of pixels, to perform:
- a first generation step of performing imaging under a first exposure condition to generate first image data;
- a second generation step of performing imaging under a second exposure condition different from the first exposure condition to generate second image data;
- an image composition step of generating composite image data with an expanded dynamic range, based on the first image data and the second image data;
- and
- an image file generation step of generating an image file in which the first image data, the second image data, the composite image data, and position information data on positions of pixels obtained by mutually adding pixels for interpolation in a first image corresponding to the first image data and a second image corresponding to the second image data when the composite image data is generated in the image composition step, are recorded in association with one another.