Patent ID: 8754902

Claim:
A method performed by one or more data processing apparatuses, the method comprising: accessing a plurality of pixels that represent a digital image; processing each of the accessed plurality of pixels based on a darkness of the digital image to adjust a contrast and a brightness of color space values of the plurality of pixels, resulting in a first plurality of processed pixels, wherein processing the accessed plurality of pixels based on a darkness of the digital image comprises: adjusting a red component, a blue component, and a green component of a color space value of each pixel in the accessed plurality of pixels according to a gamma function based on at least one of the following: a first blur, a first color scale value, and a first user input defining an adjustment to the contrast and the brightness based on the darkness, resulting in increasing a contrast and a brightness of dark regions and decreasing a contrast and a brightness of light regions; processing each of the accessed plurality of pixels based on a lightness of the digital image to adjust a contrast and a brightness of the color space values of the plurality of pixels resulting in a second plurality of processed pixels, wherein processing the accessed plurality of pixels based on a darkness of the digital image comprises: adjusting a red component, a blue component, and a green component of a color space value of each pixel in the accessed plurality of pixels according to a gamma function based on at least one of the following: a second blur, a second color scale value, and a second user input defining an adjustment to the contrast and the brightness based on the lightness, resulting in increasing a contrast and a brightness of light regions; and decreasing a contrast and a brightness of dark regions and combining the first plurality of processed pixels and the second plurality of processed pixels to generate a processed output image.