title: convert base64 string to image using asp.net c#
body: <p>I'm using this function to convert base64 to image. </p>
  
  <pre><code>public Image Base64ToImage(string base64String)
  {
      // Convert Base64 String to byte[]
      byte[] imageBytes = Convert.FromBase64String(base64String);
      using (var ms = new MemoryStream(imageBytes, 0,imageBytes.Length))
      {
          // Convert byte[] to Image
          ms.Write(imageBytes, 0, imageBytes.Length);
          //Image image = Image.FromStream(ms, true);
          Image image = Image.FromStream(ms,true,true);
          return image;
      }
  }
  </code></pre>
  
  <p>but it is not working. please help me.</p>