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 <!DOCTYPE "javax_imageio_png_1.0" [
104
105 <!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?)>
108
109 <!ELEMENT "IHDR" EMPTY>
110 <!-- The IHDR chunk, containing the header -->
111 <!ATTLIST "IHDR" "width" #CDATA #REQUIRED>
112 <!-- The width of the image in pixels -->
113 <!-- Data type: Integer -->
114 <!-- Min value: 1 (inclusive) -->
115 <!-- Max value: 2147483647 (inclusive) -->
116 <!ATTLIST "IHDR" "height" #CDATA #REQUIRED>
117 <!-- The height of the image in pixels -->
118 <!-- Data type: Integer -->
119 <!-- Min value: 1 (inclusive) -->
120 <!-- Max value: 2147483647 (inclusive) -->
121 <!ATTLIST "IHDR" "bitDepth" ("1" | "2" | "4" | "8" | "16")
122 #REQUIRED>
123 <!-- The bit depth of the image samples -->
124 <!ATTLIST "IHDR" "colorType" ("Grayscale" | "RGB" | "Palette" |
125 "GrayAlpha" | "RGBAlpha") #REQUIRED>
126 <!-- The color type of the image -->
127 <!ATTLIST "IHDR" "compressionMethod" ("deflate") #REQUIRED>
128 <!-- The compression used for image data, always "deflate" -->
129 <!ATTLIST "IHDR" "filterMethod" ("adaptive") #REQUIRED>
130 <!-- The filtering method used for compression, always "adaptive" -->
131 <!ATTLIST "IHDR" "interlaceMethod" ("none" | "adam7") #REQUIRED>
132 <!-- The interlacing method, "none" or "adam7" -->
133
134 <!ELEMENT "PLTE" (PLTEEntry)*>
135 <!-- The PLTE chunk, containing the palette -->
136 <!-- Min children: 1 -->
137 <!-- Max children: 256 -->
138
139 <!ELEMENT "PLTEEntry" EMPTY>
140 <!-- A palette entry -->
141 <!ATTLIST "PLTEEntry" "index" #CDATA #REQUIRED>
142 <!-- The index of a palette entry -->
143 <!-- Data type: Integer -->
144 <!-- Min value: 0 (inclusive) -->
145 <!-- Max value: 255 (inclusive) -->
146 <!ATTLIST "PLTEEntry" "red" #CDATA #REQUIRED>
147 <!-- The red value of a palette entry -->
148 <!-- Data type: Integer -->
149 <!-- Min value: 0 (inclusive) -->
150 <!-- Max value: 255 (inclusive) -->
151 <!ATTLIST "PLTEEntry" "green" #CDATA #REQUIRED>
152 <!-- The green value of a palette entry -->
153 <!-- Data type: Integer -->
154 <!-- Min value: 0 (inclusive) -->
155 <!-- Max value: 255 (inclusive) -->
156 <!ATTLIST "PLTEEntry" "blue" #CDATA #REQUIRED>
157 <!-- The blue value of a palette entry -->
158 <!-- Data type: Integer -->
159 <!-- Min value: 0 (inclusive) -->
160 <!-- Max value: 255 (inclusive) -->
161
162 <!ELEMENT "bKGD" (bKGD_Grayscale | bKGD_RGB | bKGD_Palette)>
163 <!-- The bKGD chunk, containing the background color -->
164
165 <!ELEMENT "bKGD_Grayscale" EMPTY>
166 <!-- A grayscale background color, for Gray and GrayAlpha images -->
167 <!ATTLIST "bKGD_Grayscale" "gray" #CDATA #REQUIRED>
168 <!-- A gray value to be used as a background -->
169 <!-- Data type: Integer -->
170 <!-- Min value: 0 (inclusive) -->
171 <!-- Max value: 65535 (inclusive) -->
172
173 <!ELEMENT "bKGD_RGB" EMPTY>
174 <!-- An RGB background color, for RGB and RGBAlpha images -->
175 <!ATTLIST "bKGD_RGB" "red" #CDATA #REQUIRED>
176 <!-- A red value to be used as a background -->
177 <!-- Data type: Integer -->
178 <!-- Min value: 0 (inclusive) -->
179 <!-- Max value: 65535 (inclusive) -->
180 <!ATTLIST "bKGD_RGB" "green" #CDATA #REQUIRED>
181 <!-- A green value to be used as a background -->
182 <!-- Data type: Integer -->
183 <!-- Min value: 0 (inclusive) -->
184 <!-- Max value: 65535 (inclusive) -->
185 <!ATTLIST "bKGD_RGB" "blue" #CDATA #REQUIRED>
186 <!-- A blue value to be used as a background -->
187 <!-- Data type: Integer -->
188 <!-- Min value: 0 (inclusive) -->
189 <!-- Max value: 65535 (inclusive) -->
190
191 <!ELEMENT "bKGD_Palette" EMPTY>
192 <!-- A background palette index -->
193 <!ATTLIST "bKGD_Palette" "index" #CDATA #REQUIRED>
194 <!-- A palette index to be used as a background -->
195 <!-- Data type: Integer -->
196 <!-- Min value: 0 (inclusive) -->
197 <!-- Max value: 255 (inclusive) -->
198
199 <!ELEMENT "cHRM" EMPTY>
200 <!-- The cHRM chunk, containing color calibration -->
201 <!ATTLIST "cHRM" "whitePointX" #CDATA #REQUIRED>
202 <!-- The CIE x coordinate of the white point, multiplied by 1e5 -->
203 <!-- Data type: Integer -->
204 <!-- Min value: 0 (inclusive) -->
205 <!-- Max value: 65535 (inclusive) -->
206 <!ATTLIST "cHRM" "whitePointY" #CDATA #REQUIRED>
207 <!-- The CIE y coordinate of the white point, multiplied by 1e5 -->
208 <!-- Data type: Integer -->
209 <!-- Min value: 0 (inclusive) -->
210 <!-- Max value: 65535 (inclusive) -->
211 <!ATTLIST "cHRM" "redX" #CDATA #REQUIRED>
212 <!-- The CIE x coordinate of the red primary, multiplied by 1e5 -->
213 <!-- Data type: Integer -->
214 <!-- Min value: 0 (inclusive) -->
215 <!-- Max value: 65535 (inclusive) -->
216 <!ATTLIST "cHRM" "redY" #CDATA #REQUIRED>
217 <!-- The CIE y coordinate of the red primary, multiplied by 1e5 -->
218 <!-- Data type: Integer -->
219 <!-- Min value: 0 (inclusive) -->
220 <!-- Max value: 65535 (inclusive) -->
221 <!ATTLIST "cHRM" "greenX" #CDATA #REQUIRED>
222 <!-- The CIE x coordinate of the green primary, multiplied by 1e5 -->
223 <!-- Data type: Integer -->
224 <!-- Min value: 0 (inclusive) -->
225 <!-- Max value: 65535 (inclusive) -->
226 <!ATTLIST "cHRM" "greenY" #CDATA #REQUIRED>
227 <!-- The CIE y coordinate of the green primary, multiplied by 1e5 -->
228 <!-- Data type: Integer -->
229 <!-- Min value: 0 (inclusive) -->
230 <!-- Max value: 65535 (inclusive) -->
231 <!ATTLIST "cHRM" "blueX" #CDATA #REQUIRED>
232 <!-- The CIE x coordinate of the blue primary, multiplied by 1e5 -->
233 <!-- Data type: Integer -->
234 <!-- Min value: 0 (inclusive) -->
235 <!-- Max value: 65535 (inclusive) -->
236 <!ATTLIST "cHRM" "blueY" #CDATA #REQUIRED>
237 <!-- The CIE y coordinate of the blue primary, multiplied by 1e5 -->
238 <!-- Data type: Integer -->
239 <!-- Min value: 0 (inclusive) -->
240 <!-- Max value: 65535 (inclusive) -->
241
242 <!ELEMENT "gAMA" EMPTY>
243 <!-- The gAMA chunk, containing the image gamma -->
244 <!ATTLIST "gAMA" "value" #CDATA #REQUIRED>
245 <!-- The image gamma, multiplied by 1e5 -->
246 <!-- Data type: Integer -->
247 <!-- Min value: 0 (inclusive) -->
248 <!-- Max value: 2147483647 (inclusive) -->
249
250 <!ELEMENT "hIST" (hISTEntry)*>
251 <!-- The hIST chunk, containing histogram information -->
252 <!-- Min children: 1 -->
253 <!-- Max children: 256 -->
254
255 <!ELEMENT "hISTEntry" EMPTY>
256 <!-- A histogram entry -->
257 <!ATTLIST "hISTEntry" "index" #CDATA #REQUIRED>
258 <!-- The palette index of this histogram entry -->
259 <!-- Data type: Integer -->
260 <!-- Min value: 0 (inclusive) -->
261 <!-- Max value: 255 (inclusive) -->
262 <!ATTLIST "hISTEntry" "value" #CDATA #REQUIRED>
263 <!-- The frequency of this histogram entry -->
264 <!-- Data type: Integer -->
265 <!-- Min value: 0 (inclusive) -->
266 <!-- Max value: 65535 (inclusive) -->
267
268 <!ELEMENT "iCCP" EMPTY>
269 <!-- The iCCP chunk, containing an ICC color profile -->
270 <!-- User object: array of byte -->
271 <!-- Min length: 0 -->
272 <!-- Max length: 2147483647 -->
273 <!ATTLIST "iCCP" "profileName" #CDATA #REQUIRED>
274 <!-- The name of this ICC profile -->
275 <!-- Data type: String -->
276 <!ATTLIST "iCCP" "compressionMethod" ("deflate") #REQUIRED>
277 <!-- The compression method used to store this ICC profile -->
278
279 <!ELEMENT "iTXt" (iTXtEntry)*>
280 <!-- The iTXt chunk, containing internationalized text -->
281 <!-- Min children: 1 -->
282 <!-- Max children: 2147483647 -->
283
284 <!ELEMENT "iTXtEntry" EMPTY>
285 <!-- A localized text entry -->
286 <!ATTLIST "iTXtEntry" "keyword" #CDATA #REQUIRED>
287 <!-- The keyword -->
288 <!-- Data type: String -->
289 <!ATTLIST "iTXtEntry" "compressionFlag" ("TRUE" | "FALSE")
290 #REQUIRED>
291 <!ATTLIST "iTXtEntry" "compressionMethod" #CDATA #REQUIRED>
292 <!-- The compression method used to store this iTXt entry -->
293 <!-- Data type: String -->
294 <!ATTLIST "iTXtEntry" "languageTag" #CDATA #REQUIRED>
295 <!-- The ISO tag describing the language this iTXt entry -->
296 <!-- Data type: String -->
297 <!ATTLIST "iTXtEntry" "translatedKeyword" #CDATA #REQUIRED>
298 <!-- The translated keyword for iTXt entry -->
299 <!-- Data type: String -->
300 <!ATTLIST "iTXtEntry" "text" #CDATA #REQUIRED>
301 <!-- The localized text -->
302 <!-- Data type: String -->
303
304 <!ELEMENT "pHYS" EMPTY>
305 <!-- The pHYS chunk, containing the pixel size and aspect ratio -->
306 <!ATTLIST "pHYS" "pixelsPerUnitXAxis" #CDATA #REQUIRED>
307 <!-- The number of horizontal pixels per unit, multiplied by 1e5 -->
308 <!-- Data type: Integer -->
309 <!-- Min value: 0 (inclusive) -->
310 <!-- Max value: 2147483647 (inclusive) -->
311 <!ATTLIST "pHYS" "pixelsPerUnitYAxis" #CDATA #REQUIRED>
312 <!-- The number of vertical pixels per unit, multiplied by 1e5 -->
313 <!-- Data type: Integer -->
314 <!-- Min value: 0 (inclusive) -->
315 <!-- Max value: 2147483647 (inclusive) -->
316 <!ATTLIST "pHYS" "unitSpecifier" ("unknown" | "meter") #REQUIRED>
317 <!-- The unit specifier for this chunk (i.e., meters) -->
318
319 <!ELEMENT "sBIT" (sBIT_Grayscale | sBIT_GrayAlpha | sBIT_RGB |
320 sBIT_RGBAlpha | sBIT_Palette)>
321 <!-- The sBIT chunk, containing significant bit information -->
322
323 <!ELEMENT "sBIT_Grayscale" EMPTY>
324 <!-- Significant bit information for gray samples -->
325 <!ATTLIST "sBIT_Grayscale" "gray" #CDATA #REQUIRED>
326 <!-- The number of significant bits of the gray samples -->
327 <!-- Data type: Integer -->
328 <!-- Min value: 0 (inclusive) -->
329 <!-- Max value: 255 (inclusive) -->
330
331 <!ELEMENT "sBIT_GrayAlpha" EMPTY>
332 <!-- Significant bit information for gray and alpha samples -->
333 <!ATTLIST "sBIT_GrayAlpha" "gray" #CDATA #REQUIRED>
334 <!-- The number of significant bits of the gray samples -->
335 <!-- Data type: Integer -->
336 <!-- Min value: 0 (inclusive) -->
337 <!-- Max value: 255 (inclusive) -->
338 <!ATTLIST "sBIT_GrayAlpha" "alpha" #CDATA #REQUIRED>
339 <!-- The number of significant bits of the alpha samples -->
340 <!-- Data type: Integer -->
341 <!-- Min value: 0 (inclusive) -->
342 <!-- Max value: 255 (inclusive) -->
343
344 <!ELEMENT "sBIT_RGB" EMPTY>
345 <!-- Significant bit information for RGB samples -->
346 <!ATTLIST "sBIT_RGB" "red" #CDATA #REQUIRED>
347 <!-- The number of significant bits of the red samples -->
348 <!-- Data type: Integer -->
349 <!-- Min value: 0 (inclusive) -->
350 <!-- Max value: 255 (inclusive) -->
351 <!ATTLIST "sBIT_RGB" "green" #CDATA #REQUIRED>
352 <!-- The number of significant bits of the green samples -->
353 <!-- Data type: Integer -->
354 <!-- Min value: 0 (inclusive) -->
355 <!-- Max value: 255 (inclusive) -->
356 <!ATTLIST "sBIT_RGB" "blue" #CDATA #REQUIRED>
357 <!-- The number of significant bits of the blue samples -->
358 <!-- Data type: Integer -->
359 <!-- Min value: 0 (inclusive) -->
360 <!-- Max value: 255 (inclusive) -->
361
362 <!ELEMENT "sBIT_RGBAlpha" EMPTY>
363 <!-- Significant bit information for RGBA samples -->
364 <!ATTLIST "sBIT_RGBAlpha" "red" #CDATA #REQUIRED>
365 <!-- The number of significant bits of the red samples -->
366 <!-- Data type: Integer -->
367 <!-- Min value: 0 (inclusive) -->
368 <!-- Max value: 255 (inclusive) -->
369 <!ATTLIST "sBIT_RGBAlpha" "green" #CDATA #REQUIRED>
370 <!-- The number of significant bits of the green samples -->
371 <!-- Data type: Integer -->
372 <!-- Min value: 0 (inclusive) -->
373 <!-- Max value: 255 (inclusive) -->
374 <!ATTLIST "sBIT_RGBAlpha" "blue" #CDATA #REQUIRED>
375 <!-- The number of significant bits of the blue samples -->
376 <!-- Data type: Integer -->
377 <!-- Min value: 0 (inclusive) -->
378 <!-- Max value: 255 (inclusive) -->
379 <!ATTLIST "sBIT_RGBAlpha" "alpha" #CDATA #REQUIRED>
380 <!-- The number of significant bits of the alpha samples -->
381 <!-- Data type: Integer -->
382 <!-- Min value: 0 (inclusive) -->
383 <!-- Max value: 255 (inclusive) -->
384
385 <!ELEMENT "sBIT_Palette" EMPTY>
386 <!-- Significant bit information for RGB palette entries -->
387 <!ATTLIST "sBIT_Palette" "red" #CDATA #REQUIRED>
388 <!-- The number of significant bits of the red palette entries -->
389 <!-- Data type: Integer -->
390 <!-- Min value: 0 (inclusive) -->
391 <!-- Max value: 255 (inclusive) -->
392 <!ATTLIST "sBIT_Palette" "green" #CDATA #REQUIRED>
393 <!-- The number of significant bits of the green palette entries -->
394 <!-- Data type: Integer -->
395 <!-- Min value: 0 (inclusive) -->
396 <!-- Max value: 255 (inclusive) -->
397 <!ATTLIST "sBIT_Palette" "blue" #CDATA #REQUIRED>
398 <!-- The number of significant bits of the blue palette entries -->
399 <!-- Data type: Integer -->
400 <!-- Min value: 0 (inclusive) -->
401 <!-- Max value: 255 (inclusive) -->
402
403 <!ELEMENT "sPLT" (sPLTEntry)*>
404 <!-- The sPLT chunk, containing a suggested palette -->
405 <!-- Min children: 1 -->
406 <!-- Max children: 256 -->
407
408 <!ELEMENT "sPLTEntry" EMPTY>
409 <!-- A suggested palette entry -->
410 <!ATTLIST "sPLTEntry" "index" #CDATA #REQUIRED>
411 <!-- The index of a suggested palette entry -->
412 <!-- Data type: Integer -->
413 <!-- Min value: 0 (inclusive) -->
414 <!-- Max value: 255 (inclusive) -->
415 <!ATTLIST "sPLTEntry" "red" #CDATA #REQUIRED>
416 <!-- The red value of a suggested palette entry -->
417 <!-- Data type: Integer -->
418 <!-- Min value: 0 (inclusive) -->
419 <!-- Max value: 255 (inclusive) -->
420 <!ATTLIST "sPLTEntry" "green" #CDATA #REQUIRED>
421 <!-- The green value of a suggested palette entry -->
422 <!-- Data type: Integer -->
423 <!-- Min value: 0 (inclusive) -->
424 <!-- Max value: 255 (inclusive) -->
425 <!ATTLIST "sPLTEntry" "blue" #CDATA #REQUIRED>
426 <!-- The blue value of a suggested palette entry -->
427 <!-- Data type: Integer -->
428 <!-- Min value: 0 (inclusive) -->
429 <!-- Max value: 255 (inclusive) -->
430 <!ATTLIST "sPLTEntry" "alpha" #CDATA #REQUIRED>
431 <!-- The blue value of a suggested palette entry -->
432 <!-- Data type: Integer -->
433 <!-- Min value: 0 (inclusive) -->
434 <!-- Max value: 255 (inclusive) -->
435
436 <!ELEMENT "sRGB" EMPTY>
437 <!-- The sRGB chunk, containing rendering intent information -->
438 <!ATTLIST "sRGB" "renderingIntent" ("Perceptual" |
439 "Relative colorimetric" | "Saturation" |
440 "Absolute colorimetric") #REQUIRED>
441 <!-- The rendering intent -->
442
443 <!ELEMENT "tEXt" (tEXtEntry)*>
444 <!-- The tEXt chunk, containing text -->
445 <!-- Min children: 1 -->
446 <!-- Max children: 2147483647 -->
447
448 <!ELEMENT "tEXtEntry" EMPTY>
449 <!-- A text entry -->
450 <!ATTLIST "tEXtEntry" "keyword" #CDATA #REQUIRED>
451 <!-- The keyword -->
452 <!-- Data type: String -->
453 <!ATTLIST "tEXtEntry" "value" #CDATA #REQUIRED>
454 <!-- The text -->
455 <!-- Data type: String -->
456
457 <!ELEMENT "tIME" EMPTY>
458 <!-- The tIME chunk, containing the image modification time -->
459 <!ATTLIST "tIME" "year" #CDATA #REQUIRED>
460 <!-- The year when the image was last modified -->
461 <!-- Data type: Integer -->
462 <!-- Min value: 0 (inclusive) -->
463 <!-- Max value: 65535 (inclusive) -->
464 <!ATTLIST "tIME" "month" #CDATA #REQUIRED>
465 <!-- The month when the image was last modified, 1 = January -->
466 <!-- Data type: Integer -->
467 <!-- Min value: 1 (inclusive) -->
468 <!-- Max value: 12 (inclusive) -->
469 <!ATTLIST "tIME" "day" #CDATA #REQUIRED>
470 <!-- The day of the month when the image was last modified -->
471 <!-- Data type: Integer -->
472 <!-- Min value: 1 (inclusive) -->
473 <!-- Max value: 31 (inclusive) -->
474 <!ATTLIST "tIME" "hour" #CDATA #REQUIRED>
475 <!-- The hour when the image was last modified -->
476 <!-- Data type: Integer -->
477 <!-- Min value: 0 (inclusive) -->
478 <!-- Max value: 23 (inclusive) -->
479 <!ATTLIST "tIME" "minute" #CDATA #REQUIRED>
480 <!-- The minute when the image was last modified -->
481 <!-- Data type: Integer -->
482 <!-- Min value: 0 (inclusive) -->
483 <!-- Max value: 59 (inclusive) -->
484 <!ATTLIST "tIME" "second" #CDATA #REQUIRED>
485 <!-- The second when the image was last modified, 60 = leap second -->
486 <!-- Data type: Integer -->
487 <!-- Min value: 0 (inclusive) -->
488 <!-- Max value: 60 (inclusive) -->
489
490 <!ELEMENT "tRNS" (tRNS_Grayscale | tRNS_RGB | tRNS_Palette)>
491 <!-- The tRNS chunk, containing transparency information -->
492
493 <!ELEMENT "tRNS_Grayscale" EMPTY>
494 <!-- A grayscale value that should be considered transparent -->
495 <!ATTLIST "tRNS_Grayscale" "gray" #CDATA #REQUIRED>
496 <!-- The gray value to be considered transparent -->
497 <!-- Data type: Integer -->
498 <!-- Min value: 0 (inclusive) -->
499 <!-- Max value: 65535 (inclusive) -->
500
501 <!ELEMENT "tRNS_RGB" EMPTY>
502 <!-- An RGB value that should be considered transparent -->
503 <!ATTLIST "tRNS_RGB" "red" #CDATA #REQUIRED>
504 <!-- The red value to be considered transparent -->
505 <!-- Data type: Integer -->
506 <!-- Min value: 0 (inclusive) -->
507 <!-- Max value: 65535 (inclusive) -->
508 <!ATTLIST "tRNS_RGB" "green" #CDATA #REQUIRED>
509 <!-- The green value to be considered transparent -->
510 <!-- Data type: Integer -->
511 <!-- Min value: 0 (inclusive) -->
512 <!-- Max value: 65535 (inclusive) -->
513 <!ATTLIST "tRNS_RGB" "blue" #CDATA #REQUIRED>
514 <!-- The blure value to be considered transparent -->
515 <!-- Data type: Integer -->
516 <!-- Min value: 0 (inclusive) -->
517 <!-- Max value: 65535 (inclusive) -->
518
519 <!ELEMENT "tRNS_Palette" EMPTY>
520 <!-- A palette index that should be considered transparent -->
521 <!ATTLIST "tRNS_Palette" "index" #CDATA #REQUIRED>
522 <!-- A palette index to be considered transparent -->
523 <!-- Data type: Integer -->
524 <!-- Min value: 0 (inclusive) -->
525 <!-- Max value: 255 (inclusive) -->
526 <!ATTLIST "tRNS_Palette" "alpha" #CDATA #REQUIRED>
527 <!-- The transparency associated with the palette entry -->
528 <!-- Data type: Integer -->
529 <!-- Min value: 0 (inclusive) -->
530 <!-- Max value: 255 (inclusive) -->
531
532 <!ELEMENT "zTXt" (zTXtEntry)*>
533 <!-- The zTXt chunk, containing compressed text -->
534 <!-- Min children: 1 -->
535 <!-- Max children: 2147483647 -->
536
537 <!ELEMENT "zTXtEntry" EMPTY>
538 <!-- A compressed text entry -->
539 <!-- User object: array of byte -->
540 <!-- Min length: 0 -->
541 <!-- Max length: 2147483647 -->
542 <!ATTLIST "zTXtEntry" "keyword" #CDATA #REQUIRED>
543 <!-- The keyword -->
544 <!-- Data type: String -->
545 <!ATTLIST "zTXtEntry" "compressionMethod" ("deflate")
546 #REQUIRED>
547 <!-- The compressed text -->
548
549 <!ELEMENT "UnknownChunks" (UnknownChunk)*>
550 <!-- A set of unknown chunks -->
551 <!-- Min children: 1 -->
552 <!-- Max children: 2147483647 -->
553
554 <!ELEMENT "UnknownChunk" EMPTY>
555 <!-- Unknown chunk data stored as a byte array -->
556 <!-- User object: array of byte -->
557 <!-- Min length: 0 -->
558 <!-- Max length: 2147483647 -->
559 <!ATTLIST "UnknownChunk" "type" #CDATA #REQUIRED>
560 <!-- The 4-character type of the unknown chunk -->
561 <!-- Data type: String -->
562 ]>
563 </pre>
564
565 </body>
566 </html>