int tone(int pixel, int h, int m, int d)
The newly toned pixel value.
Applies a simple highlight / midtone / darkness tone effect to the image.
ctl[0]: "Highlights", Range=(-127,128), Val=0 ctl[1]: "Midtone", Range=(-127,128), Val=0 ctl[2]: "Darkness", Range=(-127,128), Val=0 ForEveryTile: { for (y = y_start; y < y_end; y++) { for (x = x_start; x < x_end; x++) { for (z=0; z < 3; z++) { pset(x,y,z, tone( src(x,y,z), ctl(0), ctl(1), ctl(2) )); } } } return true; }