WPF Tip: Displaying Images in different Pixel formats

Monday, January 30, 2012

If we want to show an image in WPF, we typically use an Image element and connect its Source property to some image resource within our project: <Image Source="Penguins.jpg" /> The Source property is not a string, it’s an ImageSource – an abstract type with several concrete implementations that provide a “real” image source. The above markup works thanks to the help of a type converter, that makes the source a BitmapImage – one of the simplest sources, that presents the image as is. What if we wanted to show the...
5 comments