PNG 元数据格式规范

PNG 本机格式逐块编码 PNG 文件的完整内容,但包含实际图像数据的 IDAT 块除外。 PNG 1.2 规范中未定义的块存储在 UnknownChunks 元素下。请注意,应用程序软件有责任实施 PNG 阅读器、编写器和编辑器的规则(例如,关于不安全复制块的规则)在 PNG 规范中描述。图像 I/O 库本身并不是规范意义上的 PNG 阅读器、编写器或编辑器。相反,它是一种可用于构建 PNG 阅读器、编写器和编辑器的工具。

图像的实际宽度、高度、位深度和颜色类型将覆盖通过元数据传递给编写器的任何值,但有一个例外。如果图像有 IndexColorModel ,将检查颜色表条目以确定它们是否形成统一的灰度渐变。如果是这样,图像通常将使用灰度而不是调色板颜色进行编码。但是,如果元数据中设置的颜色类型是“调色板”,则将使用调色板颜色。

如果在对图像进行编码时未提供元数据,则会从正在编码的图像中初始化标头,并且不包含可选块。

PNG规格 中描述了标准块的语义。请注意,对于每种颜色类型可能出现的块有一些限制。尤其,

  • PLTE 块可能不会出现在 GrayGrayAlpha 图像中
  • hISTtRNS 块需要一个先验的 PLTE
  • tRNS 块可能不会出现在 GrayAlphaRGBA 图像中
bKGDsBITtRNS 块的子节点必须与图像的颜色类型匹配。

某些块可能有意义地在 PNG 文件中多次出现,尤其是与文本相关的块。为了简化元数据格式,这些块的多个实例被合并在一个父节点下(例如tEXt 节点),它可能有零个或多个子节点(例如, tEXtEntry 个节点)。如果没有孩子,则不会写入任何块。同样,未知块存储为单个 UnknownChunks 节点的子节点。

不可能在写入块时控制块的顺序,也无法确定正在读取的文件中块的顺序。

