You can use this method:
public static BitmapImage base64image(string base64string)
{
byte[] fileBytes = Convert.FromBase64String(base64string);
using (MemoryStream ms = new MemoryStream(fileBytes, 0, fileBytes.Length))
{
ms.Write(fileBytes, 0, fileBytes.Length);
BitmapImage bitmapImage = new BitmapImage();
bitmapImage.SetSource(ms);
return bitmapImage;
}
}
Add the image to your XAML, for example:
<Image x:Name="myWonderfulImage" />
Then you can set the source, for example:
myWonderfulImage.Source = base64image(yourBase64string);
source
share