1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> |
1 <!doctype html> |
2 <html> |
2 <html lang="en"> |
3 <head> |
3 <head> |
|
4 <meta charset="utf-8"/> |
|
5 <title>GIF Metadata Format Specification</title> |
|
6 </head> |
4 <!-- |
7 <!-- |
5 Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. |
8 Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. |
6 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
9 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
7 |
10 |
8 This code is free software; you can redistribute it and/or modify it |
11 This code is free software; you can redistribute it and/or modify it |
9 under the terms of the GNU General Public License version 2 only, as |
12 under the terms of the GNU General Public License version 2 only, as |
10 published by the Free Software Foundation. Oracle designates this |
13 published by the Free Software Foundation. Oracle designates this |
24 Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
27 Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
25 or visit www.oracle.com if you need additional information or have any |
28 or visit www.oracle.com if you need additional information or have any |
26 questions. |
29 questions. |
27 --> |
30 --> |
28 |
31 |
29 <title>GIF Metadata Format Specification</title> |
32 <body> |
30 </head> |
33 |
31 |
34 <h1>GIF Metadata Format Specification</h1> |
32 <body bgcolor="white"> |
35 <a id="gif_stream_metadata_format"></a> |
33 |
36 <h2>GIF Stream Metadata Format Specification</h2> |
34 <center><h1> |
|
35 GIF Metadata Format Specification |
|
36 </h1></center> |
|
37 <a name="gif_stream_metadata_format"></a> |
|
38 <center><h2> |
|
39 GIF Stream Metadata Format Specification |
|
40 </h2></center> |
|
41 |
37 |
42 <p> |
38 <p> |
43 |
39 |
44 The GIF stream metadata format encodes the information stored in the |
40 The GIF stream metadata format encodes the information stored in the |
45 per-file header, namely the file version, logical screen descriptor, |
41 per-file header, namely the file version, logical screen descriptor, |
57 images that do not have their own local color table. |
53 images that do not have their own local color table. |
58 |
54 |
59 <pre> |
55 <pre> |
60 <!DOCTYPE "javax_imageio_gif_stream_1.0" [ |
56 <!DOCTYPE "javax_imageio_gif_stream_1.0" [ |
61 |
57 |
62 <!ELEMENT "javax_imageio_gif_stream_1.0" (Version?, |
58 <!ELEMENT "javax_imageio_gif_stream_1.0" (Version?, |
63 LogicalScreenDescriptor?, GlobalColorTable?)> |
59 LogicalScreenDescriptor?, GlobalColorTable?)> |
64 |
60 |
65 <!ELEMENT "Version" EMPTY> |
61 <!ELEMENT "Version" EMPTY> |
66 <!-- The file version, either 87a or 89a --> |
62 <!-- The file version, either 87a or 89a --> |
67 <!ATTLIST "Version" "value" ("87a" | "89a") #REQUIRED> |
63 <!ATTLIST "Version" "value" ("87a" | "89a") #REQUIRED> |
96 |
92 |
97 <!ELEMENT "GlobalColorTable" (ColorTableEntry)*> |
93 <!ELEMENT "GlobalColorTable" (ColorTableEntry)*> |
98 <!-- The global color table --> |
94 <!-- The global color table --> |
99 <!-- Min children: 2 --> |
95 <!-- Min children: 2 --> |
100 <!-- Max children: 256 --> |
96 <!-- Max children: 256 --> |
101 <!ATTLIST "GlobalColorTable" "sizeOfGlobalColorTable" ("2" | |
97 <!ATTLIST "GlobalColorTable" "sizeOfGlobalColorTable" ("2" | |
102 "4" | "8" | "16" | "32" | "64" | "128" | "256") #REQUIRED> |
98 "4" | "8" | "16" | "32" | "64" | "128" | "256") #REQUIRED> |
103 <!-- The number of entries in the global color table --> |
99 <!-- The number of entries in the global color table --> |
104 <!ATTLIST "GlobalColorTable" "backgroundColorIndex" #CDATA |
100 <!ATTLIST "GlobalColorTable" "backgroundColorIndex" #CDATA |
105 #REQUIRED> |
101 #REQUIRED> |
106 <!-- The index of the color table entry to be used as a background --> |
102 <!-- The index of the color table entry to be used as a background --> |
133 <!-- Data type: Integer --> |
129 <!-- Data type: Integer --> |
134 <!-- Min value: 0 (inclusive) --> |
130 <!-- Min value: 0 (inclusive) --> |
135 <!-- Max value: 255 (inclusive) --> |
131 <!-- Max value: 255 (inclusive) --> |
136 ]> |
132 ]> |
137 </pre> |
133 </pre> |
138 <a name="gif_image_metadata_format"></a> |
134 <a id="gif_image_metadata_format"></a> |
139 <center><h2> |
135 <h2>GIF Image Metadata Format Specification</h2> |
140 GIF Image Metadata Format Specification |
|
141 </h2></center> |
|
142 <p> |
136 <p> |
143 |
137 |
144 The GIF image metadata format encodes the image descriptor, local |
138 The GIF image metadata format encodes the image descriptor, local |
145 color table, and extension information assciated with a single image |
139 color table, and extension information assciated with a single image |
146 within a GIF file, typically a frame of an animation. |
140 within a GIF file, typically a frame of an animation. |
178 advanced only on user input. |
172 advanced only on user input. |
179 |
173 |
180 <pre> |
174 <pre> |
181 <!DOCTYPE "javax_imageio_gif_image_1.0" [ |
175 <!DOCTYPE "javax_imageio_gif_image_1.0" [ |
182 |
176 |
183 <!ELEMENT "javax_imageio_gif_image_1.0" (ImageDescriptor?, |
177 <!ELEMENT "javax_imageio_gif_image_1.0" (ImageDescriptor?, |
184 LocalColorTable?, GraphicControlExtension?, PlainTextExtension?, |
178 LocalColorTable?, GraphicControlExtension?, PlainTextExtension?, |
185 ApplicationExtensions?, CommentExtensions?)> |
179 ApplicationExtensions?, CommentExtensions?)> |
186 |
180 |
187 <!ELEMENT "ImageDescriptor" EMPTY> |
181 <!ELEMENT "ImageDescriptor" EMPTY> |
188 <!-- The image descriptor --> |
182 <!-- The image descriptor --> |
189 <!ATTLIST "ImageDescriptor" "imageLeftPosition" #CDATA #REQUIRED> |
183 <!ATTLIST "ImageDescriptor" "imageLeftPosition" #CDATA #REQUIRED> |
212 |
206 |
213 <!ELEMENT "LocalColorTable" (ColorTableEntry)*> |
207 <!ELEMENT "LocalColorTable" (ColorTableEntry)*> |
214 <!-- The local color table --> |
208 <!-- The local color table --> |
215 <!-- Min children: 2 --> |
209 <!-- Min children: 2 --> |
216 <!-- Max children: 256 --> |
210 <!-- Max children: 256 --> |
217 <!ATTLIST "LocalColorTable" "sizeOfLocalColorTable" ("2" | |
211 <!ATTLIST "LocalColorTable" "sizeOfLocalColorTable" ("2" | |
218 "4" | "8" | "16" | "32" | "64" | "128" | "256") #REQUIRED> |
212 "4" | "8" | "16" | "32" | "64" | "128" | "256") #REQUIRED> |
219 <!-- The number of entries in the local color table --> |
213 <!-- The number of entries in the local color table --> |
220 <!ATTLIST "LocalColorTable" "sortFlag" ("TRUE" | "FALSE") |
214 <!ATTLIST "LocalColorTable" "sortFlag" ("TRUE" | "FALSE") |
221 #REQUIRED> |
215 #REQUIRED> |
222 <!-- True if the local color table is sorted by frequency --> |
216 <!-- True if the local color table is sorted by frequency --> |
244 <!-- Min value: 0 (inclusive) --> |
238 <!-- Min value: 0 (inclusive) --> |
245 <!-- Max value: 255 (inclusive) --> |
239 <!-- Max value: 255 (inclusive) --> |
246 |
240 |
247 <!ELEMENT "GraphicControlExtension" EMPTY> |
241 <!ELEMENT "GraphicControlExtension" EMPTY> |
248 <!-- A graphic control extension --> |
242 <!-- A graphic control extension --> |
249 <!ATTLIST "GraphicControlExtension" "disposalMethod" ("none" | |
243 <!ATTLIST "GraphicControlExtension" "disposalMethod" ("none" | |
250 "doNotDispose" | "restoreToBackgroundColor" | |
244 "doNotDispose" | "restoreToBackgroundColor" | |
251 "restoreToPrevious" | "undefinedDisposalMethod4" | |
245 "restoreToPrevious" | "undefinedDisposalMethod4" | |
252 "undefinedDisposalMethod5" | "undefinedDisposalMethod6" | |
246 "undefinedDisposalMethod5" | "undefinedDisposalMethod6" | |
253 "undefinedDisposalMethod7") #REQUIRED> |
247 "undefinedDisposalMethod7") #REQUIRED> |
254 <!-- The disposal method for this frame --> |
248 <!-- The disposal method for this frame --> |
255 <!ATTLIST "GraphicControlExtension" "userInputFlag" ("TRUE" | |
249 <!ATTLIST "GraphicControlExtension" "userInputFlag" ("TRUE" | |
256 "FALSE") #REQUIRED> |
250 "FALSE") #REQUIRED> |
257 <!-- True if the frame should be advanced based on user input --> |
251 <!-- True if the frame should be advanced based on user input --> |
258 <!ATTLIST "GraphicControlExtension" "transparentColorFlag" ( |
252 <!ATTLIST "GraphicControlExtension" "transparentColorFlag" ( |
259 "TRUE" | "FALSE") #REQUIRED> |
253 "TRUE" | "FALSE") #REQUIRED> |
260 <!-- True if a transparent color exists --> |
254 <!-- True if a transparent color exists --> |
397 <tr> |
390 <tr> |
398 <td>/Document/FormatVersion@value</td> |
391 <td>/Document/FormatVersion@value</td> |
399 <td>/Version@value</td> |
392 <td>/Version@value</td> |
400 </tr> |
393 </tr> |
401 </table> |
394 </table> |
402 </center> |
395 |
403 |
|
404 <center> |
|
405 <table border=1> |
396 <table border=1> |
406 <caption><b>Mapping of Standard to GIF Native Image Metadata</b></caption> |
397 <caption><b>Mapping of Standard to GIF Native Image Metadata</b></caption> |
407 <tr> |
398 <tr> |
408 <th>Standard Metadata Component</th> |
399 <th>Standard Metadata Component</th> |
409 <th>GIF Native Image Metadata Component</th> |
400 <th>GIF Native Image Metadata Component</th> |