What methods currently exist to convert an SVG image to PNG or JPEG programmatically using C#?
I've read all of the existing SO questions on this topic, and all of them involve using an external process to launch a third party program. In my case, this isn't an option as we'll be migrating to Azure soon.
What I need to be able to do is to load the SVG file from disk and ideally convert it to something I can use the System.Drawing classes to manipulate.
Any ideas?
You could take a look at SVG Rendering Engine on CodePlex. It has an overload that will take an in-memory stream (your SVG) which can then be used to convert to an image.
All you need to do is installing SVG Rendering Library nuget package.
And then
That's it.
Well. I will share with my solution to render a SVG file resized to a proper size.
I install this nuget package
You can find the package source code on github here
Then, you can do this:
Enjoy!