Tag Archives: image processing

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

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

Perform binary contrast enhancement more quickly in C#

The example Perform binary contrast enhancement interactively in C# lets you convert an image into completely black and white pixels depending on their brightness. Pixels that are brighter than a given cutoff value are converted into white. Those that are … Continue reading

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

Save a RichTextBox image in C#

My post Get the image of a control or form, or a form’s client area in C# uses a control’s DrawToBitmap method to make it draw itself onto a bitmap. Unfortunately the RichTextBox control does not support that method. Another … Continue reading

Posted in controls | Tagged , , , , , , , | Leave a 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

Sprialize an image in C#

This example shows how to spiralize an image. By spiralize I mean shade pieces of the picture with different colors so the colored areas for a spiral as shown in the picture. This could be a difficult problem. Fortunately I’ve … Continue reading

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