= posterize =
== Syntax == int posterize(int pixel, int intensity) == Arguments == :pixel ::The pixel color value to modify :intensity ::The intensity of the posterize effect (range 0 to 255) == Return == The new posterized pixel value. == Description == 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. == Example == <code> 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; }</code> == See Also == blend, contrast, gamma, gray, saturation |