< prev index next >

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

Print this page


   1 <!doctype html>
   2 <html lang="en">
   3 <head>
   4   <meta charset="utf-8"/>
   5   <title>PNG 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
  29 questions.
  30 -->
  31 
  32 <body>
  33 <main role="main">

  34 <h1>PNG Metadata Format Specification</h1>
  35 
  36 <p>
  37 
  38 The PNG native format encodes the complete contents of a PNG file
  39 chunk by chunk, except for the IDAT chunks that contain the actual
  40 image data.  Chunks that are not defined in the PNG 1.2 specification
  41 are stored under the <code>UnknownChunks</code> element.  Note that it
  42 is the responsibility of application software to implement the rules
  43 for PNG readers, writers, and editors (<i>e.g.</i>, the rules
  44 concerning unsafe-to-copy chunks) described in the PNG specification.
  45 The Image I/O library is not, in and of itself, a PNG reader, writer,
  46 or editor in the sense of the specification.  Rather, it is a tool
  47 that may be used to build PNG readers, writers, and editors.
  48 
  49 <p>
  50 
  51 The image's actual width, height, bit depth, and color type will
  52 override any values passed to the writer via metadata, with one
  53 exception.  If the image has an <code>IndexColorModel</code>, the


 544           &lt;!-- Data type: String --&gt;
 545         &lt;!ATTLIST "zTXtEntry" "compressionMethod" ("deflate")
 546            #REQUIRED&gt;
 547           &lt;!-- The compressed text --&gt;
 548 
 549     &lt;!ELEMENT "UnknownChunks" (UnknownChunk)*&gt;
 550       &lt;!-- A set of unknown chunks --&gt;
 551       &lt;!-- Min children: 1 --&gt;
 552       &lt;!-- Max children: 2147483647 --&gt;
 553 
 554       &lt;!ELEMENT "UnknownChunk" EMPTY&gt;
 555         &lt;!-- Unknown chunk data stored as a byte array --&gt;
 556         &lt;!-- User object: array of byte --&gt;
 557         &lt;!-- Min length: 0 --&gt;
 558         &lt;!-- Max length: 2147483647 --&gt;
 559         &lt;!ATTLIST "UnknownChunk" "type" #CDATA #REQUIRED&gt;
 560           &lt;!-- The 4-character type of the unknown chunk --&gt;
 561           &lt;!-- Data type: String --&gt;
 562 ]&gt;
 563 </pre>

 564 </main>
 565 </body>
 566 </html>
   1 <!doctype html>
   2 <html lang="en">
   3 <head>
   4   <meta charset="utf-8"/>
   5   <title>PNG 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
  29 questions.
  30 -->
  31 
  32 <body>
  33 <main role="main">
  34 <div class="contentContainer">
  35 <h1>PNG Metadata Format Specification</h1>
  36 
  37 <p>
  38 
  39 The PNG native format encodes the complete contents of a PNG file
  40 chunk by chunk, except for the IDAT chunks that contain the actual
  41 image data.  Chunks that are not defined in the PNG 1.2 specification
  42 are stored under the <code>UnknownChunks</code> element.  Note that it
  43 is the responsibility of application software to implement the rules
  44 for PNG readers, writers, and editors (<i>e.g.</i>, the rules
  45 concerning unsafe-to-copy chunks) described in the PNG specification.
  46 The Image I/O library is not, in and of itself, a PNG reader, writer,
  47 or editor in the sense of the specification.  Rather, it is a tool
  48 that may be used to build PNG readers, writers, and editors.
  49 
  50 <p>
  51 
  52 The image's actual width, height, bit depth, and color type will
  53 override any values passed to the writer via metadata, with one
  54 exception.  If the image has an <code>IndexColorModel</code>, the


 545           &lt;!-- Data type: String --&gt;
 546         &lt;!ATTLIST "zTXtEntry" "compressionMethod" ("deflate")
 547            #REQUIRED&gt;
 548           &lt;!-- The compressed text --&gt;
 549 
 550     &lt;!ELEMENT "UnknownChunks" (UnknownChunk)*&gt;
 551       &lt;!-- A set of unknown chunks --&gt;
 552       &lt;!-- Min children: 1 --&gt;
 553       &lt;!-- Max children: 2147483647 --&gt;
 554 
 555       &lt;!ELEMENT "UnknownChunk" EMPTY&gt;
 556         &lt;!-- Unknown chunk data stored as a byte array --&gt;
 557         &lt;!-- User object: array of byte --&gt;
 558         &lt;!-- Min length: 0 --&gt;
 559         &lt;!-- Max length: 2147483647 --&gt;
 560         &lt;!ATTLIST "UnknownChunk" "type" #CDATA #REQUIRED&gt;
 561           &lt;!-- The 4-character type of the unknown chunk --&gt;
 562           &lt;!-- Data type: String --&gt;
 563 ]&gt;
 564 </pre>
 565 </div>
 566 </main>
 567 </body>
 568 </html>
< prev index next >