1. A method comprising: receiving an input image; based on the input image, generating a first output image, such that a contrast of the first output image is the same as a contrast of the input image; generating a first line in an x-y plane, wherein the first line represents a transfer function between (i) pixel values of pixels of the input image and (ii) pixel values of pixels of the first output image; receiving an input to modify the contrast of the input image; and based on receiving the input to modify the contrast of the input image, (i) rotating the first line, about a mid-point of the first line, to generate a second line in the x-y plane, wherein each of the first line and the second line is a straight line, and (ii) based on the second line, generating a second output image having a contrast that is different from the contrast of the input image.