OS2.org Site Index - Feedback - Impressum
Sprachauswahl / Choose your Language News Software Hardware Projekte Forum Tipps Links Verschiedenes
Editorial Diskussion HelpDesk Umfrage
[Forum]
in nach (Erweiterte Suche)
[Forum]
( Archiv ) ( Neues Thema )
02.08.2000
Zu Windows Meta File: 4 verschieden Typen (von: GA, 15:09:15) « ^ »
File Organization

A metafile is comprised of one or two information headers and an array of variable-length records that store the GDI function call
information.

There are four flavors of Windows metafiles: standard, placeable, clipboard, and enhanced. A standard metafile contains an 18-byte
WMF header followed by one or more records of GDI commands. A placeable metafile contains a 22-byte header followed by the
standard 18-byte WMF header and GDI command records. Clipboard metafiles contains a 8-byte (Win16) or 16-byte (Win32) header
that precedes the standard metafile header. Enhanced metafiles contain only EMF records, with the first record storing the header
information. EMF files are not compatible in design with the other types of WMF metafiles.

Windows Metafiles (Figure Microsoft Windows Metafile-1) contain a header, followed by one or more records of data. The header
contains a description of the record data stored in the metafile. Each record is a binary-encoded Microsoft Windows Graphics Device
Interface (GDI) function call. The GDI is used by Windows to perform all output to a window, printer, or other output device. When
the metafile data is rendered (or played back, in Microsoft terminology), the data from each record is used to perform the appropriate
GDI function call to render each object stored in the file. The last record in the file contains information indicating that the end of the
record data has been reached.



Placeable metafiles (Figure Microsoft Windows Metafile-2) are WMF files with an 18-byte header prepended. This preheader contain
information used to describe the position of the metafile drawing on the printed page (something that the original WMF file designers
did not think of).



Clipboard metafiles (Figure Microsoft Windows Metafile-3) are similar to placeable metafiles in that that also contain an extra header
prepended to a WMF file. The Clipboard preheader contains information used to describe the position of the metafile on the Windows
Clipboard and the mapping mode used to playback the data.



Enhanced metafiles (Figure Microsoft Windows Metafile-4) have the same basic format of WMF files: a header followed by one or
more records of drawing objects stored as GDI commands. Unlike WMF, the header is also stored in a record which appears as the
first record in each EMF file. The EMF header now contains additional information, including the position and mapping information
stored in the placeable and clipboard metafile preheaders. EMF also adds the features of a file description string and a programmable
color palette to the metafile format.



File Details

The standard Windows metafile header is 18 bytes in length and is structured as follows:

typedef struct _WindowsMetaHeader
{
WORD FileType; /* Type of metafile (0=memory, 1=disk) */
WORD HeaderSize; /* Size of header in WORDS (always 9) */
WORD Version; /* Version of Microsoft Windows used */
DWORD FileSize; /* Total size of the metafile in WORDs */
WORD NumOfObjects; /* Number of objects in the file */
DWORD MaxRecordSize; /* The size of largest record in WORDs */
WORD NumOfParams; /* Not Used (always 0) */
} WMFHEAD;

FileType contains a value which indicates the location of the metafile data. A value of 0 indicates that the metafile is stored in
memory, while a 1 indicates that it is stored on disk.

HeaderSize contains the size of the metafile header in 16-bit WORDs. This value is always 9.

Version stores the version number of Microsoft Windows that created the metafile. This value is always read in hexadecimal format.
For example, in a metafile created by Windows 3.0 and 3.1, this item would have the value 0x0300.

FileSize specifies the total size of the metafile in 16-bit WORDs.

NumOfObjects specifies the number of objects that are in the metafile.

MaxRecordSize specifies the size of the largest record in the metafile in WORDs.

[ Leser: 47 ]

Datum Thema
07.01.2017 *

*

Name: * eMail: Benachrichtigung

Mit * markierte Felder müssen ausgefüllt werden !

( Zeige alle Einträge ) ( Zur Startübersicht )
Thema von: Leser Datum Zeit
 WMF-Dateien
Traudel13927.07.200022:11
 Re: WMF-Dateien
Jan Arne Petersen13028.07.200000:30
 WMF Dateien nach BMP, TII u.a. konvertieren..
GA10128.07.200011:57
 Re: WMF Dateien
Klaus Staedtler8728.07.200017:19
 Re: WMF Dateien
Andreas Schnellbacher7429.07.200020:50
 Irfan View mit ODIN
Christian/26301.08.200022:53
 Re: WMF Dateien -> Lohnendes Programmier-Projekt!
Cornelis Bockemühl6502.08.200008:58
 WMF-Format
Andreas Schnellbacher5802.08.200014:06
 Souce Deck für Konvereter WMF --> GIF ...
GA5402.08.200014:44
 Online Konvereter WMF --> GIF ...
GA5102.08.200014:46
 Zum Windows Meta File
GA5102.08.200014:52
 Zu Windows Meta File: 4 verschieden Typen
GA5002.08.200015:03
 Zu Windows Meta File: 4 verschieden Typen
GA4702.08.200015:09
 MMOS/2 Erweiterungen leider ohne WMF
Klaus Staedtler4402.08.200021:33
 Re: Zum Windows Meta File
Cornelis Bockemühl4103.08.200010:41


php.net OpenIT © 1998-2017 by WebTeam OS2.org