Bitmaps are used in one form or another mainly to display existing images. These typically are placed as a source of an
Image element. When a static image is added to a project and set to the
Image.Source property, a
BitmapImage is created behind the scenes. This simple class provides a read-only view to the bitmap's bits.
Sometime it's desirable to manipulate a bitmap's bit values dynamically based on a runtime algorithm. WPF provides the
WriteableBitmap that allows us to do just that. Let's look at how to use this capability.
Make sure Visual Studio is up and running.
We'll create an application that displays the famous Mandelbrot set, requiring calculating colors for each pixel ...