1. A non-transitory program storage device comprising instructions stored thereon to cause one or more processors to: acquire first and second images, each captured at a different exposure, each comprising a plurality of pixels; downsize the first and second images, each downsized image comprising a plurality of image elements, wherein each image element in the downsized first image corresponds to a plurality of pixels in the first image and each image element in the downsized second image corresponds to a plurality of pixels in the second image, and wherein there is a one-to-one correspondence between image elements of the downsized first and second images; determine an exposure shift and an optical flare between the first and second images based, at least in part, on the downsized first and second images; apply the determined optical flare to the first and second images to obtain first and second modified images; apply the determined exposure shift to the first modified image to obtain an intermediate image; and combine the intermediate image and the modified second image to obtain an output image, the output image having a larger dynamic range than the first or second image.