NDennisV
asked on
Convet PNG file to SVG file?
Visual Studio 2012 - C# - Winforms
Does anyone know how to convert a png file to a sgv file?
Or are there any third party controls that can do this?
Thanks
Does anyone know how to convert a png file to a sgv file?
Or are there any third party controls that can do this?
Thanks
ASKER
I need it the other way around - Plenty of ways to turn SVG's into PNG's but not turn PNG's into SVG's.
Check out the SVG framework in C# and an SVG-GDI+ bridge project.
From the above web page...
Source: stackoverflow.com/question s/1525421/ drawing-sv g-in-net-c
From the above web page...
The SvgGdi bridge is a set of classes that use SvgNet to translate between SVG and GDI+. What this means is that any code that uses GDI+ to draw graphics can easily output SVG as well, simply by plugging in the SvgGraphics object. This object is exactly the same as a regular .NET Graphics object, but creates an SVG tree. Even things like hatched fills and line anchors are implemented.
Source: stackoverflow.com/question
ASKER
Thank you - I will check it out tomorrow
ASKER
stackoverflow.com/question s/1525421/ drawing-sv g-in-net-c
leads me to https://github.com/vvvv/SVG
which led me to http://www.oss-marketplace.com/index.php/downloads-mainmenu-63/Inkscape/Entwicklerversionen/
Where I downloaded the source code but it is all about rendering on the web and not Winforms.
leads me to https://github.com/vvvv/SVG
which led me to http://www.oss-marketplace.com/index.php/downloads-mainmenu-63/Inkscape/Entwicklerversionen/
Where I downloaded the source code but it is all about rendering on the web and not Winforms.
no, the codeproject link on top of the comment Titled: "SVG framework in C# and an SVG-GDI+ bridge project."
ASKER
The project is from 2003 which concerns me.
I downloaded the source and the demo project and a library is missing: AxSVGACTIVEXLib so it will not run.
Reading the help I do not see anything about converting from a PNG to a SVG. It's all about SVG only.
Thanks
I downloaded the source and the demo project and a library is missing: AxSVGACTIVEXLib so it will not run.
Reading the help I do not see anything about converting from a PNG to a SVG. It's all about SVG only.
Thanks
from what I see, you can use a png instead of BMP supplied with the test project
as for the missing file, it may be in the project's original website
www.riskcare.net/SvgNet
I can't access it from my network to confirm
as for the missing file, it may be in the project's original website
www.riskcare.net/SvgNet
I can't access it from my network to confirm
ASKER
www.riskcare.net/SvgNet is no longer a valid web site.
I found the library on a Chinese site but I don't know if I should trust it.
I do not see anything about converting bmp to SVG's. The only thing I can find are Icon files that are converted to bmp's.
Thanks
I found the library on a Chinese site but I don't know if I should trust it.
I do not see anything about converting bmp to SVG's. The only thing I can find are Icon files that are converted to bmp's.
Thanks
if its just a library, it cant harm you if you run Windows Vista or newer.
if it tries to change system files, you will get the 'Do you want to continue' message
if it tries to change system files, you will get the 'Do you want to continue' message
ASKER
Yes, but I do not see where it converts anything to SVG's except perhaps an Icon file.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SVG files are vector graphic files, PNG files are raster files. I would say that there is no easy way to automatically convert on to another in C# or another language.
Alternatively you can check the list here of softwares which run the conversions
perhaps you can find a dll in one of them to use
https://en.wikipedia.org/wiki/Comparison_of_raster_to_vector_conversion_software
Alternatively you can check the list here of softwares which run the conversions
perhaps you can find a dll in one of them to use
https://en.wikipedia.org/wiki/Comparison_of_raster_to_vector_conversion_software
ASKER
I've looked at all the links on Wikipedia and cannot find anything.
http://harriyott.com/2008/05/converting-svg-images-to-png-in-c.aspx
Also there is a C# SVG rendering engine, primarily designed to allow SVG files to be used on the web on codeplex that might suit your needs if that is your problem:
Original Project
http://www.codeplex.com/svg
Fork with fixes and more activity: (added 7/2013)
https://github.com/vvvv/SVG