1. A method of processing digital image data comprising a plurality of pixel values, the method comprising: filtering the image data to obtain a locally averaged value for each pixel value; for each pixel value in the image data: a) using its locally averaged value, to obtain a corresponding shadow value and highlight value from a selected shadow function and a selected highlight function, respectively; b) deriving at least one tone function from one of the corresponding shadow value and highlight value; and c) remapping each pixel according to its at least one derived tone function to obtain a tone adjusted pixel value.