Tag Archives: Bitmap32

Trim images in C#

This example shows how you can trim images to remove unnecessary whitespace around their edges. Sometimes when I make pictures for a book, it’s hard to tell where the edges of the picture begin, so I risk either including more … Continue reading

Posted in Uncategorized | Tagged , , , , , , , , | Leave a comment

Warp images arbitrarily in C#, Part 2

The post Warp images arbitrarily in C#, Part 1 explains how to warp images, but it omits the method that maps an output pixel (x1, y1) back to an input pixel (x0, y0) in the original image. This post describes … Continue reading

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

Warp images arbitrarily in C#, Part 1

This is an extension of the example Use image filters to perform edge detection, smoothing, embossing, and more in C# that adds new features that warp images in arbitrary ways. The idea is to use two functions F(x, y) and … Continue reading

Posted in algorithms, graphics, image processing, mathematics | Tagged , , , , , , , , , , , , , , , , , , , | 3 Comments

Write a graphical floodfill method in C#

A floodfill fills a pixel and all of those around it that have the same color with a new color. This example draws a bunch of random circles. When you click an area between the circles’ perimeters, the program floodfills … Continue reading

Posted in algorithms, drawing, graphics, image processing | Tagged , , , , , , , , , , , , , , | 2 Comments