title: Converting SVG image from Url to PNG in C#
body: <p>I am converting svg image to png format. I am getting image from url. I am getting exception <code>Parameter is not valid</code>. Following is my code:</p>
  
  <pre><code>string svgFileName = "https://upload.wikimedia.org/wikipedia/commons/e/ed/Chicago_Cubs_Logo.svg";
  using (WebClient webClient = new WebClient())
  {
      byte[] data = webClient.DownloadData(svgFileName);
  
      ImageConverter imageConverter = new System.Drawing.ImageConverter();
      Image image = imageConverter.ConvertFrom(data) as Image;
      image.Save("c:\\hello", ImageFormat.Png);                    
  }
  </code></pre>
  
  <p>I am getting the following exception:</p>
  
  <p><a href="https://i.stack.imgur.com/QhrYX.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QhrYX.jpg" alt="enter image description here"></a></p>
  
  <p>Following is my StackTrace:</p>
  
  <pre><code>at System.Drawing.Image.FromStream(Stream stream, Boolean useEmbeddedColorManagement, Boolean validateImageData)
  at System.Drawing.ImageConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value)   
  at System.ComponentModel.TypeConverter.ConvertFrom(Object value)
  </code></pre>
  
  <p>What am I missing?</p>