A system and method are provided for correcting an image captured by a
digital image capturing device. The method includes calculating a log of
a desired correction value based on sample point and a target value for
that point and calculating an approximation to the log of illumination
based on an input pixel intensity. The method additionally includes
calculating any target pixel intensity value based on the log of the
correction value and the approximation to the log of illumination. Image
correction tools correct the image to correspond to the target pixel
intensity value. The technique may be used to correct the gain of any
image and for example, may correct exposure or color balance
deficiencies. The technique provides excellent results regardless of the
image capturing device.