1. A method of using an image sensor and processing circuitry in an electronic device to generate a motion-compensated high-dynamic-range image of a scene containing a moving object, the method comprising: with the image sensor, capturing first and second images, wherein the first and second images each include long-exposure image pixel values and short-exposure image pixel values; with the processing circuitry, generating an interpolated long-exposure image from the first image; with the processing circuitry, generating an interpolated short-exposure image from the first image; with the processing circuitry, generating a long-exposure image that includes image pixel values from the first image, the second image, and the interpolated long-exposure image; with the processing circuitry, generating a short-exposure image that includes image pixel values from the first image, the second image, and the interpolated short-exposure image; and with the processing circuitry, generating the motion-compensated high-dynamic-range image using the long-exposure image and the short-exposure image.