Skip to content

WMF To Base64String

Sunshine

Asked Jul 28, 2016, 9:12 PM EDT2 answers
Share
LinkedInX
Hi,

Is it possible to convert a wmf file to Base64String?

Thanks

2 Answers

Know the answer? Post it. Somebody with the same question will find it here.

  • Suthish Nair
    0
    Yes..
    1. Byte[]bytes=File.ReadAllBytes("wmf file path");
    2. Stringfile=Convert.ToBase64String(bytes);
    3. Byte[]bytes=Convert.FromBase64String(b64Str);
    4. File.WriteAllBytes(path,bytes);
    0
  • 0
    Thanks Suthish.
    When I create this metafile, I want it to be in memory rather than saving it to disk. Is this possible?
    I just have to create a blank metafile. I assume it is like this
    metfile = New Metafile(hdc, EmfType.EmfPlusDual)
    0