<!DOCTYPE "javax_imageio_png_1.0" [

 <!ELEMENT "javax_imageio_png_1.0" (IHDR?, PLTE?, bKGD?, cHRM?,
  gAMA?, hIST?, iCCP?, iTXt?, pHYS?, sBIT?, sPLT?, sRGB?, tEXt?,
  tIME?, tRNS?, zTXt?, UnknownChunks?)>

  <!ELEMENT "IHDR" EMPTY>
   <!-- The IHDR chunk, containing the header -->
   <!ATTLIST "IHDR" "width" #CDATA #REQUIRED>
    <!-- The width of the image in pixels -->
    <!-- Data type: Integer -->
    <!-- Min value: 1 (inclusive) -->
    <!-- Max value: 2147483647 (inclusive) -->
   <!ATTLIST "IHDR" "height" #CDATA #REQUIRED>
    <!-- The height of the image in pixels -->
    <!-- Data type: Integer -->
    <!-- Min value: 1 (inclusive) -->
    <!-- Max value: 2147483647 (inclusive) -->
   <!ATTLIST "IHDR" "bitDepth" ("1" | "2" | "4" | "8" | "16")
     #REQUIRED>
    <!-- The bit depth of the image samples -->
   <!ATTLIST "IHDR" "colorType" ("Grayscale" | "RGB" | "Palette" |
    "GrayAlpha" | "RGBAlpha") #REQUIRED>
    <!-- The color type of the image -->
   <!ATTLIST "IHDR" "compressionMethod" ("deflate") #REQUIRED>
    <!-- The compression used for image data, always "deflate" -->
   <!ATTLIST "IHDR" "filterMethod" ("adaptive") #REQUIRED>
    <!-- The filtering method used for compression, always "adaptive" -->
   <!ATTLIST "IHDR" "interlaceMethod" ("none" | "adam7") #REQUIRED>
    <!-- The interlacing method, "none" or "adam7" -->

  <!ELEMENT "PLTE" (PLTEEntry)*>
   <!-- The PLTE chunk, containing the palette -->
   <!-- Min children: 1 -->
   <!-- Max children: 256 -->

   <!ELEMENT "PLTEEntry" EMPTY>
    <!-- A palette entry -->
    <!ATTLIST "PLTEEntry" "index" #CDATA #REQUIRED>
     <!-- The index of a palette entry -->
     <!-- Data type: Integer -->
     <!-- Min value: 0 (inclusive) -->
     <!-- Max value: 255 (inclusive) -->
    <!ATTLIST "PLTEEntry" "red" #CDATA #REQUIRED>
     <!-- The red value of a palette entry -->
     <!-- Data type: Integer -->
     <!-- Min value: 0 (inclusive) -->
     <!-- Max value: 255 (inclusive) -->
    <!ATTLIST "PLTEEntry" "green" #CDATA #REQUIRED>
     <!-- The green value of a palette entry -->
     <!-- Data type: Integer -->
     <!-- Min value: 0 (inclusive) -->
     <!-- Max value: 255 (inclusive) -->
    <!ATTLIST "PLTEEntry" "blue" #CDATA #REQUIRED>
     <!-- The blue value of a palette entry -->
     <!-- Data type: Integer -->
     <!-- Min value: 0 (inclusive) -->
     <!-- Max value: 255 (inclusive) -->

  <!ELEMENT "bKGD" (bKGD_Grayscale | bKGD_RGB | bKGD_Palette)>
   <!-- The bKGD chunk, containing the background color -->

   <!ELEMENT "bKGD_Grayscale" EMPTY>
    <!-- A grayscale background color, for Gray and GrayAlpha images -->
    <!ATTLIST "bKGD_Grayscale" "gray" #CDATA #REQUIRED>
     <!-- A gray value to be used as a background -->
     <!-- Data type: Integer -->
     <!-- Min value: 0 (inclusive) -->
     <!-- Max value: 65535 (inclusive) -->

   <!ELEMENT "bKGD_RGB" EMPTY>
    <!-- An RGB background color, for RGB and RGBAlpha images -->
    <!ATTLIST "bKGD_RGB" "red" #CDATA #REQUIRED>
     <!-- A red value to be used as a background -->
     <!-- Data type: Integer -->
     <!-- Min value: 0 (inclusive) -->
     <!-- Max value: 65535 (inclusive) -->
    <!ATTLIST "bKGD_RGB" "green" #CDATA #REQUIRED>
     <!-- A green value to be used as a background -->
     <!-- Data type: Integer -->
     <!-- Min value: 0 (inclusive) -->
     <!-- Max value: 65535 (inclusive) -->
    <!ATTLIST "bKGD_RGB" "blue" #CDATA #REQUIRED>
     <!-- A blue value to be used as a background -->
     <!-- Data type: Integer -->
     <!-- Min value: 0 (inclusive) -->
     <!-- Max value: 65535 (inclusive) -->

   <!ELEMENT "bKGD_Palette" EMPTY>
    <!-- A background palette index -->
    <!ATTLIST "bKGD_Palette" "index" #CDATA #REQUIRED>
     <!-- A palette index to be used as a background -->
     <!-- Data type: Integer -->
     <!-- Min value: 0 (inclusive) -->
     <!-- Max value: 255 (inclusive) -->

  <!ELEMENT "cHRM" EMPTY>
   <!-- The cHRM chunk, containing color calibration -->
   <!ATTLIST "cHRM" "whitePointX" #CDATA #REQUIRED>
    <!-- The CIE x coordinate of the white point, multiplied by 1e5 -->
    <!-- Data type: Integer -->
    <!-- Min value: 0 (inclusive) -->
    <!-- Max value: 65535 (inclusive) -->
   <!ATTLIST "cHRM" "whitePointY" #CDATA #REQUIRED>
    <!-- The CIE y coordinate of the white point, multiplied by 1e5 -->
    <!-- Data type: Integer -->
    <!-- Min value: 0 (inclusive) -->
    <!-- Max value: 65535 (inclusive) -->
   <!ATTLIST "cHRM" "redX" #CDATA #REQUIRED>
    <!-- The CIE x coordinate of the red primary, multiplied by 1e5 -->
    <!-- Data type: Integer -->
    <!-- Min value: 0 (inclusive) -->
    <!-- Max value: 65535 (inclusive) -->
   <!ATTLIST "cHRM" "redY" #CDATA #REQUIRED>
    <!-- The CIE y coordinate of the red primary, multiplied by 1e5 -->
    <!-- Data type: Integer -->
    <!-- Min value: 0 (inclusive) -->
    <!-- Max value: 65535 (inclusive) -->
   <!ATTLIST "cHRM" "greenX" #CDATA #REQUIRED>
    <!-- The CIE x coordinate of the green primary, multiplied by 1e5 -->
    <!-- Data type: Integer -->
    <!-- Min value: 0 (inclusive) -->
    <!-- Max value: 65535 (inclusive) -->
   <!ATTLIST "cHRM" "greenY" #CDATA #REQUIRED>
    <!-- The CIE y coordinate of the green primary, multiplied by 1e5 -->
    <!-- Data type: Integer -->
    <!-- Min value: 0 (inclusive) -->
    <!-- Max value: 65535 (inclusive) -->
   <!ATTLIST "cHRM" "blueX" #CDATA #REQUIRED>
    <!-- The CIE x coordinate of the blue primary, multiplied by 1e5 -->
    <!-- Data type: Integer -->
    <!-- Min value: 0 (inclusive) -->
    <!-- Max value: 65535 (inclusive) -->
   <!ATTLIST "cHRM" "blueY" #CDATA #REQUIRED>
    <!-- The CIE y coordinate of the blue primary, multiplied by 1e5 -->
    <!-- Data type: Integer -->
    <!-- Min value: 0 (inclusive) -->
    <!-- Max value: 65535 (inclusive) -->

  <!ELEMENT "gAMA" EMPTY>
   <!-- The gAMA chunk, containing the image gamma -->
   <!ATTLIST "gAMA" "value" #CDATA #REQUIRED>
    <!-- The image gamma, multiplied by 1e5 -->
    <!-- Data type: Integer -->
    <!-- Min value: 0 (inclusive) -->
    <!-- Max value: 2147483647 (inclusive) -->

  <!ELEMENT "hIST" (hISTEntry)*>
   <!-- The hIST chunk, containing histogram information -->
   <!-- Min children: 1 -->
   <!-- Max children: 256 -->

   <!ELEMENT "hISTEntry" EMPTY>
    <!-- A histogram entry -->
    <!ATTLIST "hISTEntry" "index" #CDATA #REQUIRED>
     <!-- The palette index of this histogram entry -->
     <!-- Data type: Integer -->
     <!-- Min value: 0 (inclusive) -->
     <!-- Max value: 255 (inclusive) -->
    <!ATTLIST "hISTEntry" "value" #CDATA #REQUIRED>
     <!-- The frequency of this histogram entry -->
     <!-- Data type: Integer -->
     <!-- Min value: 0 (inclusive) -->
     <!-- Max value: 65535 (inclusive) -->

  <!ELEMENT "iCCP" EMPTY>
   <!-- The iCCP chunk, containing an ICC color profile -->
   <!-- User object: array of byte -->
   <!-- Min length: 0 -->
   <!-- Max length: 2147483647 -->
   <!ATTLIST "iCCP" "profileName" #CDATA #REQUIRED>
    <!-- The name of this ICC profile -->
    <!-- Data type: String -->
   <!ATTLIST "iCCP" "compressionMethod" ("deflate") #REQUIRED>
    <!-- The compression method used to store this ICC profile -->

  <!ELEMENT "iTXt" (iTXtEntry)*>
   <!-- The iTXt chunk, containing internationalized text -->
   <!-- Min children: 1 -->
   <!-- Max children: 2147483647 -->

   <!ELEMENT "iTXtEntry" EMPTY>
    <!-- A localized text entry -->
    <!ATTLIST "iTXtEntry" "keyword" #CDATA #REQUIRED>
     <!-- The keyword -->
     <!-- Data type: String -->
    <!ATTLIST "iTXtEntry" "compressionFlag" ("TRUE" | "FALSE")
      #REQUIRED>
    <!ATTLIST "iTXtEntry" "compressionMethod" #CDATA #REQUIRED>
     <!-- The compression method used to store this iTXt entry -->
     <!-- Data type: String -->
    <!ATTLIST "iTXtEntry" "languageTag" #CDATA #REQUIRED>
     <!-- The ISO tag describing the language this iTXt entry -->
     <!-- Data type: String -->
    <!ATTLIST "iTXtEntry" "translatedKeyword" #CDATA #REQUIRED>
     <!-- The translated keyword for iTXt entry -->
     <!-- Data type: String -->
    <!ATTLIST "iTXtEntry" "text" #CDATA #REQUIRED>
     <!-- The localized text -->
     <!-- Data type: String -->

  <!ELEMENT "pHYS" EMPTY>
   <!-- The pHYS chunk, containing the pixel size and aspect ratio -->
   <!ATTLIST "pHYS" "pixelsPerUnitXAxis" #CDATA #REQUIRED>
    <!-- The number of horizontal pixels per unit, multiplied by 1e5 -->
    <!-- Data type: Integer -->
    <!-- Min value: 0 (inclusive) -->
    <!-- Max value: 2147483647 (inclusive) -->
   <!ATTLIST "pHYS" "pixelsPerUnitYAxis" #CDATA #REQUIRED>
    <!-- The number of vertical pixels per unit, multiplied by 1e5 -->
    <!-- Data type: Integer -->
    <!-- Min value: 0 (inclusive) -->
    <!-- Max value: 2147483647 (inclusive) -->
   <!ATTLIST "pHYS" "unitSpecifier" ("unknown" | "meter") #REQUIRED>
    <!-- The unit specifier for this chunk (i.e., meters) -->

  <!ELEMENT "sBIT" (sBIT_Grayscale | sBIT_GrayAlpha | sBIT_RGB |
   sBIT_RGBAlpha | sBIT_Palette)>
   <!-- The sBIT chunk, containing significant bit information -->

   <!ELEMENT "sBIT_Grayscale" EMPTY>
    <!-- Significant bit information for gray samples -->
    <!ATTLIST "sBIT_Grayscale" "gray" #CDATA #REQUIRED>
     <!-- The number of significant bits of the gray samples -->
     <!-- Data type: Integer -->
     <!-- Min value: 0 (inclusive) -->
     <!-- Max value: 255 (inclusive) -->

   <!ELEMENT "sBIT_GrayAlpha" EMPTY>
    <!-- Significant bit information for gray and alpha samples -->
    <!ATTLIST "sBIT_GrayAlpha" "gray" #CDATA #REQUIRED>
     <!-- The number of significant bits of the gray samples -->
     <!-- Data type: Integer -->
     <!-- Min value: 0 (inclusive) -->
     <!-- Max value: 255 (inclusive) -->
    <!ATTLIST "sBIT_GrayAlpha" "alpha" #CDATA #REQUIRED>
     <!-- The number of significant bits of the alpha samples -->
     <!-- Data type: Integer -->
     <!-- Min value: 0 (inclusive) -->
     <!-- Max value: 255 (inclusive) -->

   <!ELEMENT "sBIT_RGB" EMPTY>
    <!-- Significant bit information for RGB samples -->
    <!ATTLIST "sBIT_RGB" "red" #CDATA #REQUIRED>
     <!-- The number of significant bits of the red samples -->
     <!-- Data type: Integer -->
     <!-- Min value: 0 (inclusive) -->
     <!-- Max value: 255 (inclusive) -->
    <!ATTLIST "sBIT_RGB" "green" #CDATA #REQUIRED>
     <!-- The number of significant bits of the green samples -->
     <!-- Data type: Integer -->
     <!-- Min value: 0 (inclusive) -->
     <!-- Max value: 255 (inclusive) -->
    <!ATTLIST "sBIT_RGB" "blue" #CDATA #REQUIRED>
     <!-- The number of significant bits of the blue samples -->
     <!-- Data type: Integer -->
     <!-- Min value: 0 (inclusive) -->
     <!-- Max value: 255 (inclusive) -->

   <!ELEMENT "sBIT_RGBAlpha" EMPTY>
    <!-- Significant bit information for RGBA samples -->
    <!ATTLIST "sBIT_RGBAlpha" "red" #CDATA #REQUIRED>
     <!-- The number of significant bits of the red samples -->
     <!-- Data type: Integer -->
     <!-- Min value: 0 (inclusive) -->
     <!-- Max value: 255 (inclusive) -->
    <!ATTLIST "sBIT_RGBAlpha" "green" #CDATA #REQUIRED>
     <!-- The number of significant bits of the green samples -->
     <!-- Data type: Integer -->
     <!-- Min value: 0 (inclusive) -->
     <!-- Max value: 255 (inclusive) -->
    <!ATTLIST "sBIT_RGBAlpha" "blue" #CDATA #REQUIRED>
     <!-- The number of significant bits of the blue samples -->
     <!-- Data type: Integer -->
     <!-- Min value: 0 (inclusive) -->
     <!-- Max value: 255 (inclusive) -->
    <!ATTLIST "sBIT_RGBAlpha" "alpha" #CDATA #REQUIRED>
     <!-- The number of significant bits of the alpha samples -->
     <!-- Data type: Integer -->
     <!-- Min value: 0 (inclusive) -->
     <!-- Max value: 255 (inclusive) -->

   <!ELEMENT "sBIT_Palette" EMPTY>
    <!-- Significant bit information for RGB palette entries -->
    <!ATTLIST "sBIT_Palette" "red" #CDATA #REQUIRED>
     <!-- The number of significant bits of the red palette entries -->
     <!-- Data type: Integer -->
     <!-- Min value: 0 (inclusive) -->
     <!-- Max value: 255 (inclusive) -->
    <!ATTLIST "sBIT_Palette" "green" #CDATA #REQUIRED>
     <!-- The number of significant bits of the green palette entries -->
     <!-- Data type: Integer -->
     <!-- Min value: 0 (inclusive) -->
     <!-- Max value: 255 (inclusive) -->
    <!ATTLIST "sBIT_Palette" "blue" #CDATA #REQUIRED>
     <!-- The number of significant bits of the blue palette entries -->
     <!-- Data type: Integer -->
     <!-- Min value: 0 (inclusive) -->
     <!-- Max value: 255 (inclusive) -->

  <!ELEMENT "sPLT" (sPLTEntry)*>
   <!-- The sPLT chunk, containing a suggested palette -->
   <!-- Min children: 1 -->
   <!-- Max children: 256 -->

   <!ELEMENT "sPLTEntry" EMPTY>
    <!-- A suggested palette entry -->
    <!ATTLIST "sPLTEntry" "index" #CDATA #REQUIRED>
     <!-- The index of a suggested palette entry -->
     <!-- Data type: Integer -->
     <!-- Min value: 0 (inclusive) -->
     <!-- Max value: 255 (inclusive) -->
    <!ATTLIST "sPLTEntry" "red" #CDATA #REQUIRED>
     <!-- The red value of a suggested palette entry -->
     <!-- Data type: Integer -->
     <!-- Min value: 0 (inclusive) -->
     <!-- Max value: 255 (inclusive) -->
    <!ATTLIST "sPLTEntry" "green" #CDATA #REQUIRED>
     <!-- The green value of a suggested palette entry -->
     <!-- Data type: Integer -->
     <!-- Min value: 0 (inclusive) -->
     <!-- Max value: 255 (inclusive) -->
    <!ATTLIST "sPLTEntry" "blue" #CDATA #REQUIRED>
     <!-- The blue value of a suggested palette entry -->
     <!-- Data type: Integer -->
     <!-- Min value: 0 (inclusive) -->
     <!-- Max value: 255 (inclusive) -->
    <!ATTLIST "sPLTEntry" "alpha" #CDATA #REQUIRED>
     <!-- The blue value of a suggested palette entry -->
     <!-- Data type: Integer -->
     <!-- Min value: 0 (inclusive) -->
     <!-- Max value: 255 (inclusive) -->

  <!ELEMENT "sRGB" EMPTY>
   <!-- The sRGB chunk, containing rendering intent information -->
   <!ATTLIST "sRGB" "renderingIntent" ("Perceptual" |
    "Relative colorimetric" | "Saturation" |
    "Absolute colorimetric") #REQUIRED>
    <!-- The rendering intent -->

  <!ELEMENT "tEXt" (tEXtEntry)*>
   <!-- The tEXt chunk, containing text -->
   <!-- Min children: 1 -->
   <!-- Max children: 2147483647 -->

   <!ELEMENT "tEXtEntry" EMPTY>
    <!-- A text entry -->
    <!ATTLIST "tEXtEntry" "keyword" #CDATA #REQUIRED>
     <!-- The keyword -->
     <!-- Data type: String -->
    <!ATTLIST "tEXtEntry" "value" #CDATA #REQUIRED>
     <!-- The text -->
     <!-- Data type: String -->

  <!ELEMENT "tIME" EMPTY>
   <!-- The tIME chunk, containing the image modification time -->
   <!ATTLIST "tIME" "year" #CDATA #REQUIRED>
    <!-- The year when the image was last modified -->
    <!-- Data type: Integer -->
    <!-- Min value: 0 (inclusive) -->
    <!-- Max value: 65535 (inclusive) -->
   <!ATTLIST "tIME" "month" #CDATA #REQUIRED>
    <!-- The month when the image was last modified, 1 = January -->
    <!-- Data type: Integer -->
    <!-- Min value: 1 (inclusive) -->
    <!-- Max value: 12 (inclusive) -->
   <!ATTLIST "tIME" "day" #CDATA #REQUIRED>
    <!-- The day of the month when the image was last modified -->
    <!-- Data type: Integer -->
    <!-- Min value: 1 (inclusive) -->
    <!-- Max value: 31 (inclusive) -->
   <!ATTLIST "tIME" "hour" #CDATA #REQUIRED>
    <!-- The hour when the image was last modified -->
    <!-- Data type: Integer -->
    <!-- Min value: 0 (inclusive) -->
    <!-- Max value: 23 (inclusive) -->
   <!ATTLIST "tIME" "minute" #CDATA #REQUIRED>
    <!-- The minute when the image was last modified -->
    <!-- Data type: Integer -->
    <!-- Min value: 0 (inclusive) -->
    <!-- Max value: 59 (inclusive) -->
   <!ATTLIST "tIME" "second" #CDATA #REQUIRED>
    <!-- The second when the image was last modified, 60 = leap second -->
    <!-- Data type: Integer -->
    <!-- Min value: 0 (inclusive) -->
    <!-- Max value: 60 (inclusive) -->

  <!ELEMENT "tRNS" (tRNS_Grayscale | tRNS_RGB | tRNS_Palette)>
   <!-- The tRNS chunk, containing transparency information -->

   <!ELEMENT "tRNS_Grayscale" EMPTY>
    <!-- A grayscale value that should be considered transparent -->
    <!ATTLIST "tRNS_Grayscale" "gray" #CDATA #REQUIRED>
     <!-- The gray value to be considered transparent -->
     <!-- Data type: Integer -->
     <!-- Min value: 0 (inclusive) -->
     <!-- Max value: 65535 (inclusive) -->

   <!ELEMENT "tRNS_RGB" EMPTY>
    <!-- An RGB value that should be considered transparent -->
    <!ATTLIST "tRNS_RGB" "red" #CDATA #REQUIRED>
     <!-- The red value to be considered transparent -->
     <!-- Data type: Integer -->
     <!-- Min value: 0 (inclusive) -->
     <!-- Max value: 65535 (inclusive) -->
    <!ATTLIST "tRNS_RGB" "green" #CDATA #REQUIRED>
     <!-- The green value to be considered transparent -->
     <!-- Data type: Integer -->
     <!-- Min value: 0 (inclusive) -->
     <!-- Max value: 65535 (inclusive) -->
    <!ATTLIST "tRNS_RGB" "blue" #CDATA #REQUIRED>
     <!-- The blure value to be considered transparent -->
     <!-- Data type: Integer -->
     <!-- Min value: 0 (inclusive) -->
     <!-- Max value: 65535 (inclusive) -->

   <!ELEMENT "tRNS_Palette" EMPTY>
    <!-- A palette index that should be considered transparent -->
    <!ATTLIST "tRNS_Palette" "index" #CDATA #REQUIRED>
     <!-- A palette index to be considered transparent -->
     <!-- Data type: Integer -->
     <!-- Min value: 0 (inclusive) -->
     <!-- Max value: 255 (inclusive) -->
    <!ATTLIST "tRNS_Palette" "alpha" #CDATA #REQUIRED>
     <!-- The transparency associated with the palette entry -->
     <!-- Data type: Integer -->
     <!-- Min value: 0 (inclusive) -->
     <!-- Max value: 255 (inclusive) -->

  <!ELEMENT "zTXt" (zTXtEntry)*>
   <!-- The zTXt chunk, containing compressed text -->
   <!-- Min children: 1 -->
   <!-- Max children: 2147483647 -->

   <!ELEMENT "zTXtEntry" EMPTY>
    <!-- A compressed text entry -->
    <!-- User object: array of byte -->
    <!-- Min length: 0 -->
    <!-- Max length: 2147483647 -->
    <!ATTLIST "zTXtEntry" "keyword" #CDATA #REQUIRED>
     <!-- The keyword -->
     <!-- Data type: String -->
    <!ATTLIST "zTXtEntry" "compressionMethod" ("deflate")
      #REQUIRED>
     <!-- The compressed text -->

  <!ELEMENT "UnknownChunks" (UnknownChunk)*>
   <!-- A set of unknown chunks -->
   <!-- Min children: 1 -->
   <!-- Max children: 2147483647 -->

   <!ELEMENT "UnknownChunk" EMPTY>
    <!-- Unknown chunk data stored as a byte array -->
    <!-- User object: array of byte -->
    <!-- Min length: 0 -->
    <!-- Max length: 2147483647 -->
    <!ATTLIST "UnknownChunk" "type" #CDATA #REQUIRED>
     <!-- The 4-character type of the unknown chunk -->
     <!-- Data type: String -->
]>