|
-
Jan 17th, 2024, 02:03 PM
#1
Thread Starter
Junior Member
VB6: Convert EMF 2 SVG.
Yes, you read correctly.
There are still some survivors around... EMF files!!!!
I would need to convert EMF files to SVG.
Ideally, having code, libraries, or something to use in VB6, in order to fix an old COM component...but,
alternatively, also launching a shell that runs a quick (free) command-line utility...
Do you have any suggestions? any help?
Thanks in advance.
-
Jan 19th, 2024, 04:46 AM
#2
Re: VB6: Convert EMF 2 SVG.
It would certainly be possible to create such a converter using VB code. But it wouldn't be easy. To do this you would have to parse the EMF accordingly and draw all the drawing operations on an SVG. As of the Windows 10 Creators Update, an SVG can be created via the interface ID2D1DeviceContext5::CreateSvgDocument -> ID2D1SvgDocument etc. Or you can create a corresponding SVG-XML from the EMF.
Otherwise, various online converters can be found, Inkscape should be able to do that too. https://stackoverflow.com/questions/...s-to-svg-files
-
Jan 19th, 2024, 10:00 AM
#3
Thread Starter
Junior Member
Re: VB6: Convert EMF 2 SVG.
 Originally Posted by -Franky-
It would certainly be possible to create such a converter using VB code. But it wouldn't be easy. To do this you would have to parse the EMF accordingly and draw all the drawing operations on an SVG. As of the Windows 10 Creators Update, an SVG can be created via the interface ID2D1DeviceContext5::CreateSvgDocument -> ID2D1SvgDocument etc. Or you can create a corresponding SVG-XML from the EMF.
Otherwise, various online converters can be found, Inkscape should be able to do that too. https://stackoverflow.com/questions/...s-to-svg-files
I tried to create a small component on C# using Magick .net or "something": unfortunately it doesn't take care of the "vector conversion"...but what it does is simply serialize the image based on the extension,
(in my case it only put me a miserable "tag" at the top .... Maybe the emf "play" internally goes into error ...so it try to serialize...who knows...
I'll try this Inkscape...
Thanks for your advice.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|