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, 2017, 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 
  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
  54 color table entries will be checked to determine if they form a
  55 uniform grayscale ramp. If so, the image will normally be encoded
  56 using as grayscale instead of palette color.  However, if the color
  57 type set in the metadata is "Palette", palette color will be used.
  58 
  59 <p>
  60 
  61 If no metadata is supplied when encoding an image, the header is
  62 initialized from the image being encoded, and no optional chunks are
  63 included.
  64 
  65 <p>
  66 
  67 The semantics of the standard chunks are described in the <A
  68 HREF="http://www.libpng.org/pub/png/spec/">PNG specification</A>.
  69 Note that there are some restrictions on which chunks may appear
  70 for each color type. In particular,
  71 
  72 <ul>
  73   <li>A <code>PLTE</code> chunk may not appear in a <code>Gray</code>
  74 or <code>GrayAlpha</code> image
  75 
  76   <li><code>hIST</code> and <code>tRNS</code> chunks require a prior
  77 <code>PLTE</code> chunk
  78 
  79   <li>A <code>tRNS</code> chunk may not appear in
  80 <code>GrayAlpha</code> and <code>RGBA</code> images
  81 </ul>
  82 
  83 The child nodes of the <code>bKGD</code>, <code>sBIT</code>, and
  84 <code>tRNS</code> chunks must match the image's color type.
  85 
  86 <p>
  87 
  88 Certain chunks may meaningfully appear multiple times in a PNG file,
  89 in particular the text-related chunks.  In order to simplify the
  90 metadata format, multiple instances of these chunks are consolidated
  91 under a single parent node (<i>e.g.</i>, the <code>tEXt</code> node),
  92 which may have zero or more children (<i>e.g.</i>,
  93 <code>tEXtEntry</code> nodes).  If no children are present, no chunk
  94 will be written.  Similarly, unknown chunks are stored as children of
  95 a single <code>UnknownChunks</code> node.
  96 
  97 <p>
  98 
  99 It is not possible to control the ordering of the chunks as they are
 100 written, or to determine the order of the chunks in a file being read.
 101 
 102 <pre>
 103 &lt;!DOCTYPE "javax_imageio_png_1.0" [
 104 
 105   &lt;!ELEMENT "javax_imageio_png_1.0" (IHDR?, PLTE?, bKGD?, cHRM?,
 106     gAMA?, hIST?, iCCP?, iTXt?, pHYS?, sBIT?, sPLT?, sRGB?, tEXt?,
 107     tIME?, tRNS?, zTXt?, UnknownChunks?)&gt;
 108 
 109     &lt;!ELEMENT "IHDR" EMPTY&gt;
 110       &lt;!-- The IHDR chunk, containing the header --&gt;
 111       &lt;!ATTLIST "IHDR" "width" #CDATA #REQUIRED&gt;
 112         &lt;!-- The width of the image in pixels --&gt;
 113         &lt;!-- Data type: Integer --&gt;
 114         &lt;!-- Min value: 1 (inclusive) --&gt;
 115         &lt;!-- Max value: 2147483647 (inclusive) --&gt;
 116       &lt;!ATTLIST "IHDR" "height" #CDATA #REQUIRED&gt;
 117         &lt;!-- The height of the image in pixels --&gt;
 118         &lt;!-- Data type: Integer --&gt;
 119         &lt;!-- Min value: 1 (inclusive) --&gt;
 120         &lt;!-- Max value: 2147483647 (inclusive) --&gt;
 121       &lt;!ATTLIST "IHDR" "bitDepth" ("1" | "2" | "4" | "8" | "16")
 122          #REQUIRED&gt;
 123         &lt;!-- The bit depth of the image samples --&gt;
 124       &lt;!ATTLIST "IHDR" "colorType" ("Grayscale" | "RGB" | "Palette" |
 125         "GrayAlpha" | "RGBAlpha") #REQUIRED&gt;
 126         &lt;!-- The color type of the image --&gt;
 127       &lt;!ATTLIST "IHDR" "compressionMethod" ("deflate") #REQUIRED&gt;
 128         &lt;!-- The compression used for image data, always "deflate" --&gt;
 129       &lt;!ATTLIST "IHDR" "filterMethod" ("adaptive") #REQUIRED&gt;
 130         &lt;!-- The filtering method used for compression, always "adaptive" --&gt;
 131       &lt;!ATTLIST "IHDR" "interlaceMethod" ("none" | "adam7") #REQUIRED&gt;
 132         &lt;!-- The interlacing method, "none" or "adam7" --&gt;
 133 
 134     &lt;!ELEMENT "PLTE" (PLTEEntry)*&gt;
 135       &lt;!-- The PLTE chunk, containing the palette --&gt;
 136       &lt;!-- Min children: 1 --&gt;
 137       &lt;!-- Max children: 256 --&gt;
 138 
 139       &lt;!ELEMENT "PLTEEntry" EMPTY&gt;
 140         &lt;!-- A palette entry --&gt;
 141         &lt;!ATTLIST "PLTEEntry" "index" #CDATA #REQUIRED&gt;
 142           &lt;!-- The index of a palette entry --&gt;
 143           &lt;!-- Data type: Integer --&gt;
 144           &lt;!-- Min value: 0 (inclusive) --&gt;
 145           &lt;!-- Max value: 255 (inclusive) --&gt;
 146         &lt;!ATTLIST "PLTEEntry" "red" #CDATA #REQUIRED&gt;
 147           &lt;!-- The red value of a palette entry --&gt;
 148           &lt;!-- Data type: Integer --&gt;
 149           &lt;!-- Min value: 0 (inclusive) --&gt;
 150           &lt;!-- Max value: 255 (inclusive) --&gt;
 151         &lt;!ATTLIST "PLTEEntry" "green" #CDATA #REQUIRED&gt;
 152           &lt;!-- The green value of a palette entry --&gt;
 153           &lt;!-- Data type: Integer --&gt;
 154           &lt;!-- Min value: 0 (inclusive) --&gt;
 155           &lt;!-- Max value: 255 (inclusive) --&gt;
 156         &lt;!ATTLIST "PLTEEntry" "blue" #CDATA #REQUIRED&gt;
 157           &lt;!-- The blue value of a palette entry --&gt;
 158           &lt;!-- Data type: Integer --&gt;
 159           &lt;!-- Min value: 0 (inclusive) --&gt;
 160           &lt;!-- Max value: 255 (inclusive) --&gt;
 161 
 162     &lt;!ELEMENT "bKGD" (bKGD_Grayscale | bKGD_RGB | bKGD_Palette)&gt;
 163       &lt;!-- The bKGD chunk, containing the background color --&gt;
 164 
 165       &lt;!ELEMENT "bKGD_Grayscale" EMPTY&gt;
 166         &lt;!-- A grayscale background color, for Gray and GrayAlpha images --&gt;
 167         &lt;!ATTLIST "bKGD_Grayscale" "gray" #CDATA #REQUIRED&gt;
 168           &lt;!-- A gray value to be used as a background --&gt;
 169           &lt;!-- Data type: Integer --&gt;
 170           &lt;!-- Min value: 0 (inclusive) --&gt;
 171           &lt;!-- Max value: 65535 (inclusive) --&gt;
 172 
 173       &lt;!ELEMENT "bKGD_RGB" EMPTY&gt;
 174         &lt;!-- An RGB background color, for RGB and RGBAlpha images --&gt;
 175         &lt;!ATTLIST "bKGD_RGB" "red" #CDATA #REQUIRED&gt;
 176           &lt;!-- A red value to be used as a background --&gt;
 177           &lt;!-- Data type: Integer --&gt;
 178           &lt;!-- Min value: 0 (inclusive) --&gt;
 179           &lt;!-- Max value: 65535 (inclusive) --&gt;
 180         &lt;!ATTLIST "bKGD_RGB" "green" #CDATA #REQUIRED&gt;
 181           &lt;!-- A green value to be used as a background --&gt;
 182           &lt;!-- Data type: Integer --&gt;
 183           &lt;!-- Min value: 0 (inclusive) --&gt;
 184           &lt;!-- Max value: 65535 (inclusive) --&gt;
 185         &lt;!ATTLIST "bKGD_RGB" "blue" #CDATA #REQUIRED&gt;
 186           &lt;!-- A blue value to be used as a background --&gt;
 187           &lt;!-- Data type: Integer --&gt;
 188           &lt;!-- Min value: 0 (inclusive) --&gt;
 189           &lt;!-- Max value: 65535 (inclusive) --&gt;
 190 
 191       &lt;!ELEMENT "bKGD_Palette" EMPTY&gt;
 192         &lt;!-- A background palette index --&gt;
 193         &lt;!ATTLIST "bKGD_Palette" "index" #CDATA #REQUIRED&gt;
 194           &lt;!-- A palette index to be used as a background --&gt;
 195           &lt;!-- Data type: Integer --&gt;
 196           &lt;!-- Min value: 0 (inclusive) --&gt;
 197           &lt;!-- Max value: 255 (inclusive) --&gt;
 198 
 199     &lt;!ELEMENT "cHRM" EMPTY&gt;
 200       &lt;!-- The cHRM chunk, containing color calibration --&gt;
 201       &lt;!ATTLIST "cHRM" "whitePointX" #CDATA #REQUIRED&gt;
 202         &lt;!-- The CIE x coordinate of the white point, multiplied by 1e5 --&gt;
 203         &lt;!-- Data type: Integer --&gt;
 204         &lt;!-- Min value: 0 (inclusive) --&gt;
 205         &lt;!-- Max value: 65535 (inclusive) --&gt;
 206       &lt;!ATTLIST "cHRM" "whitePointY" #CDATA #REQUIRED&gt;
 207         &lt;!-- The CIE y coordinate of the white point, multiplied by 1e5 --&gt;
 208         &lt;!-- Data type: Integer --&gt;
 209         &lt;!-- Min value: 0 (inclusive) --&gt;
 210         &lt;!-- Max value: 65535 (inclusive) --&gt;
 211       &lt;!ATTLIST "cHRM" "redX" #CDATA #REQUIRED&gt;
 212         &lt;!-- The CIE x coordinate of the red primary, multiplied by 1e5 --&gt;
 213         &lt;!-- Data type: Integer --&gt;
 214         &lt;!-- Min value: 0 (inclusive) --&gt;
 215         &lt;!-- Max value: 65535 (inclusive) --&gt;
 216       &lt;!ATTLIST "cHRM" "redY" #CDATA #REQUIRED&gt;
 217         &lt;!-- The CIE y coordinate of the red primary, multiplied by 1e5 --&gt;
 218         &lt;!-- Data type: Integer --&gt;
 219         &lt;!-- Min value: 0 (inclusive) --&gt;
 220         &lt;!-- Max value: 65535 (inclusive) --&gt;
 221       &lt;!ATTLIST "cHRM" "greenX" #CDATA #REQUIRED&gt;
 222         &lt;!-- The CIE x coordinate of the green primary, multiplied by 1e5 --&gt;
 223         &lt;!-- Data type: Integer --&gt;
 224         &lt;!-- Min value: 0 (inclusive) --&gt;
 225         &lt;!-- Max value: 65535 (inclusive) --&gt;
 226       &lt;!ATTLIST "cHRM" "greenY" #CDATA #REQUIRED&gt;
 227         &lt;!-- The CIE y coordinate of the green primary, multiplied by 1e5 --&gt;
 228         &lt;!-- Data type: Integer --&gt;
 229         &lt;!-- Min value: 0 (inclusive) --&gt;
 230         &lt;!-- Max value: 65535 (inclusive) --&gt;
 231       &lt;!ATTLIST "cHRM" "blueX" #CDATA #REQUIRED&gt;
 232         &lt;!-- The CIE x coordinate of the blue primary, multiplied by 1e5 --&gt;
 233         &lt;!-- Data type: Integer --&gt;
 234         &lt;!-- Min value: 0 (inclusive) --&gt;
 235         &lt;!-- Max value: 65535 (inclusive) --&gt;
 236       &lt;!ATTLIST "cHRM" "blueY" #CDATA #REQUIRED&gt;
 237         &lt;!-- The CIE y coordinate of the blue primary, multiplied by 1e5 --&gt;
 238         &lt;!-- Data type: Integer --&gt;
 239         &lt;!-- Min value: 0 (inclusive) --&gt;
 240         &lt;!-- Max value: 65535 (inclusive) --&gt;
 241 
 242     &lt;!ELEMENT "gAMA" EMPTY&gt;
 243       &lt;!-- The gAMA chunk, containing the image gamma --&gt;
 244       &lt;!ATTLIST "gAMA" "value" #CDATA #REQUIRED&gt;
 245         &lt;!-- The image gamma, multiplied by 1e5 --&gt;
 246         &lt;!-- Data type: Integer --&gt;
 247         &lt;!-- Min value: 0 (inclusive) --&gt;
 248         &lt;!-- Max value: 2147483647 (inclusive) --&gt;
 249 
 250     &lt;!ELEMENT "hIST" (hISTEntry)*&gt;
 251       &lt;!-- The hIST chunk, containing histogram information  --&gt;
 252       &lt;!-- Min children: 1 --&gt;
 253       &lt;!-- Max children: 256 --&gt;
 254 
 255       &lt;!ELEMENT "hISTEntry" EMPTY&gt;
 256         &lt;!-- A histogram entry --&gt;
 257         &lt;!ATTLIST "hISTEntry" "index" #CDATA #REQUIRED&gt;
 258           &lt;!-- The palette index of this histogram entry --&gt;
 259           &lt;!-- Data type: Integer --&gt;
 260           &lt;!-- Min value: 0 (inclusive) --&gt;
 261           &lt;!-- Max value: 255 (inclusive) --&gt;
 262         &lt;!ATTLIST "hISTEntry" "value" #CDATA #REQUIRED&gt;
 263           &lt;!-- The frequency of this histogram entry --&gt;
 264           &lt;!-- Data type: Integer --&gt;
 265           &lt;!-- Min value: 0 (inclusive) --&gt;
 266           &lt;!-- Max value: 65535 (inclusive) --&gt;
 267 
 268     &lt;!ELEMENT "iCCP" EMPTY&gt;
 269       &lt;!-- The iCCP chunk, containing an ICC color profile --&gt;
 270       &lt;!-- User object: array of byte --&gt;
 271       &lt;!-- Min length: 0 --&gt;
 272       &lt;!-- Max length: 2147483647 --&gt;
 273       &lt;!ATTLIST "iCCP" "profileName" #CDATA #REQUIRED&gt;
 274         &lt;!-- The name of this ICC profile --&gt;
 275         &lt;!-- Data type: String --&gt;
 276       &lt;!ATTLIST "iCCP" "compressionMethod" ("deflate") #REQUIRED&gt;
 277         &lt;!-- The compression method used to store this ICC profile --&gt;
 278 
 279     &lt;!ELEMENT "iTXt" (iTXtEntry)*&gt;
 280       &lt;!-- The iTXt chunk, containing internationalized text --&gt;
 281       &lt;!-- Min children: 1 --&gt;
 282       &lt;!-- Max children: 2147483647 --&gt;
 283 
 284       &lt;!ELEMENT "iTXtEntry" EMPTY&gt;
 285         &lt;!-- A localized text entry --&gt;
 286         &lt;!ATTLIST "iTXtEntry" "keyword" #CDATA #REQUIRED&gt;
 287           &lt;!-- The keyword --&gt;
 288           &lt;!-- Data type: String --&gt;
 289         &lt;!ATTLIST "iTXtEntry" "compressionFlag" ("TRUE" | "FALSE")
 290            #REQUIRED&gt;
 291         &lt;!ATTLIST "iTXtEntry" "compressionMethod" #CDATA #REQUIRED&gt;
 292           &lt;!-- The compression method used to store this iTXt entry --&gt;
 293           &lt;!-- Data type: String --&gt;
 294         &lt;!ATTLIST "iTXtEntry" "languageTag" #CDATA #REQUIRED&gt;
 295           &lt;!-- The ISO tag describing the language this iTXt entry --&gt;
 296           &lt;!-- Data type: String --&gt;
 297         &lt;!ATTLIST "iTXtEntry" "translatedKeyword" #CDATA #REQUIRED&gt;
 298           &lt;!-- The translated keyword for iTXt entry --&gt;
 299           &lt;!-- Data type: String --&gt;
 300         &lt;!ATTLIST "iTXtEntry" "text" #CDATA #REQUIRED&gt;
 301           &lt;!-- The localized text --&gt;
 302           &lt;!-- Data type: String --&gt;
 303 
 304     &lt;!ELEMENT "pHYS" EMPTY&gt;
 305       &lt;!-- The pHYS chunk, containing the pixel size and aspect ratio --&gt;
 306       &lt;!ATTLIST "pHYS" "pixelsPerUnitXAxis" #CDATA #REQUIRED&gt;
 307         &lt;!-- The number of horizontal pixels per unit, multiplied by 1e5 --&gt;
 308         &lt;!-- Data type: Integer --&gt;
 309         &lt;!-- Min value: 0 (inclusive) --&gt;
 310         &lt;!-- Max value: 2147483647 (inclusive) --&gt;
 311       &lt;!ATTLIST "pHYS" "pixelsPerUnitYAxis" #CDATA #REQUIRED&gt;
 312         &lt;!-- The number of vertical pixels per unit, multiplied by 1e5 --&gt;
 313         &lt;!-- Data type: Integer --&gt;
 314         &lt;!-- Min value: 0 (inclusive) --&gt;
 315         &lt;!-- Max value: 2147483647 (inclusive) --&gt;
 316       &lt;!ATTLIST "pHYS" "unitSpecifier" ("unknown" | "meter") #REQUIRED&gt;
 317         &lt;!-- The unit specifier for this chunk (i.e., meters) --&gt;
 318 
 319     &lt;!ELEMENT "sBIT" (sBIT_Grayscale | sBIT_GrayAlpha | sBIT_RGB |
 320       sBIT_RGBAlpha | sBIT_Palette)&gt;
 321       &lt;!-- The sBIT chunk, containing significant bit information --&gt;
 322 
 323       &lt;!ELEMENT "sBIT_Grayscale" EMPTY&gt;
 324         &lt;!-- Significant bit information for gray samples --&gt;
 325         &lt;!ATTLIST "sBIT_Grayscale" "gray" #CDATA #REQUIRED&gt;
 326           &lt;!-- The number of significant bits of the gray samples --&gt;
 327           &lt;!-- Data type: Integer --&gt;
 328           &lt;!-- Min value: 0 (inclusive) --&gt;
 329           &lt;!-- Max value: 255 (inclusive) --&gt;
 330 
 331       &lt;!ELEMENT "sBIT_GrayAlpha" EMPTY&gt;
 332         &lt;!-- Significant bit information for gray and alpha samples --&gt;
 333         &lt;!ATTLIST "sBIT_GrayAlpha" "gray" #CDATA #REQUIRED&gt;
 334           &lt;!-- The number of significant bits of the gray samples --&gt;
 335           &lt;!-- Data type: Integer --&gt;
 336           &lt;!-- Min value: 0 (inclusive) --&gt;
 337           &lt;!-- Max value: 255 (inclusive) --&gt;
 338         &lt;!ATTLIST "sBIT_GrayAlpha" "alpha" #CDATA #REQUIRED&gt;
 339           &lt;!-- The number of significant bits of the alpha samples --&gt;
 340           &lt;!-- Data type: Integer --&gt;
 341           &lt;!-- Min value: 0 (inclusive) --&gt;
 342           &lt;!-- Max value: 255 (inclusive) --&gt;
 343 
 344       &lt;!ELEMENT "sBIT_RGB" EMPTY&gt;
 345         &lt;!-- Significant bit information for RGB samples --&gt;
 346         &lt;!ATTLIST "sBIT_RGB" "red" #CDATA #REQUIRED&gt;
 347           &lt;!-- The number of significant bits of the red samples --&gt;
 348           &lt;!-- Data type: Integer --&gt;
 349           &lt;!-- Min value: 0 (inclusive) --&gt;
 350           &lt;!-- Max value: 255 (inclusive) --&gt;
 351         &lt;!ATTLIST "sBIT_RGB" "green" #CDATA #REQUIRED&gt;
 352           &lt;!-- The number of significant bits of the green samples --&gt;
 353           &lt;!-- Data type: Integer --&gt;
 354           &lt;!-- Min value: 0 (inclusive) --&gt;
 355           &lt;!-- Max value: 255 (inclusive) --&gt;
 356         &lt;!ATTLIST "sBIT_RGB" "blue" #CDATA #REQUIRED&gt;
 357           &lt;!-- The number of significant bits of the blue samples --&gt;
 358           &lt;!-- Data type: Integer --&gt;
 359           &lt;!-- Min value: 0 (inclusive) --&gt;
 360           &lt;!-- Max value: 255 (inclusive) --&gt;
 361 
 362       &lt;!ELEMENT "sBIT_RGBAlpha" EMPTY&gt;
 363         &lt;!-- Significant bit information for RGBA samples --&gt;
 364         &lt;!ATTLIST "sBIT_RGBAlpha" "red" #CDATA #REQUIRED&gt;
 365           &lt;!-- The number of significant bits of the red samples --&gt;
 366           &lt;!-- Data type: Integer --&gt;
 367           &lt;!-- Min value: 0 (inclusive) --&gt;
 368           &lt;!-- Max value: 255 (inclusive) --&gt;
 369         &lt;!ATTLIST "sBIT_RGBAlpha" "green" #CDATA #REQUIRED&gt;
 370           &lt;!-- The number of significant bits of the green samples --&gt;
 371           &lt;!-- Data type: Integer --&gt;
 372           &lt;!-- Min value: 0 (inclusive) --&gt;
 373           &lt;!-- Max value: 255 (inclusive) --&gt;
 374         &lt;!ATTLIST "sBIT_RGBAlpha" "blue" #CDATA #REQUIRED&gt;
 375           &lt;!-- The number of significant bits of the blue samples --&gt;
 376           &lt;!-- Data type: Integer --&gt;
 377           &lt;!-- Min value: 0 (inclusive) --&gt;
 378           &lt;!-- Max value: 255 (inclusive) --&gt;
 379         &lt;!ATTLIST "sBIT_RGBAlpha" "alpha" #CDATA #REQUIRED&gt;
 380           &lt;!-- The number of significant bits of the alpha samples --&gt;
 381           &lt;!-- Data type: Integer --&gt;
 382           &lt;!-- Min value: 0 (inclusive) --&gt;
 383           &lt;!-- Max value: 255 (inclusive) --&gt;
 384 
 385       &lt;!ELEMENT "sBIT_Palette" EMPTY&gt;
 386         &lt;!-- Significant bit information for RGB palette entries --&gt;
 387         &lt;!ATTLIST "sBIT_Palette" "red" #CDATA #REQUIRED&gt;
 388           &lt;!-- The number of significant bits of the red palette entries --&gt;
 389           &lt;!-- Data type: Integer --&gt;
 390           &lt;!-- Min value: 0 (inclusive) --&gt;
 391           &lt;!-- Max value: 255 (inclusive) --&gt;
 392         &lt;!ATTLIST "sBIT_Palette" "green" #CDATA #REQUIRED&gt;
 393           &lt;!-- The number of significant bits of the green palette entries --&gt;
 394           &lt;!-- Data type: Integer --&gt;
 395           &lt;!-- Min value: 0 (inclusive) --&gt;
 396           &lt;!-- Max value: 255 (inclusive) --&gt;
 397         &lt;!ATTLIST "sBIT_Palette" "blue" #CDATA #REQUIRED&gt;
 398           &lt;!-- The number of significant bits of the blue palette entries --&gt;
 399           &lt;!-- Data type: Integer --&gt;
 400           &lt;!-- Min value: 0 (inclusive) --&gt;
 401           &lt;!-- Max value: 255 (inclusive) --&gt;
 402 
 403     &lt;!ELEMENT "sPLT" (sPLTEntry)*&gt;
 404       &lt;!-- The sPLT chunk, containing a suggested palette --&gt;
 405       &lt;!-- Min children: 1 --&gt;
 406       &lt;!-- Max children: 256 --&gt;
 407 
 408       &lt;!ELEMENT "sPLTEntry" EMPTY&gt;
 409         &lt;!-- A suggested palette entry --&gt;
 410         &lt;!ATTLIST "sPLTEntry" "index" #CDATA #REQUIRED&gt;
 411           &lt;!-- The index of a suggested palette entry --&gt;
 412           &lt;!-- Data type: Integer --&gt;
 413           &lt;!-- Min value: 0 (inclusive) --&gt;
 414           &lt;!-- Max value: 255 (inclusive) --&gt;
 415         &lt;!ATTLIST "sPLTEntry" "red" #CDATA #REQUIRED&gt;
 416           &lt;!-- The red value of a suggested palette entry --&gt;
 417           &lt;!-- Data type: Integer --&gt;
 418           &lt;!-- Min value: 0 (inclusive) --&gt;
 419           &lt;!-- Max value: 255 (inclusive) --&gt;
 420         &lt;!ATTLIST "sPLTEntry" "green" #CDATA #REQUIRED&gt;
 421           &lt;!-- The green value of a suggested palette entry --&gt;
 422           &lt;!-- Data type: Integer --&gt;
 423           &lt;!-- Min value: 0 (inclusive) --&gt;
 424           &lt;!-- Max value: 255 (inclusive) --&gt;
 425         &lt;!ATTLIST "sPLTEntry" "blue" #CDATA #REQUIRED&gt;
 426           &lt;!-- The blue value of a suggested palette entry --&gt;
 427           &lt;!-- Data type: Integer --&gt;
 428           &lt;!-- Min value: 0 (inclusive) --&gt;
 429           &lt;!-- Max value: 255 (inclusive) --&gt;
 430         &lt;!ATTLIST "sPLTEntry" "alpha" #CDATA #REQUIRED&gt;
 431           &lt;!-- The blue value of a suggested palette entry --&gt;
 432           &lt;!-- Data type: Integer --&gt;
 433           &lt;!-- Min value: 0 (inclusive) --&gt;
 434           &lt;!-- Max value: 255 (inclusive) --&gt;
 435 
 436     &lt;!ELEMENT "sRGB" EMPTY&gt;
 437       &lt;!-- The sRGB chunk, containing rendering intent information --&gt;
 438       &lt;!ATTLIST "sRGB" "renderingIntent" ("Perceptual" |
 439         "Relative colorimetric" | "Saturation" |
 440         "Absolute colorimetric") #REQUIRED&gt;
 441         &lt;!-- The rendering intent --&gt;
 442 
 443     &lt;!ELEMENT "tEXt" (tEXtEntry)*&gt;
 444       &lt;!-- The tEXt chunk, containing text --&gt;
 445       &lt;!-- Min children: 1 --&gt;
 446       &lt;!-- Max children: 2147483647 --&gt;
 447 
 448       &lt;!ELEMENT "tEXtEntry" EMPTY&gt;
 449         &lt;!-- A text entry --&gt;
 450         &lt;!ATTLIST "tEXtEntry" "keyword" #CDATA #REQUIRED&gt;
 451           &lt;!-- The keyword --&gt;
 452           &lt;!-- Data type: String --&gt;
 453         &lt;!ATTLIST "tEXtEntry" "value" #CDATA #REQUIRED&gt;
 454           &lt;!-- The text --&gt;
 455           &lt;!-- Data type: String --&gt;
 456 
 457     &lt;!ELEMENT "tIME" EMPTY&gt;
 458       &lt;!-- The tIME chunk, containing the image modification time --&gt;
 459       &lt;!ATTLIST "tIME" "year" #CDATA #REQUIRED&gt;
 460         &lt;!-- The year when the image was last modified --&gt;
 461         &lt;!-- Data type: Integer --&gt;
 462         &lt;!-- Min value: 0 (inclusive) --&gt;
 463         &lt;!-- Max value: 65535 (inclusive) --&gt;
 464       &lt;!ATTLIST "tIME" "month" #CDATA #REQUIRED&gt;
 465         &lt;!-- The month when the image was last modified, 1 = January --&gt;
 466         &lt;!-- Data type: Integer --&gt;
 467         &lt;!-- Min value: 1 (inclusive) --&gt;
 468         &lt;!-- Max value: 12 (inclusive) --&gt;
 469       &lt;!ATTLIST "tIME" "day" #CDATA #REQUIRED&gt;
 470         &lt;!-- The day of the month when the image was last modified --&gt;
 471         &lt;!-- Data type: Integer --&gt;
 472         &lt;!-- Min value: 1 (inclusive) --&gt;
 473         &lt;!-- Max value: 31 (inclusive) --&gt;
 474       &lt;!ATTLIST "tIME" "hour" #CDATA #REQUIRED&gt;
 475         &lt;!-- The hour when the image was last modified --&gt;
 476         &lt;!-- Data type: Integer --&gt;
 477         &lt;!-- Min value: 0 (inclusive) --&gt;
 478         &lt;!-- Max value: 23 (inclusive) --&gt;
 479       &lt;!ATTLIST "tIME" "minute" #CDATA #REQUIRED&gt;
 480         &lt;!-- The minute when the image was last modified --&gt;
 481         &lt;!-- Data type: Integer --&gt;
 482         &lt;!-- Min value: 0 (inclusive) --&gt;
 483         &lt;!-- Max value: 59 (inclusive) --&gt;
 484       &lt;!ATTLIST "tIME" "second" #CDATA #REQUIRED&gt;
 485         &lt;!-- The second when the image was last modified, 60 = leap second --&gt;
 486         &lt;!-- Data type: Integer --&gt;
 487         &lt;!-- Min value: 0 (inclusive) --&gt;
 488         &lt;!-- Max value: 60 (inclusive) --&gt;
 489 
 490     &lt;!ELEMENT "tRNS" (tRNS_Grayscale | tRNS_RGB | tRNS_Palette)&gt;
 491       &lt;!-- The tRNS chunk, containing transparency information --&gt;
 492 
 493       &lt;!ELEMENT "tRNS_Grayscale" EMPTY&gt;
 494         &lt;!-- A grayscale value that should be considered transparent --&gt;
 495         &lt;!ATTLIST "tRNS_Grayscale" "gray" #CDATA #REQUIRED&gt;
 496           &lt;!-- The gray value to be considered transparent --&gt;
 497           &lt;!-- Data type: Integer --&gt;
 498           &lt;!-- Min value: 0 (inclusive) --&gt;
 499           &lt;!-- Max value: 65535 (inclusive) --&gt;
 500 
 501       &lt;!ELEMENT "tRNS_RGB" EMPTY&gt;
 502         &lt;!-- An RGB value that should be considered transparent --&gt;
 503         &lt;!ATTLIST "tRNS_RGB" "red" #CDATA #REQUIRED&gt;
 504           &lt;!-- The red value to be considered transparent --&gt;
 505           &lt;!-- Data type: Integer --&gt;
 506           &lt;!-- Min value: 0 (inclusive) --&gt;
 507           &lt;!-- Max value: 65535 (inclusive) --&gt;
 508         &lt;!ATTLIST "tRNS_RGB" "green" #CDATA #REQUIRED&gt;
 509           &lt;!-- The green value to be considered transparent --&gt;
 510           &lt;!-- Data type: Integer --&gt;
 511           &lt;!-- Min value: 0 (inclusive) --&gt;
 512           &lt;!-- Max value: 65535 (inclusive) --&gt;
 513         &lt;!ATTLIST "tRNS_RGB" "blue" #CDATA #REQUIRED&gt;
 514           &lt;!-- The blure value to be considered transparent --&gt;
 515           &lt;!-- Data type: Integer --&gt;
 516           &lt;!-- Min value: 0 (inclusive) --&gt;
 517           &lt;!-- Max value: 65535 (inclusive) --&gt;
 518 
 519       &lt;!ELEMENT "tRNS_Palette" EMPTY&gt;
 520         &lt;!-- A palette index that should be considered transparent --&gt;
 521         &lt;!ATTLIST "tRNS_Palette" "index" #CDATA #REQUIRED&gt;
 522           &lt;!-- A palette index to be considered transparent --&gt;
 523           &lt;!-- Data type: Integer --&gt;
 524           &lt;!-- Min value: 0 (inclusive) --&gt;
 525           &lt;!-- Max value: 255 (inclusive) --&gt;
 526         &lt;!ATTLIST "tRNS_Palette" "alpha" #CDATA #REQUIRED&gt;
 527           &lt;!-- The transparency associated with the palette entry --&gt;
 528           &lt;!-- Data type: Integer --&gt;
 529           &lt;!-- Min value: 0 (inclusive) --&gt;
 530           &lt;!-- Max value: 255 (inclusive) --&gt;
 531 
 532     &lt;!ELEMENT "zTXt" (zTXtEntry)*&gt;
 533       &lt;!-- The zTXt chunk, containing compressed text --&gt;
 534       &lt;!-- Min children: 1 --&gt;
 535       &lt;!-- Max children: 2147483647 --&gt;
 536 
 537       &lt;!ELEMENT "zTXtEntry" EMPTY&gt;
 538         &lt;!-- A compressed text entry --&gt;
 539         &lt;!-- User object: array of byte --&gt;
 540         &lt;!-- Min length: 0 --&gt;
 541         &lt;!-- Max length: 2147483647 --&gt;
 542         &lt;!ATTLIST "zTXtEntry" "keyword" #CDATA #REQUIRED&gt;
 543           &lt;!-- The keyword --&gt;
 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 
 565 </body>
 566 </html>
--- EOF ---