📄 gif89m.txt
字号:
20
c. Syntax.
7 6 5 4 3 2 1 0 Field Name Type
+---------------+
0 | | Extension Introducer Byte
+---------------+
1 | | Plain Text Label Byte
+---------------+
+---------------+
0 | | Block Size Byte
+---------------+
1 | | Text Grid Left Position Unsigned
+- -+
2 | |
+---------------+
3 | | Text Grid Top Position Unsigned
+- -+
4 | |
+---------------+
5 | | Text Grid Width Unsigned
+- -+
6 | |
+---------------+
7 | | Text Grid Height Unsigned
+- -+
8 | |
+---------------+
9 | | Character Cell Width Byte
+---------------+
10 | | Character Cell Height Byte
+---------------+
11 | | Text Foreground Color Index Byte
+---------------+
12 | | Text Background Color Index Byte
+---------------+
+===============+
| |
N | | Plain Text Data Data Sub-blocks
| |
+===============+
+---------------+
0 | | Block Terminator Byte
+---------------+
i) Extension Introducer - Identifies the beginning of an extension
block. This field contains the fixed value 0x21.
ii) Plain Text Label - Identifies the current block as a Plain Text
Extension. This field contains the fixed value 0x01.
iii) Block Size - Number of bytes in the extension, after the Block
Size field and up to but not including the beginning of the data
portion. This field contains the fixed value 12.
21
iv) Text Grid Left Position - Column number, in pixels, of the left
edge of the text grid, with respect to the left edge of the Logical
Screen.
v) Text Grid Top Position - Row number, in pixels, of the top edge
of the text grid, with respect to the top edge of the Logical
Screen.
vi) Image Grid Width - Width of the text grid in pixels.
vii) Image Grid Height - Height of the text grid in pixels.
viii) Character Cell Width - Width, in pixels, of each cell in the
grid.
ix) Character Cell Height - Height, in pixels, of each cell in the
grid.
x) Text Foreground Color Index - Index into the Global Color Table
to be used to render the text foreground.
xi) Text Background Color Index - Index into the Global Color Table
to be used to render the text background.
xii) Plain Text Data - Sequence of sub-blocks, each of size at most
255 bytes and at least 1 byte, with the size in a byte preceding
the data. The end of the sequence is marked by the Block
Terminator.
xiii) Block Terminator - This zero-length data block marks the end
of the Plain Text Data Blocks.
d. Extensions and Scope. The scope of this block is the Plain Text Data
Block contained in it. This block may be modified by the Graphic Control
Extension.
e. Recommendations. The data in the Plain Text Extension is assumed to be
preformatted. The selection of font and size is left to the discretion of
the decoder. If characters less than 0x20 or greater than 0xf7 are
encountered, it is recommended that the decoder display a Space character
(0x20). The encoder should use grid and cell dimensions such that an
integral number of cells fit in the grid both horizontally as well as
vertically. For broadest compatibility, character cell dimensions should
be around 8x8 or 8x16 (width x height); consider an image for unusual
sized text.
26. Application Extension.
a. Description. The Application Extension contains application-specific
information; it conforms with the extension block syntax, as described
below, and its block label is 0xFF.
b. Required Version. 89a.
22
c. Syntax.
7 6 5 4 3 2 1 0 Field Name Type
+---------------+
0 | | Extension Introducer Byte
+---------------+
1 | | Extension Label Byte
+---------------+
+---------------+
0 | | Block Size Byte
+---------------+
1 | |
+- -+
2 | |
+- -+
3 | | Application Identifier 8 Bytes
+- -+
4 | |
+- -+
5 | |
+- -+
6 | |
+- -+
7 | |
+- -+
8 | |
+---------------+
9 | |
+- -+
10 | | Appl. Authentication Code 3 Bytes
+- -+
11 | |
+---------------+
+===============+
| |
| | Application Data Data Sub-blocks
| |
| |
+===============+
+---------------+
0 | | Block Terminator Byte
+---------------+
i) Extension Introducer - Defines this block as an extension. This
field contains the fixed value 0x21.
ii) Application Extension Label - Identifies the block as an
Application Extension. This field contains the fixed value 0xFF.
iii) Block Size - Number of bytes in this extension block,
following the Block Size field, up to but not including the
beginning of the Application Data. This field contains the fixed
value 11.
23
iv) Application Identifier - Sequence of eight printable ASCII
characters used to identify the application owning the Application
Extension.
v) Application Authentication Code - Sequence of three bytes used
to authenticate the Application Identifier. An Application program
may use an algorithm to compute a binary code that uniquely
identifies it as the application owning the Application Extension.
d. Extensions and Scope. This block does not have scope. This block
cannot be modified by any extension.
e. Recommendation. None.
27. Trailer.
a. Description. This block is a single-field block indicating the end of
the GIF Data Stream. It contains the fixed value 0x3B.
b. Required Version. 87a.
c. Syntax.
7 6 5 4 3 2 1 0 Field Name Type
+---------------+
0 | | GIF Trailer Byte
+---------------+
d. Extensions and Scope. This block does not have scope, it terminates
the GIF Data Stream. This block may not be modified by any extension.
e. Recommendations. None.
24
Appendix
A. Quick Reference Table.
Block Name Required Label Ext. Vers.
Application Extension Opt. (*) 0xFF (255) yes 89a
Comment Extension Opt. (*) 0xFE (254) yes 89a
Global Color Table Opt. (1) none no 87a
Graphic Control Extension Opt. (*) 0xF9 (249) yes 89a
Header Req. (1) none no N/A
Image Descriptor Opt. (*) 0x2C (044) no 87a (89a)
Local Color Table Opt. (*) none no 87a
Logical Screen Descriptor Req. (1) none no 87a (89a)
Plain Text Extension Opt. (*) 0x01 (001) yes 89a
Trailer Req. (1) 0x3B (059) no 87a
Unlabeled Blocks
Header Req. (1) none no N/A
Logical Screen Descriptor Req. (1) none no 87a (89a)
Global Color Table Opt. (1) none no 87a
Local Color Table Opt. (*) none no 87a
Graphic-Rendering Blocks
Plain Text Extension Opt. (*) 0x01 (001) yes 89a
Image Descriptor Opt. (*) 0x2C (044) no 87a (89a)
Control Blocks
Graphic Control Extension Opt. (*) 0xF9 (249) yes 89a
Special Purpose Blocks
Trailer Req. (1) 0x3B (059) no 87a
Comment Extension Opt. (*) 0xFE (254) yes 89a
Application Extension Opt. (*) 0xFF (255) yes 89a
legend: (1) if present, at most one occurrence
(*) zero or more occurrences
(+) one or more occurrences
Notes : The Header is not subject to Version Numbers.
(89a) The Logical Screen Descriptor and the Image Descriptor retained their
syntax from version 87a to version 89a, but some fields reserved under version
87a are used under version 89a.
25
Appendix
B. GIF Grammar.
A Grammar is a form of notation to represent the sequence in which certain
objects form larger objects. A grammar is also used to represent the number of
objects that can occur at a given position. The grammar g
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -