added gamma correction.