img levels

Levels allows you to alter various aspects of an image. You can (auto) set the white and black points, or pass a curve to use, along with specific channels to act on. By default it acts on all colour channels together.

--red
Act on the red channel.
--green
Act on the green channel.
--blue
Act on the blue channel.
--auto
Auto adjust levels to fit. This forces the colours in the image to fill the whole range; that is, the lightest colour is set to white and the darkest is set to black.
--auto-black
Auto adjusts the black point to fit. This sets the darkest point in the image black.
--auto-white
Auto adjusts the white point to fit. This sets the lightest point in the image white.
--black <n>
Set the black point to the value given (between 0 and 1).
--white <n>
Set the white point to the value given (between 0 and 1).
--curve <c>
Set the curve (though it is only currently implemented with linear interpolation). The argument should be passed as a list of point,value pairs delimited by spaces, for example: 0,0 33,40 66,60 100,100.