Presentation Manager Metafile

Also Known As: MET


Type Metafile
Colors Unlimited
Compression RLE
Maximum Image Size NA
Multiple Images Per File Yes
Numerical Format Little-endian
Originator Microsoft Corp., IBM
Platform OS/2
Supporting Applications Various under OS/2 Presentation Manager
See Also Microsoft Windows Metafile, OS/2 Bitmap

Usage
Storage and transport of graphics information associated with the OS/2 Presentation Manager GUI. Seldom found ouside the OS/2 environment.

Comments
A complex format mainly consisting of aliased calls to Presentation Manager supporting libraries. Difficult to support outside of that environment.

Vendor specifications are available for this format.


Presentation Manager Metafile (MET) files are used to store vector- and bitmap-format image data in memory or in disk files, for later playback to an output device. Although the Presentation Manager Metafile format is specific to IBM's Presentation Manager for OS/2, many third-party applications support this format as a method for interchanging data between applications under OS/2. Because of the confusion in the market engendered by the IBM-Microsoft split, and the subsequent increase in the installed base of Microsoft Windows, Presentation Manager Metafile has found little support in the larger market, even though the OS/2 installed base is substantial.

Contents:
File Organization
File Details
For Further Information

File Organization

Presentation Manager Metafiles consist of a sequence of what IBM calls structured fields, which are followed by the actual data. Structured fields and the associated data are organized into one or more functional components, which are large blocks of data--documents, for instance, or complex graphics objects. These functional components are delimited by "begin-component" and "end-component" structured fields.

File Details

Structured fields start with the following header:

typedef struct _MetHeader
{
  CHAR Length[2];
  CHAR ID[3];
  BYTE Flags;
  CHAR SegSeqNum[3];
} MetHeader;

Length is the length of the field, in bytes.

ID is a field identifier.

Flags contains Boolean information related to the disposition of the field by the rendering application. Currently this is always 0.

SegSeqNum contains what IBM calls a segment sequence number. Again, this is currently always 0.

Following the header structure, which is common to all structured fields, is information that IBM calls positional information. This information extends the header; its exact nature depends on the actual structured field. Following these positional fields are what IBM calls triplets, which consist of a short header of the following form:

typedef struct _Triplet
{
  BYTE Length;
  BYTE ID;
} Triplet;

Length is the length in bytes of the triplet header and the following data.

ID contains a value identifying the triplet.

Following this header is the actual data associated with the triplet. The bulk of the data found in the metafile is located here.

Structured fields defined in the documentation are listed below.

Field Name

Field ID

Parameters

Triplets

Begin Document

D3A8A8

10 bytes

3

Begin Resource Group

D3A8C6

08 bytes

0

Begin Color Attribute

D3A877

08 bytes

0

Color Attribute Table

D3B077

03 bytes

(varies)

End Color Attribute Table

D3A977

08 bytes

0

Begin Image Object

D3A8FB

08 bytes

0

Begin Resource Group

D3A8C6

08 bytes

0

End Resource Group

D3A9C6

08 bytes

0

Begin Object Environment Group

D3A8C7

08 bytes

0

Map Color Attribute Table

D3AB77

02 bytes

2

Image Data Descriptor

D3A6FB

09 bytes

0

Image Picture Data

D3EEFB

(varies)

(varies)

End Image Object

D3A9FB

08 bytes

0

Begin Graphics Object

D3A8BB

08 bytes

0

Map Coded Font

D3AB8A

02 bytes

3

Map Data Resource

D3ABC3

02 bytes

2

End Object Environment Group

D3A9C7

08 bytes

0

End Graphics Object

D3A9BB

08 bytes

0

End Resource Group

D3A9C6

08 bytes

0

End Document

D3A9A8

08 bytes

0

Perhaps the most common structured field is the Graphics Data Descriptor, which contains the actual graphics data:

Graphics Data Descriptor

D3A6BB

Parameter information associated with the Graphics Data Descriptor provides an elaborate description of the following data, which takes the place of what might be encoded in another format as a long, complex header. Its length varies, but it may be several hundred bytes long. Please see the specification included on the CD-ROM for details and further information. (Note that the document appears to contain an incomplete list of the structured fields likely to be found in a Presentation Manager Metafile.)

For Further Information

For further information about the Presentation Manager Metafile format, see the specification included on the CD-ROM.

Presentation Manager Metafile is also documented in the following IBM publication:

IBM Corporation, OS/2 2.0 Technical Library Presentation Manager Programming Reference Volume III, Part Number 10G627.

Relevant information is contained in Appendixes D, G, and F of the IBM publication. This document is available for purchase through your local IBM dealer or salesperson.

Support responsibility for OS/2 is now solely in the hands of IBM. For information, contact:

IBM Corporation
Attn: Independent Vendor League
150 Kettletown Road
Southbury, CT 06488
Voice: 203-266-2000
WWW: http://www.ibm.com/

OS/2 and the Presentation Manager Metafile format originated at Microsoft, and some documentation is still available there. You may be able to get some information by contacting:

Microsoft Corporation
One Microsoft Way
Redmond, WA 98052-6399
Voice: 206-882-8080
Voice: 800-426-9400
FAX: 206-883-8101
WWW: http://www.microsoft.com/

Also see the following resources:

http://axion.physics.ubc.ca/os2/os2.html

OS/2 Resource listing

ftp://ftp-os2.cdrom.com/

OS/2 Archive at Walnut Creek CD-ROM

You might also be able to find some helpful information at the OS/2 shareware BBS:

Voice: 703-385-0201
BBS: 703-385-4325
WWW: http://www.os2bbs.com/
Telnet: bbs.os2bbs.com



Copyright © 1996, 1994 O'Reilly & Associates, Inc. All Rights Reserved.