1. A computer-implemented method, comprising: decomposing a luminance component of a high dynamic range (HDR) image into a base layer including larger-scale variations in contrast and a details layer including smaller-scale variations in contrast; generating an estimate of how much of a lower dynamic range is to be used for luminance values in the details layer; setting a maximum of a lower portion of the lower dynamic range according to the estimate; subsequent to generating the estimate, remapping luminance values of the base layer to the lower portion of the lower dynamic range to generate a compressed base layer, said remapping leaving an upper portion of the lower dynamic range for the details layer of the luminance component; and combining the compressed base layer and the details layer to generate output luminance scaled according to the lower dynamic range, the luminance values of the compressed base layer being in the lower portion of the lower dynamic range and luminance values of the details layer being in the upper portion of the lower dynamic range.