public static async System.Threading.Tasks.Task<BitmapImage> base64image(string base64string)
{
byte[] fileBytes = Convert.FromBase64String(base64string);
using (InMemoryRandomAccessStream stream = new InMemoryRandomAccessStream())
{
await stream.WriteAsync(fileBytes.AsBuffer(0, fileBytes.Length));
stream.Seek(0);
BitmapImage image = new BitmapImage();
await image.SetSourceAsync(stream);
return image;
}
}
}