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 prepare the example that loads an image and converts it into grayscale, perform the following steps:
Install the
WriteableBitmapEx
library using the NuGet Package Manager.Add the
Image.jpg
file to theAssets
directory.Place the
Image
control where the grayscale photo will be shown on the page by adjusting the content of theMainPage.xaml
file, as follows:<Page (...)> <Grid> <Image x:Name="Photo" Stretch="UniformToFill" VerticalAlignment="Center" HorizontalAlignment="Center" /> <...