title: C# convert image data to bytes array
body: <p>I have a image with <code>src = &quot;data:image/png;base64....&quot;</code>.</p>
  <p>I want to convert this image into byte array <code>byte[]</code>.</p>
  <p>I have tried something like this:</p>
  <pre><code>string[] Base64 = ImageData.Split(new char[] { ',' });
  
  byte[] imageBytes = System.Convert.FromBase64String(Base64[1].ToString());
  </code></pre>
  <p>What am I doing wrong here?</p>