Convert Base64 to Image

Gopesh9
Posted by Gopesh9 under ASP.NET category on | Points: 40 | Views : 3785
public Image ConvertBase64ToImage(string baseS)
{
byte[] iBytes = Convert.FromBase64String(baseS);
MemoryStream mem = new MemoryStream(iBytes, 0, iBytes.Length);
mem.Write(iBytes, 0, iBytes.Length);
Image ConvertedImage = Image.FromStream(mem, true);
return ConvertedImage;
}

Comments or Responses

Login to post response