[C# Helper]
Index Books FAQ Contact About Rod
[Beginning Database Design Solutions, Second Edition]

[Beginning Software Engineering, Second Edition]

[Essential Algorithms, Second Edition]

[The Modern C# Challenge]

[WPF 3d, Three-Dimensional Graphics with WPF and C#]

[The C# Helper Top 100]

[Interview Puzzles Dissected]

[C# 24-Hour Trainer]

[C# 5.0 Programmer's Reference]

[MCSD Certification Toolkit (Exam 70-483): Programming in C#]

Title: Pixellate an image and create other effects in C#

pixellate an image

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.

© 2009-2023 Rocky Mountain Computer Consulting, Inc. All rights reserved.