Gamma correction for 2D histograms