Results 1 to 3 of 3

Thread: VB6: Convert EMF 2 SVG.

  1. #1

    Thread Starter
    Junior Member Flauzer's Avatar
    Join Date
    Mar 2022
    Location
    c:\windows\system32
    Posts
    19

    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.

  2. #2
    Hyperactive Member -Franky-'s Avatar
    Join Date
    Dec 2022
    Location
    Bremen Germany
    Posts
    474

    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

  3. #3

    Thread Starter
    Junior Member Flauzer's Avatar
    Join Date
    Mar 2022
    Location
    c:\windows\system32
    Posts
    19

    Re: VB6: Convert EMF 2 SVG.

    Quote Originally Posted by -Franky- View Post
    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
  •  



Click Here to Expand Forum to Full Width