Spec-Zone .ru
спецификации, руководства, описания, API

Спецификация Формата Метаданных PNG

Собственный формат PNG кодирует полное содержание блока файла PNG блоком, за исключением блоков IDAT, которые содержат фактические данные изображения. Блоки, которые не определяются в PNG 1.2 спецификации, сохранены под UnknownChunks элемент. Отметьте, что это - обязанность прикладного программного обеспечения реализовать правила для читателей PNG, писателей, и редакторов (например, правила относительно опасных к копии блоков) описанный в спецификации PNG. Библиотека ввода-вывода Изображения не, в и себя, читателя PNG, писателя, или редактора в смысле спецификации. Скорее это - инструмент, который может использоваться, чтобы создать читателей PNG, писателей, и редакторов.

Фактический width изображения, height, битовая глубина, и цветной тип переопределят любые значения, которые передают писателю через метаданные с одним исключением. Если изображение имеет IndexColorModel, записи таблицы цветов будут проверены, чтобы определить, формируют ли они универсальный полутоновый скат. Если так, изображение будет обычно кодироваться, используя в качестве шкалы полутонов вместо цвета палитры. Однако, если цветным набором типа в метаданных будет "Палитра", то цвет палитры будет использоваться.

Если никакие метаданные не предоставляются, кодируя изображение, заголовок инициализируется от изображения, закодированного, и никакие дополнительные блоки не включаются.

Семантика стандартных блоков описывается в спецификации PNG. Отметьте, что есть некоторые ограничения, на которых блоки могут появиться для каждого цветного типа. В частности

Дочерние узлы bKGD, sBIT, и tRNS блоки должны соответствовать цветной тип изображения.

Определенные блоки могут обоснованно появиться многократно в файле 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 -->
]>