The previously mentioned
WriteableBitmapEx library contains a set of great built-in features. Some of them have been already described, but in this recipe you will learn how to easily convert an image into grayscale mode.
To step through this recipe, you only need the automatically generated project.
To prepare the example that loads an image and converts it into grayscale, perform the following steps:
WriteableBitmapExlibrary using the NuGet Package Manager.
Image.jpgfile to the
Imagecontrol where the grayscale photo will be shown on the page by adjusting the content of the
MainPage.xamlfile, as follows:
<Page (...)> <Grid> <Image x:Name="Photo" ...