Added a gamma correction option.