Windows Metafile

From Wikipedia, the free encyclopedia

Jump to: navigation, search
Windows Metafile
Filename extension .wmf, .emf, .wmz, .emz
Internet media type image/x-wmf, image/x-emf
Developed by Microsoft
Type of format Image file formats

Windows Metafile (WMF) is a graphics file format on Microsoft Windows systems, originally designed in the early 1990s. Windows Metafiles are intended to be portable between applications and may contain both vector and bitmap components. In contrast to raster formats such as JPEG and GIF which are used to store bitmap graphics such as photographs, scans and graphics, Windows Metafiles generally are used to store line-art, illustrations and content created in drawing or presentation applications. Most Windows clipart is in the WMF format. With vector graphics, a Windows Metafile can store an image in much less less space than its raster graphics equivalent — 1% to 0.5% of the latter is not unusual. When embedded in documents, the storage space reductions are similarly impressive.

Essentially, a WMF file stores a list of function calls that have to be issued to the Windows Graphics Device Interface (GDI) layer in order to display an image on screen. Since some GDI functions accept pointers to callback functions for error handling, a WMF file may include executable code.[1]

WMF is a 16-bit format introduced in Windows 3.0. It is the native vector format for Microsoft Office applications such as Word, PowerPoint, and Publisher.

A newer 32-bit version with additional commands is called Enhanced Metafile (EMF). EMF is also used as a graphics language for printer drivers.

There are also compressed versions of Windows Metafiles known as Compressed Windows Metafile (WMZ) and Compressed Windows Enhanced Metafile (EMZ)[2].

Contents

[edit] Patents

As with other Microsoft file formats, no specification of the format was previously available, and alternative implementations had to reverse engineer existing WMF files, which was difficult and error prone.[3] In September 2006, Microsoft published the WMF file format specification[4] in the context of the Microsoft Open Specification Promise, promising to not assert patent rights to file format implementors.[5]

[edit] Windows Metafile vulnerability

In December 2005, a vulnerability was reported to Microsoft by Symantec. It was assessed and classified as critical. In certain cases, the graphics rendering engine allowed remote code execution. This vulnerability was resolved in a security update on January 5, 2006 on Microsoft TechNet (MS06-001) and generally released January 10, 2006. Details can be found in Microsoft Knowledge Base Article "Vulnerability in Graphics Rendering Engine Could Allow Remote Code Execution" (912919). It was also referred to as the WMF (Windows Meta File) vulnerability.

[edit] Alternative implementations

The WMF format was designed to be executed by the Windows GDI layer in order to restore the image, but as the WMF binary files contain the definition of the GDI graphic primitives that constitute this image, it is possible to design alternative libraries that render WMF binary files, or convert them into other graphic formats. For example, the Batik library is able to render WMF files and convert them to their Scalable Vector Graphics (SVG) equivalent. The Vector Graphics package of the FreeHEP Java library allows the saving of Java2D drawings as EMF files.

EMZ is an EMF file compressed with gzip. One program that directly unpacks EMZ and WMZ files into EMF and WMF files is SpeedCommander 12.

[edit] See also

[edit] References

[edit] External links

[edit] Tutorials and articles

[edit] Libraries