Metafile Format

Last updated -[Tue Nov 23 14:10:44 1999 by cxh]-
Metafile format is a Windows format used to store pictures. Rather than using bitmaps, metafiles use operation primitives like draw and line.

Two formats:

  • .emf Win32 enhanced metafiles
  • .wmf Windows 3.x metafiles
  • says

    Another example of a metafile is the Computer Graphics Metafile (CGM). The CGM file format is a standard (ANSI-approved) format that can be used on any operating system that supports it (unlike the WMF format which is designed only for Windows). The CGM file is commonly used in CAD and presentation graphics applications.

    In general, there are tools (such as HiJaak) that will convert the WMF, EMF, and CGM formats into other formats.


    Framemaker 5.1 under Solaris can only read .wmf files
  • /usr/sww/frame-5.1/bin/wmf2fmvect is a script that runs fmgfxfilter to convert to a Frame vector graphics filter.
  • The Frame scripts that convert can be found in /usr/sww/frame-5.1/bin/scripts Other formats include
    corel draw (cdr) to frame vector graphics filter
    cgm to frame vector graphics filter
    micrografx to frame vector graphics filter
    autocad (dxf) to frame vector graphics filter
    gem to frame vector graphics filter
    hpgl to frame vector graphics filter
    igs to frame vector graphics filter
    QuickDraw Pict to frame vector graphics filter
    Windows meta file to frame vector graphics filter
    WordPerfect graphics to frame vector graphics filter
  • Metafile resources

  • has a number of links (search for wmf to get to the relevant part)
    Unfortunately most of the urls mentioned are dead.
    Subject: WMF - Microsoft Windows Metafile
             Type: Metafile
        Extension: WMF
      Compression: None
      Color Depth:
       Maintainer: Microsoft Corporation
    WMF is the native vector file format for the Microsoft Windows operating
    environment. WMF files are actually a collection of GDI (Graphics Device
    Interface) function calls also native to the Windows environment. When a WMF
    file is "played back" (typically using the Windows PlayMetaFile() function)
    the graphics is rendered. WMF files are device-independant and have no limit
    to their size.
    Most books on Microsoft Windows programming contain sections on the internals
    of WMF files. The closest thing Microsoft has for a specification for the WMF
    format is in Volume 4 of the Microsoft Windows Software Development Kit
    Programmer's Reference. Chapter 3 details the internals of the Metafile
    The Microsoft Knowledge Base (available at and on the
    Microsoft Developer Network CD) also contains the complete specification of
    WMF. I also highly recommend the book:
      Inside Windows File Formats, Tom Swan, Sams Publishing 1993.
      ISBN 0-672-30338-8 $24.95 softcover, 337 pages.
    The placeable metafile format was created by Aldus Corp. to allow the 
    positioning of a Windows metafile on a printed page. These metafiles have
    a 22-byte header then must be stripped before they can be used by the
    Windows API. Have a look at the following Microsoft Knowledge Base article:
      This archive contains the METAFILE.HLP help file that describes
      the WMF file format.
      This archive contains sample Windows code to manipulate WMF files.
      This archive contains the METAFI.HLP help file that describes
      the WMF file format. 
    Also have a look at:
        Internet Resources for Windows Developers
  • C. Wayne Brown and Barry J. Shepherd, Graphics File Formats: Reference and Guide, Manning Publications Co., ISBN 1-884777-00-7, 1995.
    has an appendix that describes .wmf files:
  • Companion Software Metafile FAQ: FAQs:
  • The Microsoft Developer's Network (MSDN) CDs at are the best source for information about Metafiles
    An April 1996 MSDN said
    For information about the format of metafile records and descriptions of their contents, see the Microsoft Windows Programmer's Reference, Vol 4
  • I was able to install a more recent version of MSDN by installing Visual C++ 6.0 and then installing the MSDN. I found some information about the format, but nothing totally obvious.
  • Some of the metafile hex values are defined in wingdi.h, which I found at c:\Program Files\DevStudio\Vc\include\wingdi.h
  • The MSDN site has some references, though you have to join MSDN first (it is free):
  • Enhanced Metafiles in Win32: - This is a fairly long description of the format
  • Metafile Reference
  • Software

  • File Format Encyclopedia: - It is in SWAG format, which requires a reader.
  • Piet Jonas has some non-freeware applets at: "
  • Axiom Software Development has a JDK1.2 'JMF' applet that can be used to display wmf files:
    Basically, a Windows only non-java binary is used to convert images from WMF to JMF, which the applet can then display. Formerly, this software had a license fee, which has since been dropped.
  • contains a Windows tool that reads metafiles and converts them to raw data and Microsoft Structure Graphics format.
    wmf2eps: CTAN:/support/wmf2eps
  • Bart Kienhuis says:
    I found a very useful tool that might also be handy for you. The tool can convert PS or PDF into different vector graphical formats. It can convert Postscript into a Windows Meta File which you can than import into PowerPoint or other Window programs. And the generated WMF can still be added and/or changed where necessary.



    > pstoedit 3.1x
    > pstoedit translates PostScript and PDF graphics into other vector formats. Currently pstoedit can generate the following formats: 
    >        Tgif .obj format (for tgif version >= 3) 
    >        .fig format for xfig 
    >        pdf - Adobe's Portable Document Format 
    >        gnuplot format 
    >        Flattened PostScript (with or without Bezier curves) 
    >        DXF - CAD exchange format 
    >        LWO - LightWave 3D 
    >        RIB - RenderMan 
    >        RPL - Real3D 
    >        Java applet 
    >        Idraw format 
    >        Tcl/Tk 
    >        HPGL 
    >        AI (Adobe Illustrator) (base on - not a real pstoedit driver - see notes below and manual) 
    >        Windows Meta Files (WMF) (Windows 9x/NT only) 
    >        Enhanced Windows Meta Files (EMF) (Windows 9x/NT only) 
    >        OS/2 meta files (OS/2 only (currently not up-to-date)) 
    >        PIC format for troff/groff 
    >        MetaPost format for usage with TeX/LaTeX 
    >        Killustrator 
    >        GNU Metafile (plotutils / libplot) 
    >        Sketch  ( ) 
    > The following formats are available as additional plugins on a shareware basis. See for more details. 
    >        (Frame)Maker Intermediate Format (MIF) 
    >        CGM Format (both binary and textual) 
    >        Better Enhanced Windows Meta Files (EMF) (supports curves and compound pathes and does more accurate text formatting) (Windows 9x/NT only) 
    >        RTF (MS Word)