View Code
1 private Image Base64ToImage(string base64String)
2 {
3 byte[] imageBytes = Convert.FromBase64String(base64String);
4 MemoryStream ms = new MemoryStream(imageBytes, 0, imageBytes.Length);
5 ms.Write(imageBytes, 0, imageBytes.Length);
6 System.Drawing.Image image = System.Drawing.Image.FromStream(ms, true);
7 return image;
8 }