Simple posterization of an image.

The class implements simple posterization of an image by splitting each color plane into adjacent areas of the specified size. After the process is done, each color plane will contain maximum of 256/PosterizationInterval levels. For example, if grayscale image is posterized with posterization interval equal to 64, then result image will contain maximum of 4 tones. If color image is posterized with the same posterization interval, then it will contain maximum of 43=64 colors. See FillingType property to get information about the way how to control color used to fill posterization areas.

Posterization is a process in photograph development which converts normal photographs into an image consisting of distinct, but flat, areas of different tones or colors.

The filter accepts 8 bpp grayscale and 24/32 bpp color images.

Sample usage:

// create filter SimplePosterization filter = new SimplePosterization( ); // process image filter.ApplyInPlace( sourceImage );

Initial image:

Result image:

Inheritance: BaseInPlacePartialFilter
Example #1
0
 private void SetFilter()
 {
     ImageType = ImageTypes.Rgb32bpp;
     Af.SimplePosterization newFilter = new Af.SimplePosterization();
     newFilter.FillingType           = Af.SimplePosterization.PosterizationFillingType.Average;
     newFilter.PosterizationInterval = (byte)Remap(interval, 1, 100);
     imageFilter = newFilter;
 }