< prev index next >

src/java.desktop/share/classes/javax/imageio/metadata/doc-files/gif_metadata.html

Print this page


   1 <!doctype html>
   2 <html lang="en">
   3 <head>
   4   <meta charset="utf-8"/>
   5   <title>GIF Metadata Format Specification</title>
   6 </head>
   7 <!--
   8 Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
   9 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  10 
  11 This code is free software; you can redistribute it and/or modify it
  12 under the terms of the GNU General Public License version 2 only, as
  13 published by the Free Software Foundation.  Oracle designates this
  14 particular file as subject to the "Classpath" exception as provided
  15 by Oracle in the LICENSE file that accompanied this code.
  16 
  17 This code is distributed in the hope that it will be useful, but WITHOUT
  18 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  19 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  20 version 2 for more details (a copy is included in the LICENSE file that
  21 accompanied this code).
  22 
  23 You should have received a copy of the GNU General Public License version
  24 2 along with this work; if not, write to the Free Software Foundation,
  25 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  26 
  27 Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  28 or visit www.oracle.com if you need additional information or have any


 331           &lt;!-- Data type: String --&gt;
 332 
 333     &lt;!ELEMENT "CommentExtensions" (CommentExtension)*&gt;
 334       &lt;!-- A set of comments --&gt;
 335       &lt;!-- Min children: 1 --&gt;
 336       &lt;!-- Max children: 2147483647 --&gt;
 337 
 338       &lt;!ELEMENT "CommentExtension" EMPTY&gt;
 339         &lt;!-- A comment --&gt;
 340         &lt;!ATTLIST "CommentExtension" "value" #CDATA #REQUIRED&gt;
 341           &lt;!-- The comment --&gt;
 342           &lt;!-- Data type: String --&gt;
 343 ]&gt;
 344 </pre>
 345 
 346 <p>
 347 <a id="mapping"></a>
 348 <table border=1>
 349 <caption><b>Mapping of Standard to GIF Native Stream Metadata</b></caption>
 350 <tr>
 351 <th>Standard Metadata Component</th>
 352 <th>GIF Native Stream Metadata Component</th>

 353 </tr>
 354 <tr>

 355 <td>/Chroma/Palette/PaletteEntry@index</td>
 356 <td>/GlobalColorTable/ColorTableEntry@index</td>
 357 </tr>
 358 <tr>

 359 <td>/Chroma/Palette/PaletteEntry@red</td>
 360 <td>/GlobalColorTable/ColorTableEntry@red</td>
 361 </tr>
 362 <tr>

 363 <td>/Chroma/Palette/PaletteEntry@green</td>
 364 <td>/GlobalColorTable/ColorTableEntry@green</td>
 365 </tr>
 366 <tr>

 367 <td>/Chroma/Palette/PaletteEntry@blue</td>
 368 <td>/GlobalColorTable/ColorTableEntry@blue</td>
 369 </tr>
 370 <tr>

 371 <td>/Chroma/BackgroundIndex@value</td>
 372 <td>/GlobalColorTable@backgroundColorIndex</td>
 373 </tr>
 374 <tr>

 375 <td>/Data/BitsPerSample@value</td>
 376 <td>/LogicalScreenDescriptor@colorResolution</td>
 377 </tr>
 378 <tr>

 379 <td>/Dimension/PixelAspectRatio@value</td>
 380 <td>/LogicalScreenDescriptor@pixelAspectRatio</td>
 381 </tr>
 382 <tr>

 383 <td>/Dimension/HorizontalScreenSize@value</td>
 384 <td>/LogicalScreenDescriptor@logicalScreenWidth</td>
 385 </tr>
 386 <tr>

 387 <td>/Dimension/VerticalScreenSize@value</td>
 388 <td>/LogicalScreenDescriptor@logicalScreenHeight</td>
 389 </tr>
 390 <tr>

 391 <td>/Document/FormatVersion@value</td>
 392 <td>/Version@value</td>
 393 </tr>
 394 </table>
 395 
 396 <table border=1>
 397 <caption><b>Mapping of Standard to GIF Native Image Metadata</b></caption>
 398 <tr>
 399 <th>Standard Metadata Component</th>
 400 <th>GIF Native Image Metadata Component</th>

 401 </tr>
 402 <tr>

 403 <td>/Chroma/Palette/PaletteEntry@index</td>
 404 <td>/LocalColorTable/ColorTableEntry@index</td>
 405 </tr>
 406 <tr>

 407 <td>/Chroma/Palette/PaletteEntry@red</td>
 408 <td>/LocalColorTable/ColorTableEntry@red</td>
 409 </tr>
 410 <tr>

 411 <td>/Chroma/Palette/PaletteEntry@green</td>
 412 <td>/LocalColorTable/ColorTableEntry@green</td>
 413 </tr>
 414 <tr>

 415 <td>/Chroma/Palette/PaletteEntry@blue</td>
 416 <td>/LocalColorTable/ColorTableEntry@blue</td>
 417 </tr>
 418 <tr>

 419 <td>/Dimension/HorizontalPixelOffset@value</td>
 420 <td>/ImageDescriptor@imageLeftPosition</td>
 421 </tr>
 422 <tr>

 423 <td>/Dimension/VerticalPixelOffset@value</td>
 424 <td>/ImageDescriptor@imageTopPosition</td>
 425 </tr>
 426 <tr>

 427 <td>/Text/TextEntry@value</td>
 428 <td>/CommentExtensions/CommentExtension@value</td>
 429 </tr>
 430 <tr>

 431 <td>/Transparency/TransparentIndex@value</td>
 432 <td>/GraphicControlExtension@transparentColorIndex
 433 (/GraphicControlExtension@transparentColorFlag is also set to
 434 "TRUE")</td>
 435 </tr>
 436 </table>
 437 </main>
 438 </body>
 439 </html>
   1 <!doctype html>
   2 <html lang="en">
   3 <head>
   4   <meta charset="utf-8"/>
   5   <title>GIF Metadata Format Specification</title>
   6 </head>
   7 <!--
   8 Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
   9 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  10 
  11 This code is free software; you can redistribute it and/or modify it
  12 under the terms of the GNU General Public License version 2 only, as
  13 published by the Free Software Foundation.  Oracle designates this
  14 particular file as subject to the "Classpath" exception as provided
  15 by Oracle in the LICENSE file that accompanied this code.
  16 
  17 This code is distributed in the hope that it will be useful, but WITHOUT
  18 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  19 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  20 version 2 for more details (a copy is included in the LICENSE file that
  21 accompanied this code).
  22 
  23 You should have received a copy of the GNU General Public License version
  24 2 along with this work; if not, write to the Free Software Foundation,
  25 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  26 
  27 Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  28 or visit www.oracle.com if you need additional information or have any


 331           &lt;!-- Data type: String --&gt;
 332 
 333     &lt;!ELEMENT "CommentExtensions" (CommentExtension)*&gt;
 334       &lt;!-- A set of comments --&gt;
 335       &lt;!-- Min children: 1 --&gt;
 336       &lt;!-- Max children: 2147483647 --&gt;
 337 
 338       &lt;!ELEMENT "CommentExtension" EMPTY&gt;
 339         &lt;!-- A comment --&gt;
 340         &lt;!ATTLIST "CommentExtension" "value" #CDATA #REQUIRED&gt;
 341           &lt;!-- The comment --&gt;
 342           &lt;!-- Data type: String --&gt;
 343 ]&gt;
 344 </pre>
 345 
 346 <p>
 347 <a id="mapping"></a>
 348 <table border=1>
 349 <caption><b>Mapping of Standard to GIF Native Stream Metadata</b></caption>
 350 <tr>
 351 <th scope="col">Index</th>
 352 <th scope="col">Standard Metadata Component</th>
 353 <th scope="col">GIF Native Stream Metadata Component</th>
 354 </tr>
 355 <tr>
 356 <th scope="row">1</th>
 357 <td>/Chroma/Palette/PaletteEntry@index</td>
 358 <td>/GlobalColorTable/ColorTableEntry@index</td>
 359 </tr>
 360 <tr>
 361 <th scope="row">2</th>
 362 <td>/Chroma/Palette/PaletteEntry@red</td>
 363 <td>/GlobalColorTable/ColorTableEntry@red</td>
 364 </tr>
 365 <tr>
 366 <th scope="row">3</th>
 367 <td>/Chroma/Palette/PaletteEntry@green</td>
 368 <td>/GlobalColorTable/ColorTableEntry@green</td>
 369 </tr>
 370 <tr>
 371 <th scope="row">4</th>
 372 <td>/Chroma/Palette/PaletteEntry@blue</td>
 373 <td>/GlobalColorTable/ColorTableEntry@blue</td>
 374 </tr>
 375 <tr>
 376 <th scope="row">5</th>
 377 <td>/Chroma/BackgroundIndex@value</td>
 378 <td>/GlobalColorTable@backgroundColorIndex</td>
 379 </tr>
 380 <tr>
 381 <th scope="row">6</th>
 382 <td>/Data/BitsPerSample@value</td>
 383 <td>/LogicalScreenDescriptor@colorResolution</td>
 384 </tr>
 385 <tr>
 386 <th scope="row">7</th>
 387 <td>/Dimension/PixelAspectRatio@value</td>
 388 <td>/LogicalScreenDescriptor@pixelAspectRatio</td>
 389 </tr>
 390 <tr>
 391 <th scope="row">8</th>
 392 <td>/Dimension/HorizontalScreenSize@value</td>
 393 <td>/LogicalScreenDescriptor@logicalScreenWidth</td>
 394 </tr>
 395 <tr>
 396 <th scope="row">9</th>
 397 <td>/Dimension/VerticalScreenSize@value</td>
 398 <td>/LogicalScreenDescriptor@logicalScreenHeight</td>
 399 </tr>
 400 <tr>
 401 <th scope="row">10</th>
 402 <td>/Document/FormatVersion@value</td>
 403 <td>/Version@value</td>
 404 </tr>
 405 </table>
 406 
 407 <table border=1>
 408 <caption><b>Mapping of Standard to GIF Native Image Metadata</b></caption>
 409 <tr>
 410 <th scope="col">Index</th>
 411 <th scope="col">Standard Metadata Component</th>
 412 <th scope="col">GIF Native Image Metadata Component</th>
 413 </tr>
 414 <tr>
 415 <th scope="row">1</th>
 416 <td>/Chroma/Palette/PaletteEntry@index</td>
 417 <td>/LocalColorTable/ColorTableEntry@index</td>
 418 </tr>
 419 <tr>
 420 <th scope="row">2</th>
 421 <td>/Chroma/Palette/PaletteEntry@red</td>
 422 <td>/LocalColorTable/ColorTableEntry@red</td>
 423 </tr>
 424 <tr>
 425 <th scope="row">3</th>
 426 <td>/Chroma/Palette/PaletteEntry@green</td>
 427 <td>/LocalColorTable/ColorTableEntry@green</td>
 428 </tr>
 429 <tr>
 430 <th scope="row">4</th>
 431 <td>/Chroma/Palette/PaletteEntry@blue</td>
 432 <td>/LocalColorTable/ColorTableEntry@blue</td>
 433 </tr>
 434 <tr>
 435 <th scope="row">5</th>
 436 <td>/Dimension/HorizontalPixelOffset@value</td>
 437 <td>/ImageDescriptor@imageLeftPosition</td>
 438 </tr>
 439 <tr>
 440 <th scope="row">6</th>
 441 <td>/Dimension/VerticalPixelOffset@value</td>
 442 <td>/ImageDescriptor@imageTopPosition</td>
 443 </tr>
 444 <tr>
 445 <th scope="row">7</th>
 446 <td>/Text/TextEntry@value</td>
 447 <td>/CommentExtensions/CommentExtension@value</td>
 448 </tr>
 449 <tr>
 450 <th scope="row">8</th>
 451 <td>/Transparency/TransparentIndex@value</td>
 452 <td>/GraphicControlExtension@transparentColorIndex
 453 (/GraphicControlExtension@transparentColorFlag is also set to
 454 "TRUE")</td>
 455 </tr>
 456 </table>
 457 </main>
 458 </body>
 459 </html>
< prev index next >