A system (100, 400) for compressing dynamic range, comprising: an image receiver to receive an input image with a high dynamic range; a darkness gamma transfer calculator (110, 440) to calculate gain values for each output pixel via a darkness gamma transfer function, characterized in that: the darkness gamma transfer calculator is to calculate the gain values using a two-part darkness gamma transfer function comprising a logarithmic function applied near zero and a power function applied over a rest of the high dynamic range, wherein the power function is based on a base gamma value; and a gain applicator (112, 442) to apply the gain values to color channel values of the input image to generate a compressed image; and the system further comprising a base gamma calculator (108, 438) to set a working image based on the input image and to iteratively calculate the base gamma value used to calculate the gain values, the base gamma calculator to iteratively: set an estimation image to the working image; calculate an average of the estimation image; calculate a base gamma adjustment based on the calculated average; update the working image by applying a power function to the estimation image based on the calculated base gamma adjustment; update the base gamma value based on the calculated base gamma adjustment; calculate an absolute difference between the average of the estimation image and a target average level of brightness of the compressed image; and update a counter. an image receiver to receive an input image with a high dynamic range; a darkness gamma transfer calculator (110, 440) to calculate gain values for each output pixel via a darkness gamma transfer function, characterized in that: the darkness gamma transfer calculator is to calculate the gain values using a two-part darkness gamma transfer function comprising a logarithmic function applied near zero and a power function applied over a rest of the high dynamic range, wherein the power function is based on a base gamma value; and a gain applicator (112, 442) to apply the gain values to color channel values of the input image to generate a compressed image; and the system further comprising a base gamma calculator (108, 438) to set a working image based on the input image and to iteratively calculate the base gamma value used to calculate the gain values, the base gamma calculator to iteratively: set an estimation image to the working image; calculate an average of the estimation image; calculate a base gamma adjustment based on the calculated average; update the working image by applying a power function to the estimation image based on the calculated base gamma adjustment; update the base gamma value based on the calculated base gamma adjustment; calculate an absolute difference between the average of the estimation image and a target average level of brightness of the compressed image; and update a counter. set an estimation image to the working image; calculate an average of the estimation image; calculate a base gamma adjustment based on the calculated average; update the working image by applying a power function to the estimation image based on the calculated base gamma adjustment; update the base gamma value based on the calculated base gamma adjustment; calculate an absolute difference between the average of the estimation image and a target average level of brightness of the compressed image; and update a counter.