int posterize(int pixel, int intensity)
The new posterized pixel value.
Applies a simple posterize effect to reduce the number of colors in an image. The stronger the posterize effect, the fewer colors in the resulting image.
ctl[0]: "Posterize", Range=(0,255), Val=255 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, posterize( src(x,y,z), ctl(0) )); } } } return true; }
blend, contrast, gamma, gray, saturation