1. A method of using an image sensor and processing circuitry in an electronic device to generate an auto-exposed high-dynamic-range image, the method comprising: with the image sensor, capturing a first image; with the processing circuitry, generating a first exposure time and a second exposure time based on the captured first image; with the image sensor, capturing a second image having long-exposure image pixel values and short-exposure image pixel values, wherein the long-exposure image pixel values are captured using the first exposure time and wherein the short-exposure image pixel values are captured using the second exposure time; with the processing circuitry, generating a long-exposure image and a short-exposure image from the captured second image; and with the processing circuitry, generating the auto-exposed high-dynamic-range image using the long-exposure image and the short-exposure image.