int saturation(int r, int g, int b, int z, int sat)
The new pixel color channel value after the saturation effect is applied.
Applies a simple saturation effect to a given RGB pixel value.
ctl[0]: "Saturation", Range=(-500,500), Val=0 ForEveryTile: { int r, g, b; for (y = y_start; y < y_end; y++) { for (x = x_start; x < x_end; x++) { r = src(x,y,0); g = src(x,y,1); b = src(x,y,2); for (z=0; z < 3; z++) { pset(x,y,z, saturation(r, g, b, z, ctl(0))); } } } return true; }