3.1.1. Answer
Increasing or decreasing the brightness involves adding or subtracting a certain amount from the value of each pixel.
The contrast can be increased by plotting an y=mx graph according to the value, where m is greater than 1 to increase the contrast, and less than 1 to decrease it.