Category Archives: graphics

Let the user scribble on a background image in C#

The post Let the user scribble on a PictureBox in C# shows how you can let the user draw with the mouse. This example lets you load a background image. It also lets you save the result into an image … Continue reading

Posted in drawing, graphics, image processing | Tagged , , , , , , , , , , , , | Leave a comment

Draw a radar chart in C#

A radar chart shows measurements along several axes that all radiate out from a common center. This lets you compare several properties for different objects at the same time. in a way, you can think of a radar chart as … Continue reading

Posted in drawing, graphics | Tagged , , , , , , , | Leave a comment

Revised: Graph world total COVID-19 cases, deaths, and recoveries in C#

This post revises the example Graph world total COVID-19 cases, deaths, and recoveries in C#. Ulrich Rosin left a comment on that post. He added a seven-day average. He also displayed tick marks for the beginning of each month instead … Continue reading

Posted in drawing, graphics | Tagged , , , , , , , , , , , , , , , , | 1 Comment

Create button images in WPF and C#

It seems like I’m constantly building programs like this one to create simple button images that I can use in other programs. This example uses XAML code to create some simple button images. The program’s code then saves those images … Continue reading

Posted in graphics, image processing, wpf | Tagged , , , , , , , , | Leave a comment

Overlay parts of images in C#

My previous post Brighten pixels in an image in C# lets you brighten certain pixels in an image. Unfortunately is often brightens pixels outside of the area that you want to modify. For example, in the left side of the … Continue reading

Posted in algorithms, graphics, image processing | Tagged , , , , , , , , | Leave a comment

Brighten pixels in an image in C#

Sometimes when I take a picture, the poor lighting makes some pixels come out less brightly than I would like. For example, in the picture on the right the red raspberries aren’t very red. This example lets you brighten pixels. … Continue reading

Posted in algorithms, graphics, image processing | Tagged , , , , , , , , | 1 Comment

Make a blended composite image in C#

The other day I wanted to do something that all of us do from time to time: make a composite image with the Eye of Sauron on top of another picture. This turned out to be a bit more complicated … Continue reading

Posted in algorithms, graphics, image processing | Tagged , , , , , , , , , , , | Leave a comment

Crop scaled images to a desired aspect ratio in C#

I often need to crop images and sometimes I want a specific aspect ratio. (In case you haven’t heard this term before, the aspect ratio is the ratio of the image’s width to height. As an equation, it’s width / … Continue reading

Posted in drawing, graphics, image processing | Tagged , , , , , , , , | 1 Comment

Colorize images in C#

This example produces some impressive results, but it’s actually quite simple. It uses ImageAttribute techniques demonstrated by several other examples to quickly manipulate an image’s colors. Adjust Color The following AdjustColor method starts the process of coloring an image. // … Continue reading

Posted in graphics, image processing | Tagged , , , , , , , , | Leave a comment

Test graphical transformations in C#

This example draws several pictures to let you test graphical transformations. The general approach is the same for each picture. The following section explains how the program draws the pictures that demonstrate the various graphical transformations. The sections after that … Continue reading

Posted in drawing, graphics, transformations | Tagged , , , , , , , , , , , , , , | Leave a comment