将经Base64编码后的位图(png、jpg)字符串重新还原成图片显示:
public class PhotoConverter
{
public BitmapImage PhotoConvert(string value)
{
byte[] imageBytes = Convert.FromBase64String(value.ToString());
BitmapImage bi = new BitmapImage();
bi.SetSource(new MemoryStream(imageBytes));
return bi;
}
}