attached svg file to png not working
See original GitHub issueusing dotnet 6
using System.Drawing.Imaging;
using System.Xml;
using Svg;
string directory = AppContext.BaseDirectory;
string inputSvgFile = Path.Combine(directory, "input.svg");
string outputPngFile = Path.Combine(directory, "output.png");
string svg = File.ReadAllText(inputSvgFile);
XmlDocument doc = new();
doc.LoadXml(svg);
var svgDoc = SvgDocument.Open(doc);
var bitmap = svgDoc.Draw();
bitmap.Save(outputPngFile, ImageFormat.Png);
Issue Analytics
- State:
- Created a year ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
imageMagick not working, to convert the SVG (SVG having ...
Given all your data downloaded to my computer, I can convert it to png using ImageMagick 6.9.10.82 Q16 Mac OSX Sierra that calls...
Read more >Export to PNG doesn't display SVG images #347
When exporting the attached drawio file (inside the zip) as PNG, the SVG image isn't shown. It doesn't happen with the online version...
Read more >Illustrator Export not working right with my SVG file
Hello Everyone, For some reason, my svg file is not exporting correctly when I am using illustrator. I have attached a PNG of...
Read more >Converting large SVG to PNG file - inkscape
So I have a 16mb SVG file with about 30,000 nodes and I've been trying to convert it to a 10,000x10,000 png image....
Read more >Image uploads: unsupported items
When uploading .svg or .dxf files into Cricut Design Space, you may receive the following error message: "Your file includes unsupported items.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
For reference: the problem has appeared after this commit with version 3.4.0. The same is true for the image in #1013.
you can use this code to generate some test svg files: