Windows Metafile

Template: Infobox file format / Maintenance / Magic number is missing template: Infobox file format / Maintenance / default missing template: Infobox file format / Maintenance / missing site

Windows Metafile ( WMF) is a proprietary meta -Files graphic format created by Microsoft. It was developed for the exchange of graphics on various programs away and finds, among other things in the Windows clipboard using. If graphics in WMF format stored, the files have the three-letter file name extension ". Wmf ". WMF is a 16 -bit format, which has already been introduced with Microsoft Windows 3.0.

WMF is a vector-based file format. That is, sharp edges remain sharp even after any magnification. In addition, surfaces can be filled with raster graphics.

The name component "meta " indicates that this format was designed to exchange data via the clipboard.

Shortcomings

Unlike other vector-based file formats such as PostScript or SVG WMF has no way to represent splines directly. When converting a spline is defined as, therefore reversed curved line into a polyline with short straight sections. The length of these sections is based on what is just not recognizable as a combination of straight lines in a typical screen display.

All graphics systems ( Postscript ) internally use polylines for the curved lines of fonts, and for circles and ellipses. With the WMF lines are also in the file. This has the consequence that the steps and kinks occur with a copy to the clipboard and then zoom between routes - sections in appearance, if the individual lines are too long. An i - point is similar for a copy to the clipboard possibly more a polygon as a circle. In this way, the potential benefit of a vector-based format will be lost partially. Since printers have a much greater resolution than screens, can be seen in the expression itself without magnification that curved lines from single straight lines exist. This effect is particularly surprising in appearance when the grafiker convincing program for example, has created an OLE object including the WMF preview only for screen display sufficient accuracy.

The possibilities of WMF would certainly allow you to produce satisfactorily accurate graphics for printing. In particular, the principle of freedom of choice for graphic resolution allows virtually any fine representations of eg line widths. But often generating programs use only a 72- DPI resolution for the graphics exchange via the clipboard, which is just sufficient for the screen display.

Vulnerability in WMF

On December 28, 2005, an exploit was discovered that exploits a bug in the processing of WMF files. This error is included in all versions from Microsoft Windows 3.0, but can be exploited in 2000 until the Microsoft Windows version. With its help can be executed any, including harmful code. The execution is triggered already by viewing a specially crafted WMF file. This vulnerability has been publicly known until the appearance of the first viruses that exploiting them. Microsoft recommends to close the security hole to install the update released by Microsoft on 5 January 2006 security update.

Notes on WMF specification

  • The smallest possible unit in WMF files is the twip. WMF is a binary format with 16 -bit integers, so the value range of the coordinates is limited to ± 32,767. Because WMF files can choose their resolution within the specifications free is the maximum edge length of a finely dissolved Stauf file eg 1 twip x 65,536 = 65,536 twips (~ 1155.98 mm) or a file, which dissolves at 72 DPI: 1 point × 65,536 = 65,536 points (~ 23121.1 mm).
  • WMF files have a 18 byte header area ( header) can be appended to the virtually unlimited number of sections ( records ) with object definitions that rely on features of the Windows GDI. To exchange program boundaries, many programs of the WMF file an additional 22 -byte header area ( header) above, the apparent is the hexadecimal start byte D7- CD - 6- 9A ( interpreted as INTEL 32 -bit DWORD: 9AC6CDD7 ).

Microsoft Knowledge Base According to the WMF file format has been changed slightly probably in 2000 (which in FrontPage 2000/2002 older WMF files are imported in wrong size). So it seems to be different versions.

The complete specification has been published on CD in the " Microsoft Developer Network " (MSDN )

Windows Enhanced Metafile ( EMF)

Windows Enhanced Metafile ( EMF) is a further development of WMF. For the definition of image coordinates in contrast to WMF it uses a 32-bit format. EMF is used as a printer language.

825820
de