void setGamma(double gamma)
Precomputes a gamma correction table for gamma value gamma, where gamma is a float or double value.
If this function is not called, calls to the gamma function will use a gamma correction of 1.0, effectively no correction at all.
To be used in conjunction with the gamma function.
setGamma(1.8); for (x = x_start; x < x_end; x++) { for (y = y_start; y < y_end; y++) { for (z = 0; z < 3; z++) { pset(x, y, z, gamma(src(x, y, z))); } } }