title: SkiaSharp converting SVG to PNG spoils image
body: <p>After my method converts SVG code to PNG, it draw lines inside of square. Originally they were just square borders.</p>
  
  <pre><code>private void svgToPng(int itemId)
  {
      // Load created svg file
      XmlDocument doc = new XmlDocument();
      doc.Load("...\\lastCreated.svg");
  
      XmlReader svgSrc = new XmlNodeReader(doc);
  
      string svgSaveAs = "...\\lastCreated.png";
      var quality = 100;
  
      var svg = new SkiaSharp.Extended.Svg.SKSvg();
      var pict = svg.Load(svgSrc);
  
      var dimen = new SkiaSharp.SKSizeI
      (
           (int) Math.Ceiling(pict.CullRect.Width),
           (int) Math.Ceiling(pict.CullRect.Height)
      );
      var matrix = SKMatrix.MakeScale(1, 1);
      var img = SKImage.FromPicture(pict, dimen, matrix);
  
      // Convert to PNG
      var skdata = img.Encode(SkiaSharp.SKEncodedImageFormat.Png, quality);
  
      using(var stream = System.IO.File.OpenWrite(svgSaveAs))
      {
           skdata.SaveTo(stream);
      }
  
      // Upload image
      uploadImage("...\\lastCreated.png", itemId);
  }
  </code></pre>
  
  <p>Here is pictures</p>
  
  <p><strong>Good:</strong></p>
  
  <p><a href="https://i.stack.imgur.com/mO5TJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mO5TJ.png" alt="Good"></a></p>
  
  <p><strong>Bad:</strong></p>
  
  <p><a href="https://i.stack.imgur.com/bodfn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bodfn.png" alt="enter image description here"></a></p>
  
  <p>The best way is to use Inkscape via Process. Don't even try to use libraries,  all of them have bugs.</p>