Added gamma correction method