1. A method of automatic mapping of image data comprising: representing image data for an image as luminance values; determining a key value as a function of an average luminance value of the image and of minimum and maximum luminance values of the image; generating offset-adjusted luminance values including applying an offset to each of the luminance values, the offset being a function of the determined key value and independent of the luminance value; and computing a tone reproduction curve for at least a region of the image which includes applying a mapping function to the offset-adjusted luminance values, the mapping function being a weighted average of a histogram equalization mapping function and a linear mapping function.