1. A method comprising: calculating an image key value, by a computing device, for image data based on values of pixels of image data; computing a tuning value by the computing device using the image key value, the tuning value configured to adjust how the image data is to be measured to compute an image compensation value; computing the image compensation value by the computing device such that a statistic computed in accordance with the tuning value approaches a target value; and applying the image compensation value by the computing device to adjust the values of the pixels of the image data.