I have a base64 string and I want convert that to an image and set the Source of an Image control to the result of that.
Normally I would do that using Image.FromStream
, similar to this:
Image img;
byte[] fileBytes = Convert.FromBase64String(imageString);
using(MemoryStream ms = new MemoryStream())
{
ms.Write(fileBytes, 0, fileBytes.Length);
img = Image.FromStream(ms);
}
However, the Image.FromStream
method does not exist on Windows Phone, and a casual search only turns up results that depend on that method.