Questions tagged [wmf]

A Windows metafile (WMF) consists of a collection of records that can store an image. The stored image can be rendered by parsing and processing the metafile structure.

A Windows metafile (WMF) is a vector image file format which consists of a collection of records that can store an image. The stored image can be rendered by parsing and processing the metafile structure.

The Windows metafile begins with a header record, which may include the version of the metafile, its size, and the maximum number of objects that are defined. A metafile with its records defines the steps to read the final image and hence can be "played back" when its records are converted to graphics commands and executed by a graphics API to render the image.

93 questions
13
votes
2 answers

Is there a limitation on dimensions of Windows Metafiles?

I'm creating some .wmf files, but some of them seem corrupted and can't be shown in any metafile viewer. After some trial and error, I found that the problem is caused by their dimensions. If I scale the same drawing by a factor to reduce the…
saastn
  • 5,717
  • 8
  • 47
  • 78
10
votes
2 answers

Does WPF support reading/writing WMF/EMF files natively?

Can Windows Presentation Foundation read/write WMF/EMF files without having to use WinForms Interop or Win32. If it does not, what is the reason?
user62572
  • 1,388
  • 2
  • 15
  • 24
8
votes
2 answers

How to get matplotlib figures in emf/wmf format?

How can I get matplotlib plots as emf or wmf files that are usable as vector graphics in MS Office (Word and PowerPoint)? I've tried exporting to svg and converting to emf using both Inkscape and LibreOffice Draw, but both of those options seem to…
iamchoosinganame
  • 1,090
  • 6
  • 15
7
votes
2 answers

How to draw smooth images with C#?

I'm trying to draw images on a C# form (in PictureBoxes, as well as using Graphics.DrawImage()), and am looking for a way to draw them smooth. The images must be a format that supports transparency, so PNG, GIF, SVG, and WMF. C# doesn't support…
Mike Trpcic
7
votes
1 answer

WUSA 2359302 Error Code when installing WMF silent

I'm trying to add WMF via WUSA.exe to use powershell 3.0 on Windows 7. This to rename a computer, because I don't find the right NETDOM.Exe installer, and the WMI command doesn't work. The WUSA silent installer gives me the 2359302 error. What does…
nielsvermaut
  • 71
  • 1
  • 1
  • 5
6
votes
3 answers

Save metafile in C#

If I have a wmf or emf image in System.Drawing.Image, is there a way to save the metafile data with c# without rendering it as a bitmap? Calling Image.Save will render it to a bitmap and I want to keep the original data so that it would still be a…
Chris Miller
  • 4,809
  • 4
  • 33
  • 50
6
votes
2 answers

Take high resolution photo from USB camera in Windows (C++)

I am developing an C++ application which should use an USB camera to capture high resolution photos. It should have same behavior as the Camera application in Windows 10. I am trying to use DirectShow for doing it. Now I am only able to take high…
radimoid
  • 199
  • 1
  • 9
6
votes
4 answers

Convert WMF to PNG/BMP/JPG

How can I convert one WMF file to PNG/BMP/JPG format with custom output resolution? Example: Take WMF file and outputs PNG file with 2000x2000 px. Thanks in advance.
user1970058
  • 93
  • 1
  • 5
5
votes
1 answer

How to enable anti-aliasing when rendering WMF to BitMap in C#/WPF/WinForms?

Why won't lines etc be anti-aliased when doing this? using (var myGraphics = Graphics.FromImage(bitmap)) { myGraphics.CompositingQuality = CompositingQuality.HighQuality; myGraphics.SmoothingMode =…
Macke
  • 24,812
  • 7
  • 82
  • 118
5
votes
2 answers

WMF / EMF File Format conversion C#

In my program, I have a requirement to "playback" or "parse" windows metafiles (WMF and EMF). I have dug through MSDN and Google, and the closest I have come is the Graphics. EnumerateMetafile method. I can get it to work, in that my…
FlaCracker
  • 51
  • 1
  • 2
5
votes
1 answer

Cannot convert SVG to WMF with Imagemagick

I'm trying to convert an image in SVG format to WMF using PHP and Imagick under Linux. I can convert images from SVG to PNG successfully, but not from SVG to WMF. I get no PHP errors, just a NULL image. I suspect that I may have an…
user2533046
  • 51
  • 1
  • 3
4
votes
4 answers

Convert an image into WMF with .NET?

There are plenty of examples of converting a wmf into a bitmap like: Reliable .wmf/wmf to Pixel based image conversion But I need the reverse operation. I do not look for a vectorizer. I just want to embed a picture inside a wmf file without having…
jdehaan
  • 19,700
  • 6
  • 57
  • 97
3
votes
1 answer

C# library for CGM or WMF vector format output

I am writing a diagramming app in C# .NET 4 and needs the graphic output to be editable in Microsoft Excel. The only 2 vector formats I know for MS Office - CGM and WMF. I am using OpenTK for its OpenGL wrapper, so I have all the vertices. I also…
Jake
  • 11,273
  • 21
  • 90
  • 147
3
votes
3 answers

An unclear converted image. wmf to png

I'm trying to convert wmf image file into png format with c#.net. But, saved image is unclear. my code: Metafile img = new Metafile(@"test.wmf"); MetafileHeader header = img.GetMetafileHeader(); Bitmap bitmap = new Bitmap((int)(img.Width /…
turutosiya
  • 1,051
  • 10
  • 17
3
votes
2 answers

Force ggsave to vectorize point geoms in .wmf-files

Plots produced with R are not usable for publication if they cannot be exorted properly. I work on a Windows Machine and use MS Word 2016 for all writing purposes. So, I wish to export my plots as .wmf files (.emf would also do, I suppose). I…
yenats
  • 531
  • 1
  • 3
  • 16
1
2 3 4 5 6 7