Title: Pixellate an image and create other effects in C#
This example extends the previous example Use image filters to perform edge detection, smoothing, embossing, and more in C# by adding the ability to pixellate an image. It also adds the ability to load and save files, and a few other new effects.
Each of the new effect considers square areas on the picture. Enter the size you want for the squares in the Rank box and click a button.
The new effects are:
- Maximum - Sets all of the pixels in each area to the brightest color in the area.
- Minimum - Sets all of the pixels in each area to the darkest color in the area.
- Pixellate - Sets all of the pixels in each area to the average color in the area.
- Pointellate - Fills each area with a circle that has the average color in the area.
(If you add other graphical methods or have suggestions, let me know.)
These methods are reasonably straightforward but rather long so their code isn't shown here.
Download the example to experiment with it and to see additional details.
|