SIST EN 28632-3:1997
(Main)Information technology - Computer graphics - Metafile for the storage and transfer of picture description information -
Information technology - Computer graphics - Metafile for the storage and transfer of picture description information -
Informationstechnik - Graphische Datenverarbeitung - Datei für die Speicherung und die Übertragung von Bildinformation
Technologies de l'information - Infographie - Métafichier de stockage et de transfert des informations de description d'
Information technology - Computer graphics - Metafile for the storage and transfer of picture description information - Part 3: Binary encoding (ISO/IEC 8632-3:1992)
General Information
Relations
Standards Content (Sample)
SLOVENSKI STANDARD
SIST EN 28632-3:1997
01-december-1997
Information technology - Computer graphics - Metafile for the storage and transfer
of picture description information - Part 3: Binary encoding (ISO/IEC 8632-3:1992)
Information technology - Computer graphics - Metafile for the storage and transfer of
picture description information -
Informationstechnik - Graphische Datenverarbeitung - Datei für die Speicherung und die
Übertragung von Bildinformation
Technologies de l'information - Infographie - Métafichier de stockage et de transfert des
informations de description d'
Ta slovenski standard je istoveten z: EN 28632-3:1994
ICS:
35.140 5DþXQDOQLãNDJUDILND Computer graphics
SIST EN 28632-3:1997 en
2003-01.Slovenski inštitut za standardizacijo. Razmnoževanje celote ali delov tega standarda ni dovoljeno.
---------------------- Page: 1 ----------------------
SIST EN 28632-3:1997
---------------------- Page: 2 ----------------------
SIST EN 28632-3:1997
---------------------- Page: 3 ----------------------
SIST EN 28632-3:1997
---------------------- Page: 4 ----------------------
SIST EN 28632-3:1997
INTERNATIONAL
STANDARD
8632-3
Second edition
1992-l O-01
Information technology - Computer graphics -
Metafile for the storage and transfer of picture
description information -
Part 3:
Binary encoding
Teclwoloqies de I’information - Infoqraphie -- Mhtafichier de stockaqe
c
et de trarisfert des informations de d&cripfion d’images ---
Par-tie 3: Codaqe binaire
.
Reference number
ISOll EC 8632-3: 1992(E)
---------------------- Page: 5 ----------------------
SIST EN 28632-3:1997
ISO/IEC 8632-3: 1992 (E)
CONTENTS
. . . 1
. . . . . . . . . .
. . .
1 Scope . . . . . .
. . 2
* . . . . . . .
. . . . . .
2 Normative references .
3
. . . . . . .
. . . . . . . . .
3 Notational conventions .
. 4
. . . . e . . . . .
. . . . .
4 Overall structure . . .
. . 4
. . . . . . . . . .
. . . .
4.1 General form of metafile
. . . 4
. . . . . . . . . . * .
.
4.2 General form of pictures
l . . . . . 4
. . . . . . . . .
.
4.3 General structure of the binary metafile
. . . . . . . . 5
. . . . . . . .
4.4 Structure of the command header . .
. . 8
. . . . . . . . . .
. . . .
5 Primitive data forms . . . . . . .
. . . . 8
. . . * . . . . . .
. .
5.1 Signed integer . . . . . . . .
. . . . . . . 8
. . . . . . . . .
5.1.1 Signed integer at &bit precision
. . . . . . . . 8
. . . . . . . .
5.1.2 Signed integer at 1 &bit precision
. . . . . . . . . . 9
. . l . . 0,
5.1.3 Signed integer at 24-bit precision
. . . . . . . . . . . 9
. . . a .
5.1.4 Signed integer at 32-bit precision
n . . . . . . . . 9
. . . . . . .
5.2 Unsigned integer . . . . . . .
. . . . . . . . 9
. . . . . . .
5.2.1 Unsigned integers at &bit precision
. . . . . . * . . 9
. . . . . .
5.2.2 Unsigned integers at 16-bit precision
. . . . . . . . . 9
. . . . . .
5.2.3 Unsigned integers at 24-bit precision
. . . . . . . . . . . . l 10
. .
5.2.4 Unsigned integers at 32-bit precision
10
. . . . . . . . . . . . .
. .
5.3 Character . . . . . . . . . .
. . . . . . * . . . . . 10
. . .
5.4 Fixed point real . . . . . . . .
. . . . . . . . . . . . . 10
. .
5.4.1 Fixed point real at 32-bit precision .
. . . . . . . . . . a . . . 10
. .
5.4.2 Fixed point real at 64-bit precision
11
. . . . . . . . . . . . . .
5.4.3 Value of fixed point reals . . . .
11
. . . . . . . . e . . . . . .
5.5 Floating point . . . . . . . . .
12
. . . . . . . . . . . . . .
5.5.1 Floating point real at 32-bit precision .
. . * . . . . . . . . . 12
. . .
5.5.2 Floating point real at 64-bit precision
. . . 13
. . . . . . . . . . l .
6 Representation of abstract parameter types . .
0 ISO/IEC 1992
All rights reserved. No part of this publication may be reproduced or utilized in any form or by any means,
electronic or mechanical, including photocopying and microfilm, without permission in writing from the
publisher.
ISWIEC Copyright Office l Case postale 56 l CH-1211 Gerkve 20 l Switzerland
Printed in Switzerland
ii
---------------------- Page: 6 ----------------------
SIST EN 28632-3:1997
ISO/IEC 8632-3: 1992 (E)
. . . . . . . . . . . . . . . 18
7 Representation of each element . . . .
. . . . . . . . . . . . * . . 18
71 . Method of presentation . . . . .
. . . . . . . . . . . . . . . . . . . 19
72 . Delimiter elements
. . 21
. . . . . . . . . . . .
73 . Metafile descriptor elements . . . .
. . 28
. . . . . . . . . . . .
74 . Picture descriptor elements . . . . .
. . 33
. . . . . * . . . . . .
75 . Control elements . . . . . . . .
. . . 36
. . . . . . . . . . . .
76 . Graphical primitive elements . . .
. . . . . . . . . . 43
. . . . .
77 . Attribute elements . . . . . .
. . . . . . . . . . . . 52
. . .
78 . Escape element . . . . . . .
. . . . . . . . . . . 53
. . . .
79 External elements . . . . . . .
. . . . . . . . . . . . 54
.
7'10 . Segment control and segment attribute elements
. . . 58
. . . . . . . . . .
8 Defaults . . . . . . . . . . . l . .
. . 59
. . . . . . . . . . .
9 Conformance . . . . . . . . . . . . .
* . . . . . . . . . . . 60
.
A Formal grammar . . . . . . . . . . . .
. . . . . . . . . . . . . 63
B Examples . . . . . . . . . . . . . .
. . . . . . . . . . . . . 63
B. 1 Example 1 : BEGIN METAFILE ‘Example 1’ .
. . . . . . . . . . . . . 63
B.2 Example 2 : BEGIN PICTURE ‘Test’ . . . .
. . . . . 64
Example 3 : POLYLINE from 0,2 to l,3 to 2,l to 0,2 . . . * . . .
B.3
. . 64
B.4 Example 4 : TEXT ‘Hydrogen’ at 0,l . . . . . . . . . . . . . . .
. . . . . 65
B.5 Example 5 : Partitioned POLYLINE with 50 points . . . . . . .
. . . . . . . 66
B.6 Example 6 : METAFILE DEFAULT REPLACEMENT linewidth 0.5
. . . . . . . . 66
B.7 Example 7 : Application Data # 655 with 1OK octets (chars) of data
. . . . . . . 67
C List of binary encoding metafile element codes . . . . . . . . .
. . .
111
---------------------- Page: 7 ----------------------
SIST EN 28632-3:1997
ISO/IEC 8632-3: 1992 (E)
Foreword
IS0 (the International Organization for Standardization) and IEC (the International Electrotechnical Conkssion)
National bodies that are members of IS0 or IEC
form the specialized system for worldwide standardization.
participate in the development of International Standards through technical committees established by the
IS0 and IEC technical conhttees
respective organization to deal with particular fields of technical activity.
collaborate in fields of mutual interest. Other international organizations, govemnlental and non-governmental, in
liaison with IS0 and IEC, also take part in the work.
In the field of information technology, IS0 and IEC have established a joint technical committee, ISO/IEC JTC 1.
Draft International Standards adopted by the joint technical committee are circulated to national bodies for voting.
Publication as an International Standard requires approval by at least 75 % of the national bodies casting a vote.
International Standard ISOIIEC 8632-3 was prepared by Joint Technical Committee ISO/IEC JTC 1, Injhnation
technology.
which has been technically revised.
This second edition cancels and replaces the first edition (IS0 8632-3:1987),
ISOIIEC 8632 consists of the following parts, under the general title Information techology - Compzrtel
graphics - MetaJiIe for the storage and transfer of picture description information :
Part I: Functional specijkation
Part 2: Character encoding
Part 3: Binary encoding
Part 4: Clear text encoding
Annex A fomis an integral part of this part of ISO/IEC 8632. Annexes B and C are for infom~ation only.
iv
---------------------- Page: 8 ----------------------
SIST EN 28632-3:1997
ISO/IEC 8632-3: 1992 (E)
Introduction
0.1 Purpose of the Binary Encoding
The Binary Encoding of the Computer Graphics Metafile (CGM) provides a representation of the Metafile
syntax that can be optimized for speed of generation and interpretation, while still providing a standard
means of interchange among computer systems. The encoding uses binary data formats that are much more
similar to the data representations used within computer systems than the data formats of the other encod-
ings.
Some of the data formats may exactly match those of some computer systems. In such cases processing is
reduced very much relative to the other standardized encodings. On most computer systems processing
requirements for the Binary Encoding will be substantially lower than for the other encodings.
In cases where a computer system’s architecture does not match the standard formats used in the Binary
Encoding, and where absolute minimization of processing requirements is critical, and where interchange
among dissimilar systems does not matter, it may be more appropriate to use a private encoding, conform-
ing to the rules specified in clause 7 of ISO/IEC 8632-l.
0.2 0 bjectives
This encoding has the following features.
metafile elements are coded in the Binary Encoding by one or
Partitioning of parameter lists:
a>
more partitions (see clause 4); the first (or only) partition of an element contains the opcodc (Ele-
ment Class plus Element Id).
Alignment of elements: every element begins on a word boundary. When the data of an element
b)
(whether partitioned or not) does not terminate on an even-octet boundary, then the following ele-
ment is aligned by padding after the data of the preceding element with zero bits to the next
even-octet boundary, A no-op element is available in this encoding. It is skipped and ignored by
interpreters. It may be used to align data on machine-dependent record boundaries for speed of
processing.
Uniformity of format: all elements have an associated parameter length value. The length is
C>
specified as an octet count. As a result, it is possible to scan the metafile, without interpreting it,
at high speed.
---------------------- Page: 9 ----------------------
SIST EN 28632-3:1997
ISO/IEC 8632-3: 1992 (E)
Objectives
Introduction
at default precisions and by virtue of alignment of elements, coor-
Alignment of coordinate data:
d)
dinate data always start on word boundaries. This minimizes processing by ensuring, on a wide
class of computing systems, that single coordinates do not have to be assembled from pieces of
multiple computer words.
Efficiency of encoding integer data: other data such as indexes, colour and characters are
e>
encoded as one or more octets. The precision of every parameter is determined by the appropriate
precision as given in the Metafile Descriptor.
Order of bit data: in each word, or unit within a word, the bit with the highest number is the most
significant bit. Likewise, when data words are accessed sequentially, the least significant word
follows the most significant.
Extensibility: the arrangement of Element Class and Element Id values has been designed to
g)
allow future growth, such as new graphical elements.
Format of real data: real numbers are encoded using either IEEE floating point representation or
l-0
a metafile fixed-point representation.
Run length encoding: if many adjacent cells have the same colour (or colour index) efficient
0
encoding is possible. For each run a cell count is specified followed by the colour (or colour
index).
.
Packed list encoding: if adjacent colour cells do not have the same colour (or colour index) the
J)
metafile provides bit-stream lists in which the values are packed as close1 .y as possible.
0.3 Relationship to other International Standards
The floating point representation of real data in this part of ISO/IEC 8632 is that in ANSI/IEEE 754-1986.
The representation of character data in this part of ISO/IEC 8632 follows the rules of ISO/IEC 646 and IS0
2022.
For certain elements, the CGM defines value ranges as being reserved for registration. The values and their
vi
---------------------- Page: 10 ----------------------
SIST EN 28632-3:1997
ISO/IEC 8632-3: 1992 (E)
Relationship to other International Standards Introduction
vi1
---------------------- Page: 11 ----------------------
SIST EN 28632-3:1997
This page intentionally left blank
---------------------- Page: 12 ----------------------
SIST EN 28632-3:1997
INTERNATIONAL STANDARD ISO/IEC 8632-3 : 1992 (E)
Information technology - Computer graphics - Metafile for
the storage and transfer of picture description information -
Part 3 :
Binary encoding
1 Scope
This part of ISO/IEC 8632 specifies a binary encoding of the Computer Graphics Metafile. For each of the
elements specified in ISO/IEC 8632-1, this part specifies an encoding in terms of data types. For each of
these data types, an explicit representation in terms of bits, octets and words is specified. For some data
types, the exact representation is a function of the precisions being used in the metafile, as recorded in the
METAFILE DESCRIPTOR.
This encoding of the Computer Graphics Metafile will, in many circumstances, minimize the effort required
to generate and interpret the metafile.
---------------------- Page: 13 ----------------------
SIST EN 28632-3:1997
ISO/IEC 863293:1992 (E)
2 Normative references
The following standards contain provisions which, through reference in this text, constitute provisions of
this part of ISO/IEC 8632. At the time of publication, the editions indicated were valid. All standards are
subject to revision, and parties to agreements based on this part of ISO/IEC 8632 are encouraged to investi-
gate the possibility of applying the most recent editions of the standards listed below. Members of IEC and
IS0 maintain registers of currently valid International Standards.
ISOllEC 646: 1991, Information technology - IS0 7-bit coded character set for information interchange.
IS0 7-bit and a-bit coded character sets - Code extension techniques.
IS0 2022: 1986, Information processing -
ANSI/IEEE 754, Standard for Binary Floating Point Arithmetic.
---------------------- Page: 14 ----------------------
SIST EN 28632-3:1997
ISO/IEC 8632-3: 1992 (E)
3 Notational conventions
“Command Header” is used throughout this part of ISO/IEC 8632 to refer to that portion of a Binary-
Encoded element that contains the opcode (element class plus element id) and parameter length information
(see clause 4).
Within this part, the terms “octet” and “word” have specific meanings. These meanings may not match
those of a particular computer system on which this encoding of the metafile is used.
An octet is an S-bit entity. All bits are significant. The bits are numbered from 7 (most significant) to 0
(least significant).
A word is a 16-bit entity. All bits are significant. The bits are numbered from 15 (most significant) to 0
(least significant).
---------------------- Page: 15 ----------------------
SIST EN 28632-3:1997
ISO/IEC 8632-3: 1992 (E)
4 Overall structure
4.1 General form of metafile
All elements in the metafile are encoded using a uniform scheme. The elements are represented as variable
length data structures, each consisting of opcode information (element class plus element id) designating
the particular element, the length of its parameter data and finally the parameter data (if any).
The structure of the metafile is as follows. (For the purposes of this diagram only, MF is used as an abbre-
viation for METAFILE.)
BEGIN MF MD
Questions, Comments and Discussion
Ask us and Technical Secretary will try to provide an answer. You can facilitate discussion about the standard in here.