gamma
Syntax
- int gamma(int i)
Arguments
- i
- The intensity to be corrected. i must be higher or equal to 0 and lower or equal to 255.
Return
- The gamma-corrected value of i.
Description
- Allows the user to efficiently calculate gamma correction.
- To be used in conjunction with the setGamma function.
Example
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)));
}
}
}
Also see
- setGamma
Comments
- Everyone can add his comments about his experiences with this function here. Tips for using it are welcome, too.