Tried Gamma Correction

NaN problem. Need to fix this error