File: userManual.html

package info (click to toggle)
jpylyzer 2.1.0-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 8,844 kB
  • sloc: xml: 161,036; python: 2,695; sh: 127; java: 56; makefile: 21
file content (4432 lines) | stat: -rw-r--r-- 167,623 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
---
layout: page
title: User Manual
---
{% include JB/setup %}


<header id="title-block-header">
<h1 class="title">Jpylyzer User Manual</h1>
<p class="author"/>
</header>


<nav id="TOC" role="doc-toc">
<ul>
<li><a href="#introduction">Introduction</a>
<ul>
<li><a href="#about-jpylyzer">About jpylyzer</a></li>
<li><a href="#validation-scope-and-restrictions">Validation: scope and restrictions</a></li>
<li><a href="#outline">Outline of this User Manual</a></li>
<li><a href="#funding">Funding</a></li>
<li><a href="#license">License</a></li>
</ul></li>
<li><a href="#installation">Installation and set-up</a>
<ul>
<li><a href="#obtaining-the-software">Obtaining the software</a></li>
<li><a href="#installation-pip">Installation with Pip (Linux/Unix, Windows, Mac OS X)</a></li>
<li><a href="#installation-windows">Installation of Windows binaries (Windows only)</a></li>
<li><a href="#installation-debian">Installation of Debian packages (Ubuntu/Linux)</a></li>
</ul></li>
<li><a href="#using-jpylyzer">Using <em>jpylyzer</em></a>
<ul>
<li><a href="#using-overview">Overview</a></li>
<li><a href="#command-line-usage">Command-line usage</a></li>
<li><a href="#using-as-python-module">Using <em>jpylyzer</em> as a Python module</a></li>
<li><a href="#java-integration">Java integration</a></li>
</ul></li>
<li><a href="#structure-jp2">Structure of a JP2 file</a>
<ul>
<li><a href="#structure-scope">Scope of this section</a></li>
<li><a href="#general-format-structure">General format structure</a></li>
<li><a href="#general-box-structure">General structure of a box</a></li>
<li><a href="#defined-boxes">Defined boxes in JP2</a></li>
</ul></li>
<li><a href="#output-format">Output format</a>
<ul>
<li><a href="#output-format-overview">Overview</a></li>
<li><a href="#toolinfo-element">toolInfo element</a></li>
<li><a href="#file-element">file element</a></li>
<li><a href="#fileinfo-element">fileInfo element</a></li>
<li><a href="#statusinfo-element">statusInfo element</a></li>
<li><a href="#isvalid-element">isValid element</a></li>
<li><a href="#tests-element">tests element</a></li>
<li><a href="#properties-element">properties element</a></li>
<li><a href="#propertiesExtension-element">propertiesExtension element</a></li>
</ul></li>
<li><a href="#jp2-box-by-box">JP2: box by box</a>
<ul>
<li><a href="#about-properties-tests-trees">About the properties and tests trees</a></li>
<li><a href="#jpeg2000-signature-box">JPEG 2000 Signature box</a></li>
<li><a href="#file-type-box">File Type box</a></li>
<li><a href="#jp2-header-box">JP2 Header box (superbox)</a></li>
<li><a href="#image-header-box">Image Header box (child of JP2 Header box)</a></li>
<li><a href="#bits-per-component-box">Bits Per Component box (child of JP2 Header box)</a></li>
<li><a href="#colour-specification-box">Colour Specification box (child of JP2 Header box)</a></li>
<li><a href="#palette-box">Palette box (child of JP2 Header box)</a></li>
<li><a href="#component-mapping-box">Component Mapping box (child of JP2 Header box)</a></li>
<li><a href="#channel-definition-box">Channel Definition box (child of JP2 Header box)</a></li>
<li><a href="#resolution-box">Resolution box (child of JP2 Header box, superbox)</a></li>
<li><a href="#capture-resolution-box">Capture Resolution box (child of Resolution box)</a></li>
<li><a href="#display-resolution-box">Default Display Resolution box (child of Resolution box)</a></li>
<li><a href="#codestream-box">Contiguous Codestream box</a></li>
<li><a href="#intellectual-property-box">Intellectual Property box</a></li>
<li><a href="#xml-box">XML box</a></li>
<li><a href="#uuid-box">UUID box</a></li>
<li><a href="#uuid-info-box">UUID Info box (superbox)</a></li>
<li><a href="#uuid-list-box">UUID List box (child of UUID Info box)</a></li>
<li><a href="#data-entry-url-box">Data Entry URL box (child of UUID Info box)</a></li>
<li><a href="#unknown-box-section">Unknown box</a></li>
<li><a href="#top-level-tests-properties">Top-level tests and properties</a></li>
</ul></li>
<li><a href="#contiguous-codestream-box-chapter">Contiguous Codestream box</a>
<ul>
<li><a href="#codestream-structure">General codestream structure</a></li>
<li><a href="#limitations-codestream-validation">Limitations of codestream validation</a></li>
<li><a href="#structure-reported-output">Structure of reported output</a></li>
<li><a href="#contiguous-codestream-box">Contiguous Codestream box</a></li>
<li><a href="#siz-marker">Image and tile size (SIZ) marker segment (child of Contiguous Codestream box)</a></li>
<li><a href="#cod-marker">Coding style default (COD) marker segment</a></li>
<li><a href="#coc-marker">Coding style component (COC) marker segment</a></li>
<li><a href="#rgn-marker">Region-of-interest (RGN) marker segment</a></li>
<li><a href="#qcd-marker">Quantization default (QCD) marker segment</a></li>
<li><a href="#qcc-marker">Quantization component (QCC) marker segment</a></li>
<li><a href="#poc-marker">Progression order change (POC) marker segment</a></li>
<li><a href="#crg-marker">Component registration (CRG) marker segment</a></li>
<li><a href="#com-marker">Comment (COM) marker segment</a></li>
<li><a href="#tile-part">Tile part (child of Contiguous Codestream box)</a></li>
<li><a href="#sot-marker">Start of tile part (SOT) marker segment (child of tile part)</a></li>
<li><a href="#tlm-marker">Tile-part lengths (TLM) marker segment</a></li>
<li><a href="#plm-marker">Packet length, main header (PLM) marker segment</a></li>
<li><a href="#ppm-marker">Packed packet headers, main header (PPM) marker segment</a></li>
<li><a href="#plt-marker">Packet length, tile-part header (PLT) marker segment</a></li>
<li><a href="#ppt-marker">Packed packet headers, tile-part header (PPT) marker segment</a></li>
</ul></li>
<li><a href="#references">References</a></li>
</ul>
</nav>


<h1 id="introduction">Introduction</h1>


<h2 id="about-jpylyzer">About jpylyzer</h2>


<p>This User Manual documents <em>jpylyzer</em>, a validator and feature extractor for JP2 images. JP2 is the still image format that is defined by JPEG 2000 Part 1 (ISO/IEC 15444-1). <em>Jpylyzer</em> was specifically created to answer the following questions that you might have about any JP2 file:</p>


<ol type="1">
<li><p>Is this really a JP2 and does it really conform to the format’s specifications (validation)?</p></li>
<li><p>What are the technical characteristics of this image (feature extraction)?</p></li>
</ol>


<h2 id="validation-scope-and-restrictions">Validation: scope and restrictions</h2>


<p>Since the word ‘validation’ means different things to different people, a few words about the overall scope of <em>jpylyzer</em>. First of all, it is important to stress that <em>jpylyzer</em> is not a ‘one stop solution’ that will tell you that an image is 100% perfect. What <em>jpylyzer</em> does is this: based on the JP2 format specification (ISO/IEC 15444-1), it parses a file. It then subjects the file’s contents to a large number of tests, each of which is based on the requirements and restrictions that are defined by the standard. If a file fails one or more tests, this implies that it does not conform to the standard, and is no valid JP2. Importantly, this presumes that <em>jpylyzer</em>’s tests accurately reflect the format specification, without producing false positives.</p>


<h3 id="valid-means-probably-valid">‘Valid’ means ‘probably valid’</h3>


<p>If a file passes all tests, this is an indication that it is <em>probably</em> valid JP2. This (intentionally) implies a certain degree of remaining uncertainty, which is related to the following.</p>


<p>First of all, <em>jpylyzer</em> (or any other format validator for that matter) ‘validates’ a file by trying to prove that it does <em>not</em> conform to the standard. It cannot prove that that a file <em>does</em> conform to the standard.</p>


<p>Related to this, even though <em>jpylyzer</em>’s validation process is very comprehensive, it is not complete. For instance, the validation of JPEG 2000 codestreams at this moment is still somewhat limited. These limitations are discussed in detail <a href="#limitations-codestream-validation">here</a>. Some of these limitations (e.g. optional codestream segment markers that are only minimally supported at this stage) may be taken away in upcoming versions of the tool.</p>


<h3 id="no-check-on-compressed-bitstreams">No check on compressed bitstreams</h3>


<p>One important limitation that most certainly will <em>not</em> be addressed in any upcoming versions is that <em>jpylyzer</em> does not analyse the data in the compressed bitstream segments. Doing so would involve decoding the whole image, and this is completely out of <em>jpylyzer</em>’s scope. As a result, it is possible that a JP2 that passes each of <em>jpylyzer</em>’s tests will nevertheless fail to render correctly in a viewer application.</p>


<h3 id="recommendations-for-use-in-quality-assurance-workflows">Recommendations for use in quality assurance workflows</h3>


<p>Because of the foregoing, a thorough JP2 quality assurance workflow should not rely on <em>jpylyzer</em> (or any other format validator) alone, but it should include other tests as well. Some obvious examples are:</p>


<ul>
<li><p>A rendering test that checks if a file renders at all</p></li>
<li><p>Format migration workflows (e.g. TIFF to JP2) should ideally also include some comparison between source and destination images (e.g. a pixel-wise comparison)</p></li>
</ul>


<p>Conversely, an image that successfully passes a rendering test or pixel-wise comparison may still contain problematic features (e.g. incorrect colour space information), so validation, rendering tests and pixel-wise comparisons are really complementary to each other.</p>


<h3 id="note-on-icc-profile-support">Note on ICC profile support</h3>


<p>The support of ICC profiles in JP2 was recently extended through an <a href="https://www.itu.int/rec/T-REC-T.800-201303-P!Amd6/en">amendment</a> to the standard. These changes are taken into account by <em>jpylyzer</em>, which is in line with the most recent version of the (updated) standard.</p>


<h2 id="outline">Outline of this User Manual</h2>


<p>We start by describing the <a href="#installation">installation process</a> of <em>jpylyzer</em> for Windows and Unix-based systems. We then explain its <a href="#using-jpylyzer">basic usage</a>, either as a command-line tool, or as an importable Python module. This is followed by a brief overview of <a href="#structure-jp2">the structure of the JP2 format</a> and its ‘box’ structure, and an explanation of <em>Jpylyzer</em>’s <a href="#output-format">output format</a>. The final sections give a detailed description of the tests that <em>jpylyzer</em> performs for validation, and the properties that are reported in the output. The <a href="#jp2-box-by-box">penultimate section</a> does this for all ‘boxes’, except the ‘Contiguous Codestream’ box, which is given a <a href="#contiguous-codestream-box-chapter">section of its own</a>.</p>


<h2 id="funding">Funding</h2>


<p>The development of <em>jpylyzer</em> was funded by the EU FP 7 project SCAPE (SCAlable Preservation Environments). More information about this project can be found here:</p>


<p><a href="https://www.scape-project.eu/">https://www.scape-project.eu/</a></p>


<h2 id="license">License</h2>


<p><em>Jpylyzer</em> is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see:</p>


<p><a href="https://www.gnu.org/licenses/">https://www.gnu.org/licenses/</a></p>


<p>On Debian systems, the complete text of the GNU Lesser General Public License version 3 can be found in:</p>


<pre><code>/usr/share/common-licenses/LGPL-3</code></pre>


<h1 id="installation">Installation and set-up</h1>


<h2 id="obtaining-the-software">Obtaining the software</h2>


<p>To obtain the latest version of the software please use the download links at the <em>jpylyzer</em> homepage:</p>


<p><a href="https://jpylyzer.openpreservation.org/" class="uri">https://jpylyzer.openpreservation.org/</a></p>


<p>You have three options:</p>


<ol type="1">
<li><p>Install the software with the <em>Pip</em> package manager. This works on all platforms (Windows, Linux, Mac, etc.), but you need to have the Python interpreter available on your system. Jpylyzer is compatible with Python 2.7, and Python 3.2 and more recent (Python 3.0 and 3.1 are not supported).</p></li>
<li><p>Alternatively, for Windows users there is also a set of stand-alone binaries<a href="#fn1" class="footnote-ref" id="fnref1" role="doc-noteref"><sup>1</sup></a>. These allow you to run <em>jpylyzer</em> as an executable Windows application, without any need for installing Python. This option is particularly useful for Windows users who cannot (or don’t want to) install software on their system.</p></li>
<li><p>For Linux users Debian packages are available.</p></li>
</ol>


<p>These options are described in the following sub-sections.</p>


<h2 id="installation-pip">Installation with Pip (Linux/Unix, Windows, Mac OS X)</h2>


<h3 id="general-installation-procedure">General installation procedure</h3>


<p>First make sure you have a recent version of <em>pip</em>. Then install <em>jpylyzer</em> with the following command:</p>


<pre><code>pip install jpylyzer</code></pre>


<h3 id="single-user-installation-linux">Single user installation (Linux)</h3>


<p>On most Linux systems the above command needs to be run as super user (see below). If you don’t want this use the below command for a single-user install:</p>


<pre><code>pip install jpylyzer --user</code></pre>


<p>This will install the software to the <code>.local</code> folder (hidden by default!) in your home directory (<code>~/.local</code>). Next try to run <em>jpylyzer</em> by entering:</p>


<pre><code>jpylyzer</code></pre>


<p>Most likely this will result in:</p>


<pre><code>jpylyzer: command not found</code></pre>


<p>If this happens, add the directory <code>~/.local/bin</code> (which is where the jpylyzer command-line tool is installed) to the <code>PATH</code> environment variable (you only need to do this once). To do this, locate the (hidden) file <code>.profile</code> in you home directory (<code>~/</code>), and open it in a text editor. Then add the following lines at the end of the file:</p>


<pre><code># set PATH so it includes the user's .local bin if it exists
if [ -d "$HOME/.local/bin" ] ; then
    PATH="$HOME/.local/bin:$PATH"
fi</code></pre>


<p>Save the file, log out of your session and then log in again. Open a command terminal and type:</p>


<pre><code>jpylyzer</code></pre>


<p>If all went well you now see this:</p>


<pre><code>usage: jpylyzer [-h] [--format FMT] [--legacyout] [--mix {1,2}] [--nopretty]
          [--nullxml] [--recurse] [--packetmarkers] [--verbose]
          [--version] [--wrapper]
          jp2In [jp2In ...]
jpylyzer: error: the following arguments are required: jp2In</code></pre>


<p>Which means that the installation was successful!</p>


<h3 id="global-installation-linux">Global installation (Linux)</h3>


<p>Simply enter:</p>


<pre><code>sudo -H pip install jpylyzer</code></pre>


<p>No further configuration is needed in this case.</p>


<h3 id="note-on-pre-releases">Note on pre-releases</h3>


<p>The above command lines will only install stable versions of jpylyzer. In order to install the latest pre-release, add the <code>--pre</code> switch. For example:</p>


<pre><code>sudo -H pip install jpylyzer --pre</code></pre>


<h2 id="installation-windows">Installation of Windows binaries (Windows only)</h2>


<p>Download the binary using the link on the <em>jpylyzer</em> homepage. Unzip the contents of this file to an empty folder on your PC. <em>Jpylyzer</em> should now be ready for use.</p>


<h3 id="testing-the-installation">Testing the installation</h3>


<p>To test your installation, open a Command Prompt (‘DOS prompt’) and type:</p>


<pre><code>%jpylyzerPath%\jpylyzer</code></pre>


<p>In the above command, replace <em>%jpylyzerPath%</em> with the full path to the <em>jpylyzer</em> installation directory (i.e. the directory that contains ‘jpylyzer.exe’ and its associated files). For example, if you extracted the files to directory <code>c:\tools\jpylyzer</code>, the command would become:</p>


<pre><code>c:\tools\jpylyzer\jpylyzer</code></pre>


<p>Executing this command should result in the following screen output:</p>


<pre><code>usage: jpylyzer [-h] [--format FMT] [--legacyout] [--mix {1,2}] [--nopretty]
          [--nullxml] [--recurse] [--packetmarkers] [--verbose]
          [--version] [--wrapper]
          jp2In [jp2In ...]
jpylyzer: error: the following arguments are required: jp2In</code></pre>


<h3 id="running-jpylyzer-without-typing-the-full-path">Running jpylyzer without typing the full path</h3>


<p>Optionally, you may also want to add the full path of the <em>jpylyzer</em> installation directory to the Windows ’Path’ environment variable. Doing so allows you to run <em>jpylyzer</em> from any directory on your PC without having to type the full path. In Windows 7 you can do this by selecting ‘settings’ from the ‘Start’ menu; then go to ‘control panel’/’system’ and go to the ‘advanced’ tab. Click on the ‘environment variables’ button. Finally, locate the ‘Path’ variable in the ‘system variables’ window, click on ‘Edit’ and add the full <em>jpylyzer</em> path (this requires local Administrator privileges). The settings take effect on any newly opened command prompt.</p>


<h2 id="installation-debian">Installation of Debian packages (Ubuntu/Linux)</h2>


<p>For Linux, Debian packages of <em>jpylyzer</em> exist. To install, simply download the <em>.deb</em> file, double-click on it and select <em>Install Package</em>. Alternatively you can also do this in the command terminal by typing:</p>


<pre><code>sudo dpkg -i opf-jpylyzer_2.0.0_all.deb</code></pre>


<p>In both cases you need to have administrative privileges.</p>


<p>For <em>Ubuntu</em> and <em>Debian</em> alternative packages are available in the official release channels. To install simply run the following commands:</p>


<pre><code>sudo apt-get update
sudo apt-get install python-jpylyzer</code></pre>


<h1 id="using-jpylyzer">Using <em>jpylyzer</em></h1>


<h2 id="using-overview">Overview</h2>


<p>This section describes the general use of <em>jpylyzer</em>. The first sub-sections cover the use of <em>jpylyzer</em> as a command-line tool and as an importable Python module.</p>


<h2 id="command-line-usage">Command-line usage</h2>


<p>This section explains <em>jpylyzer</em>’s general command-line interface. For the sake of brevity, full paths to <em>jpylyzer</em> are omitted. This means that, depending on your system and settings, you may have to substitute each occurrence of ‘jpylyzer’ with its full path, the corresponding Windows binary, or a combination of both. The following examples illustrate this:</p>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">This User Manual</th>
<th style="text-align: left;">jpylyzer</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">Substitution example Linux</td>
<td style="text-align: left;"><code>/home/jpylyzer/jpylyzer</code></td>
</tr>
<tr class="even">
<td style="text-align: left;">Substitution example Windows binaries</td>
<td style="text-align: left;"><code>c:\tools\jpylyzer\jpylyzer</code></td>
</tr>
</tbody>
</table>


<p>Furthermore, command line arguments that are given between square brackets (example: <code>[-h]</code>) are optional.</p>


<h3 id="synopsis">Synopsis</h3>


<p><em>Jpylyzer</em> can be invoked using the following command-line arguments:</p>


<pre><code>usage: jpylyzer [-h] [--format FMT] [--legacyout] [--mix {1,2}] [--nopretty]
          [--nullxml] [--recurse] [--packetmarkers] [--verbose]
          [--version] [--wrapper]
          jp2In [jp2In ...]</code></pre>


<h4 id="positional-arguments">Positional arguments</h4>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">Argument</th>
<th style="text-align: left;">Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;"><code>jp2In</code></td>
<td style="text-align: left;">input JP2 image(s), may be one or more (whitespace-separated) path expressions; prefix wildcard (*) with backslash (\) in Linux</td>
</tr>
</tbody>
</table>


<h4 id="optional-arguments">Optional arguments</h4>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">Argument</th>
<th style="text-align: left;">Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;"><code>[-h, --help]</code></td>
<td style="text-align: left;">show help message and exit</td>
</tr>
<tr class="even">
<td style="text-align: left;"><code>[--format FMT]</code></td>
<td style="text-align: left;">validation format; allowed values are <code>jp2</code> (used by default) and <code>j2c</code> (which activates raw codestream validation)</td>
</tr>
<tr class="odd">
<td style="text-align: left;"><code>[--mix {1,2}]</code></td>
<td style="text-align: left;">report additional output in NISO MIX format (version 1.0 or 2.0)</td>
</tr>
<tr class="even">
<td style="text-align: left;"><code>[--legacyout]</code></td>
<td style="text-align: left;">report output in jpylyzer 1.x format (provided for backward compatibility only)</td>
</tr>
<tr class="odd">
<td style="text-align: left;"><code>[--nopretty]</code></td>
<td style="text-align: left;">suppress pretty-printing of XML output</td>
</tr>
<tr class="even">
<td style="text-align: left;"><code>[--nullxml]</code></td>
<td style="text-align: left;">extract null-terminated XML content from XML and UUID boxes(doesn’t affect validation)</td>
</tr>
<tr class="odd">
<td style="text-align: left;"><code>[--recurse, -r]</code></td>
<td style="text-align: left;">when analysing a directory, recurse into subdirectories (implies <code>--wrapper</code> if <code>--legacyout</code> is used)</td>
</tr>
<tr class="even">
<td style="text-align: left;"><code>[--packetmarkers]</code></td>
<td style="text-align: left;">Report packet-level codestream markers (plm, ppm, plt, ppt)</td>
</tr>
<tr class="odd">
<td style="text-align: left;"><code>[--verbose]</code></td>
<td style="text-align: left;">report test results in verbose format</td>
</tr>
<tr class="even">
<td style="text-align: left;"><code>[-v, --version]</code></td>
<td style="text-align: left;">show program’s version number and exit</td>
</tr>
<tr class="odd">
<td style="text-align: left;"><code>[--wrapper, -w]</code></td>
<td style="text-align: left;">wrap output for individual image(s) in ‘results’ XML element (deprecated from jpylyzer 2.x onward, only takes effect if <code>--legacyout</code> is used)</td>
</tr>
</tbody>
</table>


<p>Note that the input can either be a single image, a space-separated sequence of images, a pathname expression that includes multiple images, or any combination of the above. For example, the following command will process one single image:</p>


<pre><code>jpylyzer rubbish.jp2</code></pre>


<p>The next example shows how to process all files with a ‘jp2’ extension in the current directory:</p>


<pre><code>jpylyzer *.jp2</code></pre>


<p>Note that on Unix/Linux based systems pathname expressions may not work properly unless you wrap them in quotation marks:</p>


<pre><code>jpylyzer "*.jp2"</code></pre>


<h3 id="output-redirection">Output redirection</h3>


<p>All output (except warning and system error messages) is directed to the standard output device (stdout). By default this is the console screen. Use your platform’s standard output redirection operators to redirect output to a file. The most common situation will be to redirect the output of one invocation of <em>jpylyzer</em> to an XML file, which can be done with the ‘&gt;’ operator (both under Windows and Linux):</p>


<pre><code>jpylyzer jp2In &gt; outputFile</code></pre>


<p>E.g. the following command will run <em>jpylyzer</em> on image ‘rubbish.jp2’ and redirects the output to file ‘rubbish.xml’:</p>


<pre><code>jpylyzer rubbish.jp2 &gt; rubbish.xml</code></pre>


<p>The format of the XML output is described <a href="#output-format">here</a>.</p>


<h3 id="format-option">‘format’ option</h3>


<p>By default, <em>jpylyzer</em> validates against the <em>JP2</em> format specification. Starting with version 2.0, <em>jpylyzer</em> can also validate raw JPEG 2000 codestreams that are not wrapped inside a <em>JP2</em> container. For codestream validation, use the <code>--format</code> option with value <code>j2c</code>, e.g.:</p>


<pre><code>jpylyzer --format j2c rubbish.j2c &gt; rubbish.xml</code></pre>


<h3 id="mix-option">‘mix’ option</h3>


<p>When this option is used, <em>jpylyzer</em> reports additional output in <a href="https://www.loc.gov/standards/mix/"><em>NISO MIX</em></a> format. This option takes one argument that defines whether <em>MIX</em> 1.0 or <em>MIX</em> 2.0 is used. For example, the following command will result in <em>MIX</em> 2.0 output:</p>


<pre><code>jpylyzer --mix 2 rubbish.jp2 &gt; rubbish.xml</code></pre>


<p>The <em>MIX</em> output is wrapped inside a <em>file/propertiesExtension</em> element. Note that <em>MIX</em> output is <em>only</em> written for files that are valid JP2 (files that are not valid result in an empty <em>propertiesExtension</em> element). Also, the <code>--mix</code> option is ignored if <code>--format</code> is set to <code>j2c</code>, or if <code>--legacyout</code> (see below) is used.</p>


<h3 id="legacyout-option">‘legacyout’ option</h3>


<p>The output format of <em>jpylyzer</em> has changed in version 2.0, which may break existing workflows that expect output in 1.x format. For backward compatibility the <code>--legacyout</code> option results in output that follows the old 1.x format. Note that codestream validation is disabled if you use this option.</p>


<h3 id="recurse-option">‘recurse’ option</h3>


<p>If the <code>--recurse</code> option is used, <em>jpylyzer</em> will recursively traverse all subdirectories of a filepath expression. E.g:</p>


<pre><code>jpylyzer /home/myJP2s/*.jp2 &gt; rubbish.xml</code></pre>


<p>In this case <em>jpylyzer</em> analyses all files that have a <em>.jp2</em> extension in directory <em>/home/myJP2s</em> and all its subdirectories.</p>


<h3 id="packetmarkers-option">‘packetmarkers’ option</h3>


<p>When this option is enabled, jpylyzer will report the properties of the following packet-level codestream markers:</p>


<ul>
<li>PLM (packet length, main header) marker</li>
<li>PPM (packed packet headers, main header) marker</li>
<li>PLT (packet length, tile-part header) marker</li>
<li>PPT (packed packet headers, tile-part header) marker</li>
</ul>


<p>By default these are excluded from the output, in order to prevent excessive output size.</p>


<h3 id="wrapper-option-deprecated">‘wrapper’ option (deprecated)</h3>


<p>This deprecated option is included for backward-compatibility, and only takes effect if <code>--legacyout</code> (see above) is used.By default, the <em>jpylyzer</em> 1.x releases would create a separate XML tree for each analysed image, without any overarching hierarchy. For multiple-image pathname expressions this resulted in output that was <strong>not</strong> well-formed XML. The <code>--legacyout</code> option still results in this is behaviour. For example:</p>


<pre><code>jpylyzer --legacyout rubbish.jp2 garbage.jp2 &gt; rubbish.xml</code></pre>


<p>In this case, the file ‘rubbish.xml’ contains a succession of two XML trees, which by itself is not well-formed XML. The <code>--wrapper</code> option is provided to create valid XML instead:</p>


<pre><code>jpylyzer --legacyout --wrapper rubbish.jp2 garbage.jp2 &gt; rubbish.xml</code></pre>


<p>In the above case the XML trees of the individual images are wrapped inside a ‘results’ element. When the <code>--recurse</code> option is used, jpylyzer will automatically wrap the output in a ‘results’ element, so there’s no need to specify <code>--wrapper</code> in that case.</p>


<p>Starting with version 2.0, <em>jpylyzer</em> <em>always</em> generates well-formed XML (unless the <code>--legacyout</code> option is used), which makes the <code>--wrapper</code> option largely obsolete, apart from cases where the ‘old’ behaviour is needed for backward-compatibility reasons.</p>


<h3 id="nullxml-option">‘nullxml’ option</h3>


<p>The <em>nullxml</em> option was added to enable extraction of XML content that is terminated by a null-byte. By default <em>jpylyzer</em> doesn’t report the XML in that case, because it throws an exception in the XML parser. Apparently some old versions of the Kakadu demo applications would erroneously add a null-byte to embedded XML, so this option can be used to force extraction for images that are affected by this.</p>


<h3 id="user-warnings">User warnings</h3>


<p>Under the following conditions <em>jpylyzer</em> will print a user warning to the standard error device (typically the console screen):</p>


<h4 id="no-images-to-check">No images to check</h4>


<p>If there are no input images to check (typically because the value of jp2In refers to a non-existent file), the following warning message is shown:</p>


<pre><code>User warning: no images to check!</code></pre>


<h4 id="unsupported-box">Unsupported box</h4>


<p>In some cases you will see the following warning message:</p>


<pre><code>User warning: ignoring 'boxName' (validator function not yet implemented)</code></pre>


<p>The reason for this: a JP2 file is made up of units that are called ‘boxes’. This is explained in more detail <a href="#structure-jp2">here</a>. Each ‘box’ has its own dedicated validator function. At this stage validator functions are still missing for a small number of (optional) boxes. <em>Jpylyzer</em> will display the above warning message if it encounters a (yet) unsupported box. Any unsupported boxes are simply ignored, and the remainder of the file will be analyzed (and validated) normally.</p>


<h4 id="error-while-processing-a-file">Error while processing a file</h4>


<p>In rare cases you may come across one of the following messages:</p>


<pre><code>User warning: memory error (file size too large)</code></pre>


<p>Memory errors may occur for (very) large images. If you get this warning, try using a machine with more RAM. Also, a machine’s chip architecture and the operating system may put constraints on the amount of memory that can be allocated.</p>


<p>The following warning indicates an input error:</p>


<pre><code>User warning: I/O error (cannot open file)</code></pre>


<p>Finally, the following messages most likely indicate a jpylyzer bug:</p>


<pre><code>User warning:runtime error (please report to developers)</code></pre>


<p>and:</p>


<pre><code>User warning: unknown error (please report to developers)</code></pre>


<p>If you ever run into either of these two errors, please get in touch with the jpylyzer developers. The easiest way to do this is to create a new issue at:</p>


<p><a href="https://github.com/openpreserve/jpylyzer/issues" class="uri">https://github.com/openpreserve/jpylyzer/issues</a></p>


<h4 id="unknown-box">Unknown box</h4>


<p>Occasionally, you may see this warning message:</p>


<pre><code>User warning: ignoring unknown box</code></pre>


<p>This happens if <em>jpylyzer</em> encounters a box that is not defined by JPEG 2000 Part 1. It should be noted that, to a large extent, JPEG 2000 Part 1 permits the presence of boxes that are defined outside the standard. Again, <em>jpylyzer</em> will simply ignore these and process all other boxes normally.</p>


<h2 id="using-as-python-module">Using <em>jpylyzer</em> as a Python module</h2>


<p>Instead of using <em>jpylyzer</em> from the command-line, you can also import it as a module in your own Python programs. To do so, install jpylyzer with <em>pip</em>. Then import <em>jpylyzer</em> into your code by adding:</p>


<pre><code>from jpylyzer import jpylyzer</code></pre>


<p>Subsequently you can call any function that is defined in <em>jpylyzer.py</em>. In practice you will most likely only need the <em>checkOneFile</em> function. The following minimal script shows how this works:</p>


<pre><code>#! /usr/bin/env python

from jpylyzer import jpylyzer

# Define JP2
myFile = "/home/johan/jpylyzer-test-files/aware.jp2"

# Analyse with jpylyzer, result to Element object
myResult = jpylyzer.checkOneFile(myFile)

# Return image height value
imageHeight = myResult.findtext('./properties/jp2HeaderBox/imageHeaderBox/height')
print(imageHeight)</code></pre>


<p>Here, <em>myResult</em> is an <em>Element</em> object that can either be used directly, or converted to XML using the <em>ElementTree</em> module<a href="#fn2" class="footnote-ref" id="fnref2" role="doc-noteref"><sup>2</sup></a>. The structure of the element object follows the XML output that described <a href="#output-format">here</a>.</p>


<p>For validation a raw JPEG 2000 codestreams, call the <em>checkOneFile</em> function with the additional <em>validationFormat</em> argument, and set it to <code>j2c</code>:</p>


<pre><code># Define Codestream
myFile = "/home/johan/jpylyzer-test-files/rubbish.j2c"

# Analyse with jpylyzer, result to Element object
myResult = jpylyzer.checkOneFile(myFile, 'j2c')</code></pre>


<h2 id="java-integration">Java integration</h2>


<p>It is possible to integrate <em>jpylyzer</em> into Java applications. A test class that shows how this works is included in the source repo <a href="https://github.com/openpreserve/jpylyzer/tree/master/jpylyzer/java_demo/CallJpylyzer.java">here</a>. This requires <a href="https://www.jython.org/">Jython</a>. Note that you may run into performance issues with (very) large images in this case, as Jython does not support <a href="https://docs.python.org/3/library/mmap.html">memory mapping</a>, so make sure you’ve got plenty of RAM available.</p>


<h1 id="structure-jp2">Structure of a JP2 file</h1>


<h2 id="structure-scope">Scope of this section</h2>


<p>This section gives a brief overview of the JP2 file format. A basic understanding of the general structure of JP2 is helpful for appreciating how <em>jpylyzer</em> performs its validation. It will also make it easier to understand <em>jpylyzer</em>‘s extracted properties, as these are reported as a hierarchical tree that corresponds to the internal structure of JP2.</p>


<p>For an exhaustive description of every detail of the format you are advised to consult Annex I (‘JP2 file format syntax’) and Annex A (‘Codestream syntax’) of ISO/IEC 15444-1.</p>


<h2 id="general-format-structure">General format structure</h2>


<p>At the highest level, a JP2 file is made up of a collection of <em>boxes</em>. A <em>box</em> can be thought of as the fundamental building block of the format. Some boxes (‘superboxes’) are containers for other boxes. The Figure below gives an overview of the top-level boxes in a JP2 file.</p>


<figure>
<img src="images/jp2FormatStructure.png" alt="Top-level overview of a JP2 file. Boxes with dashed borders are optional."/><figcaption aria-hidden="true">Top-level overview of a JP2 file. Boxes with dashed borders are optional.</figcaption>
</figure>


<p>A number of things here are noteworthy to point out:</p>


<ul>
<li><p>Some of these boxes are required, whereas others (indicated with dashed lines in the Figure) are optional.</p></li>
<li><p>The order in which the boxes appear in the file is subject to some constraints (e.g. the first box in a JP2 must always be a ‘Signature’ box, followed by a ‘File Type’ box).</p></li>
<li><p>Some boxes may have multiple instances (e.g. ‘Contiguous Codestream’ box), whereas others must be unique (e.g. ‘JP2 Header’ box).</p></li>
</ul>


<p>More specific details can be found in the standard. The important thing here is that requirements like the above are something that should be verified by a validator, and this is exactly what <em>jpylyzer</em> does at the highest level of its validation procedure.</p>


<h2 id="general-box-structure">General structure of a box</h2>


<p>All boxes are defined by a generic binary structure, which is illustrated by the following Figure:</p>


<figure>
<img src="images/boxStructure.png" alt="General structure of a box."/><figcaption aria-hidden="true">General structure of a box.</figcaption>
</figure>


<p>Most boxes are made up of the following three components:</p>


<ol type="1">
<li><p>A fixed-length ‘box length’ field that indicates the total size of the box (in bytes).</p></li>
<li><p>A fixed-length ‘box type’ field which specifies the type of information that can be found in this box</p></li>
<li><p>The box contents, which contains the actual information within the box. Its internal format depends on the box type. The box contents of a ‘superbox’ will contain its child boxes (which can be parsed recursively).</p></li>
</ol>


<p>In some cases a box will also contain an ‘extended box length field’. This field is needed if the size of a box exceeds 2<sup>32</sup>-1 bytes, which is the maximum value that can be stored in the 4-byte ‘box length’ field.</p>


<h2 id="defined-boxes">Defined boxes in JP2</h2>


<p>The following Table (taken from Table I.2 in ISO/IEC 15444-1, with minor modifications) lists all boxes that are defined in the standard. Addition signs in the ‘box name’ column indicate boxes that are children of a ‘superbox’.</p>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">Box name</th>
<th style="text-align: left;">Superbox</th>
<th style="text-align: left;">Required?</th>
<th style="text-align: left;">Purpose</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">JPEG 2000 Signature box</td>
<td style="text-align: left;">No</td>
<td style="text-align: left;">Required</td>
<td style="text-align: left;">Identifies the file as being part of the JPEG 2000 family of files.</td>
</tr>
<tr class="even">
<td style="text-align: left;">File Type box</td>
<td style="text-align: left;">No</td>
<td style="text-align: left;">Required</td>
<td style="text-align: left;">Specifies file type, version and compatibility information, including specifying if this file is a conforming JP2 file or if it can be read by a conforming JP2 reader.</td>
</tr>
<tr class="odd">
<td style="text-align: left;">JP2 Header box</td>
<td style="text-align: left;">Yes</td>
<td style="text-align: left;">Required</td>
<td style="text-align: left;">Contains a series of boxes that contain header-type information about the file.</td>
</tr>
<tr class="even">
<td style="text-align: left;">+ Image Header box</td>
<td style="text-align: left;">No</td>
<td style="text-align: left;">Required</td>
<td style="text-align: left;">Specifies the size of the image and other related fields.</td>
</tr>
<tr class="odd">
<td style="text-align: left;">+ Bits Per Component box</td>
<td style="text-align: left;">No</td>
<td style="text-align: left;">Optional</td>
<td style="text-align: left;">Specifies the bit depth of the components in the file in cases where the bit depth is not constant across all components.</td>
</tr>
<tr class="even">
<td style="text-align: left;">+ Colour Specification box</td>
<td style="text-align: left;">No</td>
<td style="text-align: left;">Required</td>
<td style="text-align: left;">Specifies the colourspace of the image.</td>
</tr>
<tr class="odd">
<td style="text-align: left;">+ Palette box</td>
<td style="text-align: left;">No</td>
<td style="text-align: left;">Optional</td>
<td style="text-align: left;">Specifies the palette which maps a single component in index space to a multiple-component image.</td>
</tr>
<tr class="even">
<td style="text-align: left;">+ Component Mapping box</td>
<td style="text-align: left;">No</td>
<td style="text-align: left;">Optional</td>
<td style="text-align: left;">Specifies the mapping between a palette and codestream components.</td>
</tr>
<tr class="odd">
<td style="text-align: left;">+ Channel Definition box</td>
<td style="text-align: left;">No</td>
<td style="text-align: left;">Optional</td>
<td style="text-align: left;">Specifies the type and ordering of the components within the codestream, as well as those created by the application of a palette.</td>
</tr>
<tr class="even">
<td style="text-align: left;">+ Resolution box</td>
<td style="text-align: left;">Yes</td>
<td style="text-align: left;">Optional</td>
<td style="text-align: left;">Contains the grid resolution.</td>
</tr>
<tr class="odd">
<td style="text-align: left;">++ Capture Resolution box</td>
<td style="text-align: left;">No</td>
<td style="text-align: left;">Optional</td>
<td style="text-align: left;">Specifies the grid resolution at which the image was captured.</td>
</tr>
<tr class="even">
<td style="text-align: left;">++ Default Display Resolution box</td>
<td style="text-align: left;">No</td>
<td style="text-align: left;">Optional</td>
<td style="text-align: left;">Specifies the default grid resolution at which the image should be displayed.</td>
</tr>
<tr class="odd">
<td style="text-align: left;">Contiguous Codestream box</td>
<td style="text-align: left;">No</td>
<td style="text-align: left;">Required</td>
<td style="text-align: left;">Contains the codestream.</td>
</tr>
<tr class="even">
<td style="text-align: left;">Intellectual Property box</td>
<td style="text-align: left;">No</td>
<td style="text-align: left;">Optional</td>
<td style="text-align: left;">Contains intellectual property information about the image.</td>
</tr>
<tr class="odd">
<td style="text-align: left;">XML box</td>
<td style="text-align: left;">No</td>
<td style="text-align: left;">Optional</td>
<td style="text-align: left;">Provides a tool by which vendors can add XML formatted information to a JP2 file.</td>
</tr>
<tr class="even">
<td style="text-align: left;">UUID box</td>
<td style="text-align: left;">No</td>
<td style="text-align: left;">Optional</td>
<td style="text-align: left;">Provides a tool by which vendors can add additional information to a file without risking conflict with other vendors.</td>
</tr>
<tr class="odd">
<td style="text-align: left;">UUID Info box</td>
<td style="text-align: left;">Yes</td>
<td style="text-align: left;">Optional</td>
<td style="text-align: left;">Provides a tool by which a vendor may provide access to additional information associated with a UUID.</td>
</tr>
<tr class="even">
<td style="text-align: left;">+ UUID List box</td>
<td style="text-align: left;">No</td>
<td style="text-align: left;">Optional</td>
<td style="text-align: left;">Specifies a list of UUIDs.</td>
</tr>
<tr class="odd">
<td style="text-align: left;">+ URL box</td>
<td style="text-align: left;">No</td>
<td style="text-align: left;">Optional</td>
<td style="text-align: left;">Specifies a URL.</td>
</tr>
</tbody>
</table>


<p>A JP2 file may contain boxes that are not defined by the standard. Such boxes are simply skipped and ignored by conforming reader applications.</p>


<h1 id="output-format">Output format</h1>


<p>This section explains <em>jpylyzer</em>’s output format.</p>


<h2 id="output-format-overview">Overview</h2>


<p><em>Jpylyzer</em> generates its output in XML format, which is defined by <a href="https://jpylyzer.openpreservation.org/jpylyzer-v-2-1.xsd">the schema that can be found here</a>. The following Figure shows the output structure:</p>


<figure>
<img src="images/outputStructure.png" alt="Jpylyzer’s XML output structure. ‘box’ elements under ‘tests’ and ‘properties’ contain further sub-elements."/><figcaption aria-hidden="true">Jpylyzer’s XML output structure. ‘box’ elements under ‘tests’ and ‘properties’ contain further sub-elements.</figcaption>
</figure>


<p>The root element (<em>jpylyzer</em>) contains the following child elements:</p>


<ol type="1">
<li><p>one <em>toolInfo</em> element, which contains information about <em>jpylyzer</em></p></li>
<li><p>one or more <em>file</em> elements, each of which contain information about about the analysed files</p></li>
</ol>


<p>The XML output is pretty-printed. You can use the <code>--nopretty</code> switch to disable pretty-printing (this produces smaller files and may give a slightly better performance).</p>


<h2 id="toolinfo-element">toolInfo element</h2>


<p>This element holds information about <em>jpylyzer</em>. Currently it contains the following sub-elements:</p>


<ul>
<li><p><em>toolName</em>: name of the analysis tool (i.e. <em>jpylyzer</em> or <em>jpylyzer.exe</em>, depending on the platform used)</p></li>
<li><p><em>toolVersion</em>: version of <em>jpylyzer</em> (<em>jpylyzer</em> uses a date versioning scheme)</p></li>
</ul>


<h2 id="file-element">file element</h2>


<p>The <em>file</em> element contains the following sub-elements:</p>


<ol type="1">
<li><p><em>fileInfo</em>: general information about the analysed file</p></li>
<li><p><em>statusInfo</em>: information about the status of <em>jpylyzer</em>’s validation attempt</p></li>
<li><p><em>isValid</em>: outcome of the validation</p></li>
<li><p><em>tests</em>: outcome of the individual tests that are part of the validation process (organised by box)</p></li>
<li><p><em>properties</em>: image properties (organised by box)</p></li>
<li><p><em>propertiesExtension</em>: wrapper element for NISO <em>MIX</em> output (only if the <code>--mix</code> option is used)</p></li>
</ol>


<h2 id="fileinfo-element">fileInfo element</h2>


<p>This element holds general information about the analysed file. Currently it contains the following sub-elements:</p>


<ul>
<li><p><em>filename</em>: name of the analysed file without its path (e.g. “rubbish.jp2”)</p></li>
<li><p><em>filePath</em>: name of the analysed file, including its full absolute path (e.g. “d:\data\images\rubbish.jp2”)</p></li>
<li><p><em>fileSizeInBytes</em>: file size in bytes</p></li>
<li><p><em>fileLastModified</em>: last modified date and time</p></li>
</ul>


<h2 id="statusinfo-element">statusInfo element</h2>


<p>This element holds general information about about the status of <em>jpylyzer</em>’s attempt at validating a file. It tells you whether the validation process could be completed without any internal <em>jpylyzer</em> errors. It contains the following sub-elements:</p>


<ul>
<li><p><em>success</em>: a Boolean flag that indicates whether the validation attempt completed normally (“True”) or not (“False”). A value of “False” indicates an internal error that prevented <em>jpylyzer</em> from validating the file.</p></li>
<li><p><em>failureMessage</em>: if the validation attempt failed (value of <em>success</em> equals “False”), this field gives further details about the reason of the failure. Examples are:</p>
<ul>
<li><code>memory error (file size too large)</code></li>
<li><code>runtime error (please report to developers)</code></li>
<li><code>unknown error (please report to developers)</code></li>
</ul></li>
</ul>


<h2 id="isvalid-element">isValid element</h2>


<p>This element contains the results of the validation. If a file passed all the tests (i.e. all tests returned “True”, see <a href="#tests-element">here</a>) it is most likely valid, and the value of <em>isValid</em> will be “True”. Its value is “False” otherwise. The element has a <em>format</em> attribute, which defines the validation format (set by the <code>--format</code> command-line option). The <em>format</em> attribute can have the following values:</p>


<ul>
<li>“jp2” (JP2 validation)</li>
<li>“j2c” (raw codestream validation)</li>
</ul>


<h2 id="tests-element">tests element</h2>


<p>This element is reserved to hold the outcomes of all the individual tests that <em>jpylyzer</em> performs to assess whether a file is valid JP2. The results are organised in a hierarchical tree that corresponds to JP2’s box structure. Each individual test can have two values:</p>


<ul>
<li><p>“True” if a file passed the test.</p></li>
<li><p>“False” if a file failed the test.</p></li>
</ul>


<p>If a file passed <em>all</em> tests, this is an indication that it is most likely valid JP2. In that case, the <a href="#isvalid-element"><em>isValid</em> element</a> has a value of “True” (and “False” in all other cases). These tests are all explained <a href="#jp2-box-by-box">here</a> and <a href="#contiguous-codestream-box-chapter">here</a>.</p>


<h3 id="default-and-verbose-reporting-of-test-results">Default and verbose reporting of test results</h3>


<p>By default, <em>jpylyzer</em> only reports any tests that failed (i.e. returned “False”), including the corresponding part of the box structure. For a valid JP2 the tests element will be empty. If the –verbose flag is used, the results of <em>all</em> tests are included (including those that returned “True”)<a href="#fn3" class="footnote-ref" id="fnref3" role="doc-noteref"><sup>3</sup></a>.</p>


<h2 id="properties-element">properties element</h2>


<p>This element contains the extracted image properties, which are organised in a hierarchical tree that corresponds to JP2’s box structure. See <a href="#jp2-box-by-box">here</a> and <a href="#contiguous-codestream-box-chapter">here</a> for a description of the reported properties.</p>


<h2 id="propertiesExtension-element">propertiesExtension element</h2>


<p>This optional element is reserved for output in alternative formats. Currently it is used to wrap output in NISO <em>MIX</em> format if the <code>--mix</code> option is used. See the <a href="https://www.loc.gov/standards/mix/"><em>MIX</em> documentation</a> for a description of the reported elements.</p>


<h1 id="jp2-box-by-box">JP2: box by box</h1>


<p>The following two sections provide a detailed explanation of <em>jpylyzer</em>’s functionality and its output. In particular, the following two aspects are addressed:</p>


<ol type="1">
<li><p>The reported properties</p></li>
<li><p>The tests that <em>jpylyzer</em> performs to establish the validity of a file.</p></li>
</ol>


<h2 id="about-properties-tests-trees">About the properties and tests trees</h2>


<p>The ‘properties’ element in <em>jpylyzer</em>’s output holds a hierarchical tree structure that contains all extracted properties. The ‘tests’ tree follows the same structure. The hierarchy reflects JP2’s box structure (explained <a href="#structure-jp2">here</a>): each box is represented by a corresponding output element that contains the corresponding property entries. If a box is a superbox, the output element will contain child elements for each child box. For some boxes, the output contains further sub-elements. This applies in particular to the Contiguous Codestream box, since its contents are more complex than any of the other boxes. Also, if a Colour Specification box contains an embedded ICC profile, the properties of the ICC profile are stored in a separate sub-element. In addition to this, one ‘property’ that is reported by <em>jpylyzer</em> (the compression ratio) is not actually extracted from any particular box. Instead, it is calculated from the file size and some properties from the Header boxes. As a result, it is reported separately in the root of the properties tree.</p>


<h3 id="naming-of-properties">Naming of properties</h3>


<p>The naming of the reported properties largely follows the standard (ISO/IEC 15444-1). Some minor differences follow from the fact that the standard does have any consistent use of text case, whereas <em>jpylyzer</em> uses lower camel case. In addition, some parameters in the standard are compound units that aggregate a number of Boolean ‘switches’, where no names are provided for each individual switch. An example of this is the <em>Scod</em> (coding style) parameter in the codestream header, which contains three switches that define the use of precincts, start-of-packet markers and end-of-packet markers. For cases like these <em>jpylyzer</em> uses its own (largely self-descriptive) names (which are all documented in these sections).</p>


<h2 id="jpeg2000-signature-box">JPEG 2000 Signature box</h2>


<p>This box contains information that allows identification of the file as being part of the JPEG 2000 family of file formats.</p>


<h3 id="element-name">Element name</h3>


<p>signatureBox</p>


<h3 id="reported-properties">Reported properties</h3>


<p>None (box only holds JPEG 2000 signature, which includes non-printable characters)</p>


<h3 id="tests">Tests</h3>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">Test name</th>
<th style="text-align: left;">True if</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">boxLengthIsValid</td>
<td style="text-align: left;">Size of box contents equals 4 bytes</td>
</tr>
<tr class="even">
<td style="text-align: left;">signatureIsValid</td>
<td style="text-align: left;">Signature equals 0x0d0a870a</td>
</tr>
</tbody>
</table>


<h2 id="file-type-box">File Type box</h2>


<p>This box specifies file type, version and compatibility information, including specifying if this file is a conforming JP2 file or if it can be read by a conforming JP2 reader.</p>


<h3 id="element-name-1">Element name</h3>


<p>fileTypeBox</p>


<h3 id="reported-properties-1">Reported properties</h3>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">Property</th>
<th style="text-align: left;">Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">br</td>
<td style="text-align: left;">Brand</td>
</tr>
<tr class="even">
<td style="text-align: left;">minV</td>
<td style="text-align: left;">Minor version</td>
</tr>
<tr class="odd">
<td style="text-align: left;">cL<sup>*</sup></td>
<td style="text-align: left;">Compatibility field (repeatable)</td>
</tr>
</tbody>
</table>


<h3 id="tests-1">Tests</h3>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">Test name</th>
<th style="text-align: left;">True if</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">boxLengthIsValid</td>
<td style="text-align: left;">(Size of box – 8) /4 is a whole number (integer)</td>
</tr>
<tr class="even">
<td style="text-align: left;">brandIsValid</td>
<td style="text-align: left;"><em>br</em> equals 0x6a703220 (“jp2”)</td>
</tr>
<tr class="odd">
<td style="text-align: left;">minorVersionIsValid</td>
<td style="text-align: left;"><em>minV</em> equals 0</td>
</tr>
<tr class="even">
<td style="text-align: left;">compatibilityListIsValid</td>
<td style="text-align: left;">Sequence of compatibility (<em>cL</em>) fields includes one entry that equals 0x6a703220 (“jp2”)</td>
</tr>
</tbody>
</table>


<h2 id="jp2-header-box">JP2 Header box (superbox)</h2>


<p>This box is a superbox that holds a series of boxes that contain header-type information about the file.</p>


<h3 id="element-name-2">Element name</h3>


<p>jp2HeaderBox</p>


<h3 id="reported-properties-2">Reported properties</h3>


<p>Since this is a superbox, it contains a number of child boxes. These are represented as child elements in the properties tree:</p>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">Child element</th>
<th style="text-align: left;">Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;"><a href="#image-header-box">imageHeaderBox</a></td>
<td style="text-align: left;">Properties from Image Header box (required)</td>
</tr>
<tr class="even">
<td style="text-align: left;"><a href="#bits-per-component-box">bitsPerComponentBox</a></td>
<td style="text-align: left;">Properties from Bits Per Component box (optional)</td>
</tr>
<tr class="odd">
<td style="text-align: left;"><a href="#colour-specification-box">ColourSpecificationBox</a></td>
<td style="text-align: left;">Properties from Colour Specification box (required)</td>
</tr>
<tr class="even">
<td style="text-align: left;"><a href="#palette-box">paletteBox</a></td>
<td style="text-align: left;">Properties from Palette box (optional)</td>
</tr>
<tr class="odd">
<td style="text-align: left;"><a href="#component-mapping-box">componentMappingBox</a></td>
<td style="text-align: left;">Properties from Component Mapping box (optional)</td>
</tr>
<tr class="even">
<td style="text-align: left;"><a href="#channel-definition-box">channelDefinitionBox</a></td>
<td style="text-align: left;">Properties from Channel Definition box (optional)</td>
</tr>
<tr class="odd">
<td style="text-align: left;"><a href="#resolution-box">resolutionBox</a></td>
<td style="text-align: left;">Properties from Resolution box (optional)</td>
</tr>
</tbody>
</table>


<h3 id="tests-2">Tests</h3>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">Test name</th>
<th style="text-align: left;">True if</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">containsImageHeaderBox</td>
<td style="text-align: left;">Box contains required Image Header box</td>
</tr>
<tr class="even">
<td style="text-align: left;">containsColourSpecificationBox</td>
<td style="text-align: left;">Box contains required Colour Specification box</td>
</tr>
<tr class="odd">
<td style="text-align: left;">containsBitsPerComponentBox</td>
<td style="text-align: left;">Box contains Bits Per Component Box, which is required if <em>bPCSign</em> and <em>bPCDepth</em> in Image Header Box equal 1 and 128, respectively (test is skipped otherwise)</td>
</tr>
<tr class="even">
<td style="text-align: left;">firstJP2HeaderBoxIsImageHeaderBox</td>
<td style="text-align: left;">First child box is Image Header Box</td>
</tr>
<tr class="odd">
<td style="text-align: left;">noMoreThanOneImageHeaderBox</td>
<td style="text-align: left;">Box contains no more than one Image Header box</td>
</tr>
<tr class="even">
<td style="text-align: left;">noMoreThanOneBitsPerComponentBox</td>
<td style="text-align: left;">Box contains no more than one Bits Per Component box</td>
</tr>
<tr class="odd">
<td style="text-align: left;">noMoreThanOnePaletteBox</td>
<td style="text-align: left;">Box contains no more than one Palette box</td>
</tr>
<tr class="even">
<td style="text-align: left;">noMoreThanOneComponentMappingBox</td>
<td style="text-align: left;">Box contains no more than one Component Mapping box</td>
</tr>
<tr class="odd">
<td style="text-align: left;">noMoreThanOneChannelDefinitionBox</td>
<td style="text-align: left;">Box contains no more than one Channel Definition box</td>
</tr>
<tr class="even">
<td style="text-align: left;">noMoreThanOneResolutionBox</td>
<td style="text-align: left;">Box contains no more than one Resolution box</td>
</tr>
<tr class="odd">
<td style="text-align: left;">colourSpecificationBoxesAreContiguous</td>
<td style="text-align: left;">In case of multiple Colour Specification boxes, they appear contiguously in the JP2 Header box</td>
</tr>
<tr class="even">
<td style="text-align: left;">paletteAndComponentMappingBoxesOnlyTogether</td>
<td style="text-align: left;">Box contains a Palette box (only if Component Mapping box is present); box contains a Component Mapping box (only if Palette box is present)</td>
</tr>
</tbody>
</table>


<h2 id="image-header-box">Image Header box (child of JP2 Header box)</h2>


<p>This box specifies the size of the image and other related fields.</p>


<h3 id="element-name-3">Element name</h3>


<p>imageHeaderBox</p>


<h3 id="reported-properties-3">Reported properties</h3>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">Property</th>
<th style="text-align: left;">Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">height</td>
<td style="text-align: left;">Image height in pixels</td>
</tr>
<tr class="even">
<td style="text-align: left;">width</td>
<td style="text-align: left;">Image width in pixels</td>
</tr>
<tr class="odd">
<td style="text-align: left;">nC</td>
<td style="text-align: left;">Number of image components</td>
</tr>
<tr class="even">
<td style="text-align: left;">bPCSign</td>
<td style="text-align: left;">Indicates whether image components are signed or unsigned</td>
</tr>
<tr class="odd">
<td style="text-align: left;">bPCDepth</td>
<td style="text-align: left;">Number of bits per component</td>
</tr>
<tr class="even">
<td style="text-align: left;">c</td>
<td style="text-align: left;">Compression type</td>
</tr>
<tr class="odd">
<td style="text-align: left;">unkC</td>
<td style="text-align: left;">Colourspace Unknown field (“yes” if colourspace of image data is unknown; “no” otherwise)</td>
</tr>
<tr class="even">
<td style="text-align: left;">iPR</td>
<td style="text-align: left;">Intellectual Property field (“yes” if image contains intellectual property rights information; “no” otherwise)</td>
</tr>
</tbody>
</table>


<h3 id="tests-3">Tests</h3>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">Test name</th>
<th style="text-align: left;">True if</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">boxLengthIsValid</td>
<td style="text-align: left;">Size of box contents equals 14 bytes</td>
</tr>
<tr class="even">
<td style="text-align: left;">heightIsValid</td>
<td style="text-align: left;"><em>height</em> is within range [1, 2<sup>32</sup> - 1]</td>
</tr>
<tr class="odd">
<td style="text-align: left;">widthIsValid</td>
<td style="text-align: left;"><em>width</em> is within range [1, 2<sup>32</sup> - 1]</td>
</tr>
<tr class="even">
<td style="text-align: left;">nCIsValid</td>
<td style="text-align: left;"><em>nC</em> is within range [1, 16384]</td>
</tr>
<tr class="odd">
<td style="text-align: left;">bPCIsValid</td>
<td style="text-align: left;"><em>bPCDepth</em> is within range [1,38] OR <em>bPCSign</em> equals 255 (in the latter case the bit depth is variable)</td>
</tr>
<tr class="even">
<td style="text-align: left;">cIsValid</td>
<td style="text-align: left;"><em>c</em> equals 7 (“jpeg2000”)</td>
</tr>
<tr class="odd">
<td style="text-align: left;">unkCIsValid</td>
<td style="text-align: left;"><em>unkC</em> equals 0 (“no”) or 1 (“yes”)</td>
</tr>
<tr class="even">
<td style="text-align: left;">iPRIsValid</td>
<td style="text-align: left;"><em>iPR</em> equals 0 (“no”) or 1 (“yes”)</td>
</tr>
</tbody>
</table>


<h2 id="bits-per-component-box">Bits Per Component box (child of JP2 Header box)</h2>


<p>This (optional) box specifies the bit depth of the components in the file in cases where the bit depth is not constant across all components.</p>


<h3 id="element-name-4">Element name</h3>


<p>bitsPerComponentBox</p>


<h3 id="reported-properties-4">Reported properties</h3>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">Property</th>
<th style="text-align: left;">Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">bPCSign<sup>*</sup></td>
<td style="text-align: left;">Indicates whether image component is signed or unsigned (repeated for all components)</td>
</tr>
<tr class="even">
<td style="text-align: left;">bPCDepth<sup>*</sup></td>
<td style="text-align: left;">Number of bits for this component (repeated for all components)</td>
</tr>
</tbody>
</table>


<h3 id="tests-4">Tests</h3>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">Test name</th>
<th style="text-align: left;">True if</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">bPCIsValid<sup>*</sup></td>
<td style="text-align: left;"><em>bPCDepth</em> is within range [1,38] (repeated for all components)</td>
</tr>
</tbody>
</table>


<h2 id="colour-specification-box">Colour Specification box (child of JP2 Header box)</h2>


<p>This box specifies the colourspace of the image.</p>


<h3 id="element-name-5">Element name</h3>


<p>colourSpecificationBox</p>


<h3 id="reported-properties-5">Reported properties</h3>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">Property</th>
<th style="text-align: left;">Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">meth</td>
<td style="text-align: left;">Specification method. Indicates whether colourspace of this image is defined as an enumerated colourspace or using a (restricted) ICC profile.</td>
</tr>
<tr class="even">
<td style="text-align: left;">prec</td>
<td style="text-align: left;">Precedence</td>
</tr>
<tr class="odd">
<td style="text-align: left;">approx</td>
<td style="text-align: left;">Colourspace approximation</td>
</tr>
<tr class="even">
<td style="text-align: left;">enumCS (if meth equals “Enumerated”)</td>
<td style="text-align: left;">Enumerated colourspace (as descriptive text string)</td>
</tr>
<tr class="odd">
<td style="text-align: left;">icc (if meth equals “Restricted ICC” or “Any ICC”<a href="#fn4" class="footnote-ref" id="fnref4" role="doc-noteref"><sup>4</sup></a>)</td>
<td style="text-align: left;">Properties of ICC profile as child element (see below)</td>
</tr>
</tbody>
</table>


<h3 id="reported-properties-of-icc-profiles">Reported properties of ICC profiles</h3>


<p>If the colour specification box contains an embedded ICC profile, <em>jpylyzer</em> will also report the following properties (which are all grouped in an “icc” sub-element in the properties tree). An exhaustive explanation of these properties is given in the ICC specification (ISO 15076-1 / ICC.1:2004-10). Note that <em>jpylyzer</em> does <em>not</em> validate embedded ICC profiles (even though it does check if a specific ICC profile is allowed in JP2)!</p>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">Property</th>
<th style="text-align: left;">Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">profileSize</td>
<td style="text-align: left;">Size of ICC profile in bytes</td>
</tr>
<tr class="even">
<td style="text-align: left;">preferredCMMType</td>
<td style="text-align: left;">Preferred CMM type</td>
</tr>
<tr class="odd">
<td style="text-align: left;">profileVersion</td>
<td style="text-align: left;">Profile version. Format: “majorRevision.minorRevision.bugFixRevision”</td>
</tr>
<tr class="even">
<td style="text-align: left;">profileClass</td>
<td style="text-align: left;">Profile/device class</td>
</tr>
<tr class="odd">
<td style="text-align: left;">colourSpace</td>
<td style="text-align: left;">Colourspace</td>
</tr>
<tr class="even">
<td style="text-align: left;">profileConnectionSpace</td>
<td style="text-align: left;">Profile connection space</td>
</tr>
<tr class="odd">
<td style="text-align: left;">dateTimeString</td>
<td style="text-align: left;">Date / time string. Format: “YYYY/MM/DD, h:m:s”</td>
</tr>
<tr class="even">
<td style="text-align: left;">profileSignature</td>
<td style="text-align: left;">Profile signature</td>
</tr>
<tr class="odd">
<td style="text-align: left;">primaryPlatform</td>
<td style="text-align: left;">Primary platform</td>
</tr>
<tr class="even">
<td style="text-align: left;">embeddedProfile</td>
<td style="text-align: left;">Flag that indicates whether profile is embedded in file (“yes”/”no”)</td>
</tr>
<tr class="odd">
<td style="text-align: left;">profileCannotBeUsedIndependently</td>
<td style="text-align: left;">Flag that indicates whether profile can<em>not</em> (!) be used independently from the embedded colour data (“yes”/”no”)</td>
</tr>
<tr class="even">
<td style="text-align: left;">deviceManufacturer</td>
<td style="text-align: left;">Identifies a device manufacturer</td>
</tr>
<tr class="odd">
<td style="text-align: left;">deviceModel</td>
<td style="text-align: left;">Identifies a device model</td>
</tr>
<tr class="even">
<td style="text-align: left;">transparency</td>
<td style="text-align: left;">Indicates whether device medium is reflective or transparent</td>
</tr>
<tr class="odd">
<td style="text-align: left;">glossiness</td>
<td style="text-align: left;">Indicates whether device medium is glossy or matte</td>
</tr>
<tr class="even">
<td style="text-align: left;">polarity</td>
<td style="text-align: left;">Indicates whether device medium is positive or negative</td>
</tr>
<tr class="odd">
<td style="text-align: left;">colour</td>
<td style="text-align: left;">Indicates whether device medium is colour or black and white</td>
</tr>
<tr class="even">
<td style="text-align: left;">renderingIntent</td>
<td style="text-align: left;">Rendering intent</td>
</tr>
<tr class="odd">
<td style="text-align: left;">connectionSpaceIlluminantX</td>
<td style="text-align: left;">Profile connection space illuminant X</td>
</tr>
<tr class="even">
<td style="text-align: left;">connectionSpaceIlluminantY</td>
<td style="text-align: left;">Profile connection space illuminant Y</td>
</tr>
<tr class="odd">
<td style="text-align: left;">connectionSpaceIlluminantZ</td>
<td style="text-align: left;">Profile connection space illuminant Z</td>
</tr>
<tr class="even">
<td style="text-align: left;">profileCreator</td>
<td style="text-align: left;">Identifies creator of profile</td>
</tr>
<tr class="odd">
<td style="text-align: left;">profileID</td>
<td style="text-align: left;">Profile checksum (as hexadecimal string)</td>
</tr>
<tr class="even">
<td style="text-align: left;">tag<sup>*</sup></td>
<td style="text-align: left;">Signature of profile tag (repeated for all tags in the profile)</td>
</tr>
<tr class="odd">
<td style="text-align: left;">description</td>
<td style="text-align: left;">Profile description (extracted from ‘desc’ tag)</td>
</tr>
</tbody>
</table>


<h3 id="tests-5">Tests</h3>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">Test name</th>
<th style="text-align: left;">True if</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">methIsValid</td>
<td style="text-align: left;"><em>meth</em> equals 1 (enumerated colourspace) or 2 (restricted ICC profile)</td>
</tr>
<tr class="even">
<td style="text-align: left;">precIsValid</td>
<td style="text-align: left;"><em>prec</em> equals 0</td>
</tr>
<tr class="odd">
<td style="text-align: left;">approxIsValid</td>
<td style="text-align: left;"><em>approx</em> equals 0</td>
</tr>
<tr class="even">
<td style="text-align: left;">enumCSIsValid (if meth equals “Enumerated”)</td>
<td style="text-align: left;"><em>enumCS</em> equals 16 (“sRGB”), 17 (“greyscale”) or 18 (“sYCC”)</td>
</tr>
<tr class="odd">
<td style="text-align: left;">iccSizeIsValid (if meth equals “Restricted ICC”)</td>
<td style="text-align: left;">Actual size of embedded ICC profile equals value of profileSize field in ICC header</td>
</tr>
<tr class="even">
<td style="text-align: left;">iccPermittedProfileClass (if meth equals “Restricted ICC”)</td>
<td style="text-align: left;">ICC profile class is “input device” or “display device”<a href="#fn5" class="footnote-ref" id="fnref5" role="doc-noteref"><sup>5</sup></a></td>
</tr>
<tr class="odd">
<td style="text-align: left;">iccNoLUTBasedProfile (if meth equals “Restricted ICC”)</td>
<td style="text-align: left;">ICC profile type is not N-component LUT based (which is not allowed in JP2)</td>
</tr>
</tbody>
</table>


<h2 id="palette-box">Palette box (child of JP2 Header box)</h2>


<p>This (optional) box specifies the palette which maps a single component in index space to a multiple-component image.</p>


<h3 id="element-name-6">Element name</h3>


<p>paletteBox</p>


<h3 id="reported-properties-6">Reported properties</h3>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">Property</th>
<th style="text-align: left;">Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">nE</td>
<td style="text-align: left;">Number of entries in the table</td>
</tr>
<tr class="even">
<td style="text-align: left;">nPC</td>
<td style="text-align: left;">Number of palette columns</td>
</tr>
<tr class="odd">
<td style="text-align: left;">bSign<sup>*</sup></td>
<td style="text-align: left;">Indicates whether values created by this palette column are signed or unsigned (repeated for all columns)</td>
</tr>
<tr class="even">
<td style="text-align: left;">bDepth<sup>*</sup></td>
<td style="text-align: left;">Bit depth of values created by this palette column (repeated for all columns)</td>
</tr>
<tr class="odd">
<td style="text-align: left;">cP<sup>**</sup></td>
<td style="text-align: left;">Value for this entry (repeated for all columns, and for the number of entries)</td>
</tr>
</tbody>
</table>


<h3 id="tests-6">Tests</h3>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">Test name</th>
<th style="text-align: left;">True if</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">nEIsValid</td>
<td style="text-align: left;"><em>nE</em> is within range [0,1024]</td>
</tr>
<tr class="even">
<td style="text-align: left;">nPCIsValid</td>
<td style="text-align: left;"><em>nPC</em> is within range [1,255]</td>
</tr>
<tr class="odd">
<td style="text-align: left;">bDepthIsValid<sup>*</sup></td>
<td style="text-align: left;"><em>bDepth</em> is within range [1,38] (repeated for all columns)</td>
</tr>
</tbody>
</table>


<h2 id="component-mapping-box">Component Mapping box (child of JP2 Header box)</h2>


<p>This (optional) box specifies the mapping between a palette and codestream components.</p>


<h3 id="element-name-7">Element name</h3>


<p>componentMappingBox</p>


<h3 id="reported-properties-7">Reported properties</h3>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">Property</th>
<th style="text-align: left;">Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">cMP<sup>*</sup></td>
<td style="text-align: left;">Component index (repeated for all channels)</td>
</tr>
<tr class="even">
<td style="text-align: left;">mTyp<sup>*</sup></td>
<td style="text-align: left;">Specifies how channel is generated from codestream component (repeated for all channels)</td>
</tr>
<tr class="odd">
<td style="text-align: left;">pCol<sup>*</sup></td>
<td style="text-align: left;">Palette component index (repeated for all channels)</td>
</tr>
</tbody>
</table>


<h3 id="tests-7">Tests</h3>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">Test name</th>
<th style="text-align: left;">True if</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">cMPIsValid</td>
<td style="text-align: left;"><em>cMP</em> is within range [0,16384]</td>
</tr>
<tr class="even">
<td style="text-align: left;">mTypIsValid<sup>*</sup></td>
<td style="text-align: left;"><em>mTyp</em> is within range [0,1] (repeated for all channels)</td>
</tr>
<tr class="odd">
<td style="text-align: left;">pColIsValid<sup>*</sup></td>
<td style="text-align: left;"><em>pCol</em> is 0 if <em>mTyp</em> is 0 (repeated for all channels)</td>
</tr>
</tbody>
</table>


<h2 id="channel-definition-box">Channel Definition box (child of JP2 Header box)</h2>


<p>This (optional) box specifies the type and ordering of the components within the codestream, as well as those created by the application of a palette.</p>


<h3 id="element-name-8">Element name</h3>


<p>channelDefinitionBox</p>


<h3 id="reported-properties-8">Reported properties</h3>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">Property</th>
<th style="text-align: left;">Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">n</td>
<td style="text-align: left;">Number of channel descriptions</td>
</tr>
<tr class="even">
<td style="text-align: left;">cN<sup>*</sup></td>
<td style="text-align: left;">Channel index (repeated for all channels)</td>
</tr>
<tr class="odd">
<td style="text-align: left;">cTyp<sup>*</sup></td>
<td style="text-align: left;">Channel type (repeated for all channels)</td>
</tr>
<tr class="even">
<td style="text-align: left;">cAssoc<sup>*</sup></td>
<td style="text-align: left;">Channel association (repeated for all channels)</td>
</tr>
</tbody>
</table>


<h3 id="tests-8">Tests</h3>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">Test name</th>
<th style="text-align: left;">True if</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">nIsValid</td>
<td style="text-align: left;"><em>n</em> is within range [1, 65535]</td>
</tr>
<tr class="even">
<td style="text-align: left;">boxLengthIsValid</td>
<td style="text-align: left;">(Size of box – 2) / equals 6*<em>n</em></td>
</tr>
<tr class="odd">
<td style="text-align: left;">cNIsValid<sup>*</sup></td>
<td style="text-align: left;"><em>cN</em> is within range [0, 65535] (repeated for all channels)</td>
</tr>
<tr class="even">
<td style="text-align: left;">cTypIsValid<sup>*</sup></td>
<td style="text-align: left;"><em>cType</em> is within range [0, 65535] (repeated for all channels)</td>
</tr>
<tr class="odd">
<td style="text-align: left;">cAssocIsValid<sup>*</sup></td>
<td style="text-align: left;"><em>cAssoc</em> is within range [0, 65535] (repeated for all channels)</td>
</tr>
</tbody>
</table>


<h2 id="resolution-box">Resolution box (child of JP2 Header box, superbox)</h2>


<p>This (optional) box contains the grid resolution.</p>


<h3 id="element-name-9">Element name</h3>


<p>resolutionBox</p>


<h3 id="reported-properties-9">Reported properties</h3>


<p>Since this is a superbox, it contains one or two child boxes. These are represented as child elements in the properties tree:</p>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">Child element</th>
<th style="text-align: left;">Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;"><a href="#capture-resolution-box">captureResolutionBox</a></td>
<td style="text-align: left;">Properties from Capture Resolution box</td>
</tr>
<tr class="even">
<td style="text-align: left;"><a href="#display-resolution-box">displayResolutionBox</a></td>
<td style="text-align: left;">Properties from Default Display Resolution box</td>
</tr>
</tbody>
</table>


<h3 id="tests-9">Tests</h3>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">Test name</th>
<th style="text-align: left;">True if</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">containsCaptureOrDisplayResolutionBox</td>
<td style="text-align: left;">Box contains either a Capture Resolution box or a Default Display Resolution box, or both</td>
</tr>
<tr class="even">
<td style="text-align: left;">noMoreThanOneCaptureResolutionBox</td>
<td style="text-align: left;">Box contains no more than one Capture Resolution box</td>
</tr>
<tr class="odd">
<td style="text-align: left;">noMoreThanOneDisplayResolutionBox</td>
<td style="text-align: left;">Box contains no more than one Default Display Resolution box</td>
</tr>
</tbody>
</table>


<h2 id="capture-resolution-box">Capture Resolution box (child of Resolution box)</h2>


<p>This (optional) box specifies the grid resolution at which the image was captured.</p>


<h3 id="element-name-10">Element name</h3>


<p>captureResolutionBox</p>


<h3 id="reported-properties-10">Reported properties</h3>


<p>Resolution information in this box is stored as a set of vertical and horizontal numerators, denominators and exponents. <em>Jpylyzer</em> also reports the corresponding grid resolutions in pixels per meter and pixels per inch, which are calculated from these values.</p>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">Property</th>
<th style="text-align: left;">Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">vRcN</td>
<td style="text-align: left;">Vertical grid resolution numerator</td>
</tr>
<tr class="even">
<td style="text-align: left;">vRcD</td>
<td style="text-align: left;">Vertical grid resolution denominator</td>
</tr>
<tr class="odd">
<td style="text-align: left;">hRcN</td>
<td style="text-align: left;">Horizontal grid resolution numerator</td>
</tr>
<tr class="even">
<td style="text-align: left;">hRcD</td>
<td style="text-align: left;">Horizontal grid resolution denominator</td>
</tr>
<tr class="odd">
<td style="text-align: left;">vRcE</td>
<td style="text-align: left;">Vertical grid resolution exponent</td>
</tr>
<tr class="even">
<td style="text-align: left;">hRcE</td>
<td style="text-align: left;">Horizontal grid resolution exponent</td>
</tr>
<tr class="odd">
<td style="text-align: left;">vRescInPixelsPerMeter</td>
<td style="text-align: left;">Vertical grid resolution, expressed in pixels per meter<a href="#fn6" class="footnote-ref" id="fnref6" role="doc-noteref"><sup>6</sup></a></td>
</tr>
<tr class="even">
<td style="text-align: left;">hRescInPixelsPerMeter</td>
<td style="text-align: left;">Horizontal grid resolution, expressed in pixels per meter<a href="#fn7" class="footnote-ref" id="fnref7" role="doc-noteref"><sup>7</sup></a></td>
</tr>
<tr class="odd">
<td style="text-align: left;">vRescInPixelsPerInch</td>
<td style="text-align: left;">Vertical grid resolution, expressed in pixels per inch<a href="#fn8" class="footnote-ref" id="fnref8" role="doc-noteref"><sup>8</sup></a></td>
</tr>
<tr class="even">
<td style="text-align: left;">hRescInPixelsPerInch</td>
<td style="text-align: left;">Horizontal grid resolution, expressed in pixels per inch<a href="#fn9" class="footnote-ref" id="fnref9" role="doc-noteref"><sup>9</sup></a></td>
</tr>
</tbody>
</table>


<h3 id="tests-10">Tests</h3>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">Test name</th>
<th style="text-align: left;">True if</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">boxLengthIsValid</td>
<td style="text-align: left;">Size of box contents equals 10 bytes</td>
</tr>
<tr class="even">
<td style="text-align: left;">vRcNIsValid</td>
<td style="text-align: left;"><em>vRcN</em> is within range [1,65535]</td>
</tr>
<tr class="odd">
<td style="text-align: left;">vRcDIsValid</td>
<td style="text-align: left;"><em>vRcD</em> is within range [1,65535]</td>
</tr>
<tr class="even">
<td style="text-align: left;">hRcNIsValid</td>
<td style="text-align: left;"><em>hRcN</em> is within range [1,65535]</td>
</tr>
<tr class="odd">
<td style="text-align: left;">hRcDIsValid</td>
<td style="text-align: left;"><em>hRcD</em> is within range [1,65535]</td>
</tr>
<tr class="even">
<td style="text-align: left;">vRcEIsValid</td>
<td style="text-align: left;"><em>vRcE</em> is within range [-127,128]</td>
</tr>
<tr class="odd">
<td style="text-align: left;">hRcEIsValid</td>
<td style="text-align: left;"><em>hRcE</em> is within range [-127,128]</td>
</tr>
</tbody>
</table>


<h2 id="display-resolution-box">Default Display Resolution box (child of Resolution box)</h2>


<p>This (optional) box specifies the default grid resolution at which the image should be displayed.</p>


<h3 id="element-name-11">Element name</h3>


<p>displayResolutionBox</p>


<h3 id="reported-properties-11">Reported properties</h3>


<p>Resolution information in this box is stored as a set of vertical and horizontal numerators, denominators and exponents. <em>Jpylyzer</em> also reports the corresponding grid resolutions in pixels per meter and pixels per inch, which are calculated from these values.</p>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">Property</th>
<th style="text-align: left;">Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">vRdN</td>
<td style="text-align: left;">Vertical grid resolution numerator</td>
</tr>
<tr class="even">
<td style="text-align: left;">vRdD</td>
<td style="text-align: left;">Vertical grid resolution denominator</td>
</tr>
<tr class="odd">
<td style="text-align: left;">hRdN</td>
<td style="text-align: left;">Horizontal grid resolution numerator</td>
</tr>
<tr class="even">
<td style="text-align: left;">hRdD</td>
<td style="text-align: left;">Horizontal grid resolution denominator</td>
</tr>
<tr class="odd">
<td style="text-align: left;">vRdE</td>
<td style="text-align: left;">Vertical grid resolution exponent</td>
</tr>
<tr class="even">
<td style="text-align: left;">hRdE</td>
<td style="text-align: left;">Horizontal grid resolution exponent</td>
</tr>
<tr class="odd">
<td style="text-align: left;">vResdInPixelsPerMeter</td>
<td style="text-align: left;">Vertical grid resolution, expressed in pixels per meter<a href="#fn10" class="footnote-ref" id="fnref10" role="doc-noteref"><sup>10</sup></a></td>
</tr>
<tr class="even">
<td style="text-align: left;">hResdInPixelsPerMeter</td>
<td style="text-align: left;">Horizontal grid resolution, expressed in pixels per meter<a href="#fn11" class="footnote-ref" id="fnref11" role="doc-noteref"><sup>11</sup></a></td>
</tr>
<tr class="odd">
<td style="text-align: left;">vResdInPixelsPerInch</td>
<td style="text-align: left;">Vertical grid resolution, expressed in pixels per inch<a href="#fn12" class="footnote-ref" id="fnref12" role="doc-noteref"><sup>12</sup></a></td>
</tr>
<tr class="even">
<td style="text-align: left;">hResdInPixelsPerInch</td>
<td style="text-align: left;">Horizontal grid resolution, expressed in pixels per inch<a href="#fn13" class="footnote-ref" id="fnref13" role="doc-noteref"><sup>13</sup></a></td>
</tr>
</tbody>
</table>


<h3 id="tests-11">Tests</h3>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">Test name</th>
<th style="text-align: left;">True if</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">boxLengthIsValid</td>
<td style="text-align: left;">Size of box contents equals 10 bytes</td>
</tr>
<tr class="even">
<td style="text-align: left;">vRdNIsValid</td>
<td style="text-align: left;"><em>vRdN</em> is within range [1,65535]</td>
</tr>
<tr class="odd">
<td style="text-align: left;">vRdDIsValid</td>
<td style="text-align: left;"><em>vRdD</em> is within range [1,65535]</td>
</tr>
<tr class="even">
<td style="text-align: left;">hRdNIsValid</td>
<td style="text-align: left;"><em>hRdN</em> is within range [1,65535]</td>
</tr>
<tr class="odd">
<td style="text-align: left;">hRdDIsValid</td>
<td style="text-align: left;"><em>hRdD</em> is within range [1,65535]</td>
</tr>
<tr class="even">
<td style="text-align: left;">vRdEIsValid</td>
<td style="text-align: left;"><em>vRdE</em> is within range [-127,128]</td>
</tr>
<tr class="odd">
<td style="text-align: left;">hRdEIsValid</td>
<td style="text-align: left;"><em>hRdE</em> is within range [-127,128]</td>
</tr>
</tbody>
</table>


<h2 id="codestream-box">Contiguous Codestream box</h2>


<p>This box contains the codestream. See <a href="#contiguous-codestream-box-chapter">here</a>.</p>


<h2 id="intellectual-property-box">Intellectual Property box</h2>


<p>This (optional) box contains intellectual property information about the image. The JP2 format specification (ISO/IEC 15444-1) does not provide any specific information about this box, other than stating that “the definition of the format of [its] contents […] is reserved for ISO”. As a result, <em>jpylyzer</em> does not currently include a validator function for this box, which is now simply ignored. <em>Jpylyzer</em> will display a user warning message in that case.</p>


<h2 id="xml-box">XML box</h2>


<p>This (optional) box contains XML formatted information.</p>


<h3 id="element-name-12">Element name</h3>


<p>xmlBox</p>


<h3 id="reported-properties-12">Reported properties</h3>


<p>If the contents of this box are well-formed XML (see ‘tests’ below), the ‘xmlBox’ element in the properties tree will contain the contents of the XML box. Note that, depending on the character encoding of the original XML, it may contain characters that are not allowed in the encoding that is used for <em>jpylyzer</em>’s output. Any such characters will be represented by numerical entity references in the output. If the box contents are not well-formed XML, no properties are reported for this box.</p>


<h3 id="tests-12">Tests</h3>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">Test name</th>
<th style="text-align: left;">True if</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">containsWellformedXML</td>
<td style="text-align: left;">Contents of box are parsable, well-formed XML</td>
</tr>
</tbody>
</table>


<p>Note that <em>jpylyzer</em> does not check whether the XML is <em>valid</em>, as this is not required by the standard. Besides, doing so would make <em>jpylyzer</em> significantly slower for XML that contains references to external schemas and DTDs.</p>


<h2 id="uuid-box">UUID box</h2>


<p>This (optional) box contains additional (binary) information, which may be vendor-specific. Some applications (e.g. Kakadu and ExifTool) also use this box for storing XMP metadata (see Section 1.1.4 in Part 3 of the XMP specification<a href="#fn14" class="footnote-ref" id="fnref14" role="doc-noteref"><sup>14</sup></a>).</p>


<h3 id="element-name-13">Element name</h3>


<p>uuidBox</p>


<h3 id="reported-properties-13">Reported properties</h3>


<p>If the value of <em>uuid</em> indicates the presence of XMP metadata and the contents of this box are well-formed XML, (see ‘tests’ below), the ‘uuidBox’ element in the properties tree will contain the XMP data. Note that, depending on the character encoding of the original XML, it may contain characters that are not allowed in the encoding that is used for <em>jpylyzer</em>’s output. Any such characters will be represented by numerical entity references in the output. In all other cases, the ‘uuidBox’ element will contain a standard string representation the of UUID.</p>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">Property</th>
<th style="text-align: left;">Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">uuid</td>
<td style="text-align: left;">Standard string representation of UUID (<strong>only</strong> if uuid has value other than <em>be7acfcb-97a9-42e8-9c71-999491e3afac</em>). For an explanation of UUIDs see e.g. Leach <em>et al</em>., 2005.</td>
</tr>
<tr class="even">
<td style="text-align: left;">XMP data</td>
<td style="text-align: left;">XMP metadata (<strong>only</strong> if uuid has value <em>be7acfcb-97a9-42e8-9c71-999491e3afac</em>)</td>
</tr>
</tbody>
</table>


<p>Note that except for the XMP case, <em>jpylyzer</em> will not be able to report any information on the actual contents of this box, since it is defined outside of the scope of JPEG 2000.</p>


<h3 id="tests-13">Tests</h3>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">Test name</th>
<th style="text-align: left;">True if</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">boxLengthIsValid</td>
<td style="text-align: left;">Size of box contents is greater than 16 bytes</td>
</tr>
<tr class="even">
<td style="text-align: left;">containsWellformedXML</td>
<td style="text-align: left;">Contents of box are parsable, well-formed XML (this test is <strong>only</strong> performed if uuid has value <em>be7acfcb-97a9-42e8-9c71-999491e3afac</em>)</td>
</tr>
</tbody>
</table>


<h2 id="uuid-info-box">UUID Info box (superbox)</h2>


<p>This (optional) box contains additional information associated with a UUID.</p>


<h3 id="element-name-14">Element name</h3>


<p>uuidInfoBox</p>


<h3 id="reported-properties-14">Reported properties</h3>


<p>This is a superbox which contains two child boxes. These are represented as child elements in the properties tree:</p>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">Child element</th>
<th style="text-align: left;">Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;"><a href="#uuid-list-box">uuidListBox</a></td>
<td style="text-align: left;">Properties from UUID List box</td>
</tr>
<tr class="even">
<td style="text-align: left;"><a href="#data-entry-url-box">urlBox</a></td>
<td style="text-align: left;">Properties from Data Entry URL box</td>
</tr>
</tbody>
</table>


<h3 id="tests-14">Tests</h3>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">Test name</th>
<th style="text-align: left;">True if</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">containsOneListBox</td>
<td style="text-align: left;">Box contains exactly one UUID List box</td>
</tr>
<tr class="even">
<td style="text-align: left;">containsOneURLBox</td>
<td style="text-align: left;">Box contains exactly one Data Entry URL box</td>
</tr>
</tbody>
</table>


<h2 id="uuid-list-box">UUID List box (child of UUID Info box)</h2>


<p>This (optional) box specifies a list of UUIDs.</p>


<h3 id="element-name-15">Element name</h3>


<p>uuidListBox</p>


<h3 id="reported-properties-15">Reported properties</h3>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">Property</th>
<th style="text-align: left;">Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">nU</td>
<td style="text-align: left;">Number of UUIDs</td>
</tr>
<tr class="even">
<td style="text-align: left;">uuid<sup>*</sup></td>
<td style="text-align: left;">Standard string representation of UUID (repeated <em>nU</em> times)</td>
</tr>
</tbody>
</table>


<h3 id="tests-15">Tests</h3>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">Test name</th>
<th style="text-align: left;">True if</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">boxLengthIsValid</td>
<td style="text-align: left;">Size of box equals <em>nU</em> * 16 + 2</td>
</tr>
</tbody>
</table>


<h2 id="data-entry-url-box">Data Entry URL box (child of UUID Info box)</h2>


<p>This (optional) box specifies a URL.</p>


<h3 id="element-name-16">Element name</h3>


<p>urlBox</p>


<h3 id="reported-properties-16">Reported properties</h3>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">Property</th>
<th style="text-align: left;">Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">version</td>
<td style="text-align: left;">Version number</td>
</tr>
<tr class="even">
<td style="text-align: left;">loc</td>
<td style="text-align: left;">Location, which specifies a URL of the additional information associated with the UUIDs in the UUID List box that resides in the same UUID Info box</td>
</tr>
</tbody>
</table>


<h3 id="tests-16">Tests</h3>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">Test name</th>
<th style="text-align: left;">True if</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">flagIsValid</td>
<td style="text-align: left;">Three bytes that make up “flag” field equal 0x00 00 00 (‘flag’ is not reported to output because it only contains null bytes)</td>
</tr>
<tr class="even">
<td style="text-align: left;">locIsUTF8</td>
<td style="text-align: left;">Location (URL) can be decoded to UTF-8</td>
</tr>
<tr class="odd">
<td style="text-align: left;">locHasNullTerminator</td>
<td style="text-align: left;">Location (URL) is a null-terminated string</td>
</tr>
</tbody>
</table>


<h2 id="unknown-box-section">Unknown box</h2>


<p>An image may contain boxes that are not defined by ISO/IEC 15444-1. Although <em>jpylyzer</em> ignores such boxes, it will report some minimal info that will allow interested users to identify them to a limited extent.</p>


<h3 id="element-name-17">Element name</h3>


<p>unknownBox</p>


<h3 id="reported-properties-17">Reported properties</h3>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">Property</th>
<th style="text-align: left;">Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">boxType</td>
<td style="text-align: left;">Four-character text string that specifies the type of information that is found in this box (corresponds to <em>TBox</em> in section I.4 of ISO/IEC 15444-1).</td>
</tr>
</tbody>
</table>


<h2 id="top-level-tests-properties">Top-level tests and properties</h2>


<p>This sub-section describes the tests and output for the top file level.</p>


<h3 id="element-name-18">Element name</h3>


<p>properties</p>


<h3 id="reported-properties-18">Reported properties</h3>


<p>The metrics that are listed here are not ‘properties’ in a strict sense; instead they are secondary or derived metrics that are calculated by combining information from different parts / boxes of the file.</p>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">Property</th>
<th style="text-align: left;">Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">compressionRatio</td>
<td style="text-align: left;">Compression ratio</td>
</tr>
</tbody>
</table>


<p>The compression ratio is calculated as the ratio between the size of the uncompressed image data and the actual file size:</p>


<p><math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> <mi>compressionRatio</mi> <mo>=</mo> <mfrac> <mrow> <mi>sizeUncompressed</mi> </mrow> <mrow> <mi>sizeCompressed</mi> </mrow> </mfrac> </mrow> </math></p>


<p>Here, <em>sizeCompressed</em> is simply the file size (<em>fileSizeInBytes</em> in output file’s ‘fileInfo’ element). The uncompressed size (in bytes) can be calculated by multiplying the number of bytes per pixel by the total number of pixels:</p>


<p><math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> <mi>sizeUncompressed</mi> <mo>=</mo> <mfrac> <mrow> <mn>1</mn> </mrow> <mrow> <mn>8</mn> </mrow> </mfrac> <munderover> <mo>∑</mo> <mrow> <mi>i</mi> <mo>=</mo> <mn>1</mn> </mrow> <mi>nC</mi> </munderover> <msub> <mi>bPCDepth</mi> <mi>i</mi> </msub> <mo>•</mo> <mi>height</mi> <mo>•</mo> <mi>width</mi> </mrow> </math></p>


<p>With:</p>


<dl>
<dt>nC</dt>
<dd>number of image components (from Image Header box)
</dd>
<dt>i</dt>
<dd>component index
</dd>
<dt>bPCDepth<sub>i</sub></dt>
<dd>bits per component for component <em>i</em> (from Image Header box or Bits Per Component box)
</dd>
<dt>height</dt>
<dd>image height (from Image Header box)
</dd>
<dt>width</dt>
<dd>image width (from Image Header box)
</dd>
</dl>


<p>In addition, the root of the properties tree contains the elements for all top-level boxes:</p>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">Child element</th>
<th style="text-align: left;">Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;"><a href="#jpeg2000-signature-box">signatureBox</a></td>
<td style="text-align: left;">Properties from JPEG 2000 Signature box</td>
</tr>
<tr class="even">
<td style="text-align: left;"><a href="#file-type-box">fileTypeBox</a></td>
<td style="text-align: left;">Properties from File Type box</td>
</tr>
<tr class="odd">
<td style="text-align: left;"><a href="#jp2-header-box">jp2HeaderBox</a></td>
<td style="text-align: left;">Properties from JP2 Header box</td>
</tr>
<tr class="even">
<td style="text-align: left;"><a href="#contiguous-codestream-box-chapter">contiguousCodestreamBox</a></td>
<td style="text-align: left;">Properties from Contiguous Codestream box</td>
</tr>
<tr class="odd">
<td style="text-align: left;"><a href="#intellectual-property-box">intellectualPropertyBox</a></td>
<td style="text-align: left;">Properties from Intellectual Property box (optional)</td>
</tr>
<tr class="even">
<td style="text-align: left;"><a href="#xml-box">xmlBox</a></td>
<td style="text-align: left;">Properties from XML box (optional)</td>
</tr>
<tr class="odd">
<td style="text-align: left;"><a href="#uuid-box">uuidBox</a></td>
<td style="text-align: left;">Properties from UUID box (optional)</td>
</tr>
<tr class="even">
<td style="text-align: left;"><a href="#uuid-info-box">uuidInfoBox</a></td>
<td style="text-align: left;">Properties from UUID Info box (optional)</td>
</tr>
</tbody>
</table>


<h3 id="tests-17">Tests</h3>


<p>The tests that <em>jpylyzer</em> performs at the root level fall in either of the following two categories:</p>


<ol type="1">
<li><p>Tests for the presence of required top-level boxes, the order in which they appear and restrictions on the number of instances for specific boxes</p></li>
<li><p>Tests for consistency of information in different parts of the file. In particular, a lot of the information in the Image Header box is redundant with information in the codestream header, and <em>jpylyzer</em> performs a number of tests to verify the consistency between these two.</p></li>
</ol>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">Test name</th>
<th style="text-align: left;">True if</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">containsSignatureBox</td>
<td style="text-align: left;">File root contains a JPEG 2000 Signature box</td>
</tr>
<tr class="even">
<td style="text-align: left;">containsFileTypeBox</td>
<td style="text-align: left;">File root contains a File Type box</td>
</tr>
<tr class="odd">
<td style="text-align: left;">containsJP2HeaderBox</td>
<td style="text-align: left;">File root contains a JP2 Header box</td>
</tr>
<tr class="even">
<td style="text-align: left;">containsContiguousCodestreamBox</td>
<td style="text-align: left;">File root contains a Contiguous Codestream box</td>
</tr>
<tr class="odd">
<td style="text-align: left;">containsIntellectualPropertyBox</td>
<td style="text-align: left;">File root contains an Intellectual Property box, which is required if <em>iPR</em> field in Image Header Box equals 1 (test is skipped otherwise)</td>
</tr>
<tr class="even">
<td style="text-align: left;">firstBoxIsSignatureBox</td>
<td style="text-align: left;">First box is JPEG 2000 Signature box</td>
</tr>
<tr class="odd">
<td style="text-align: left;">secondBoxIsFileTypeBox</td>
<td style="text-align: left;">Second box is File Type box</td>
</tr>
<tr class="even">
<td style="text-align: left;">locationJP2HeaderBoxIsValid</td>
<td style="text-align: left;">JP2 Header box is located after File Type Box and before (first) Contiguous Codestream box</td>
</tr>
<tr class="odd">
<td style="text-align: left;">noMoreThanOneSignatureBox</td>
<td style="text-align: left;">File root contains no more than one JPEG 2000 Signature box</td>
</tr>
<tr class="even">
<td style="text-align: left;">noMoreThanOneFileTypeBox</td>
<td style="text-align: left;">File root contains no more than one File Type box</td>
</tr>
<tr class="odd">
<td style="text-align: left;">noMoreThanOneJP2HeaderBox</td>
<td style="text-align: left;">File root contains no more than one JP2 Header box</td>
</tr>
<tr class="even">
<td style="text-align: left;">heightConsistentWithSIZ</td>
<td style="text-align: left;">Value of <em>height</em> from Image Header Box equals <em>ysiz –yOsiz</em> from codestream SIZ header</td>
</tr>
<tr class="odd">
<td style="text-align: left;">widthConsistentWithSIZ</td>
<td style="text-align: left;">Value of <em>width</em> from Image Header Box equals <em>xsiz</em> –<em>xOsiz</em> from codestream SIZ header</td>
</tr>
<tr class="even">
<td style="text-align: left;">nCConsistentWithSIZ</td>
<td style="text-align: left;">Value of <em>nC</em> from Image Header Box equals <em>csiz</em> from codestream SIZ header</td>
</tr>
<tr class="odd">
<td style="text-align: left;">bPCSignConsistentWithSIZ</td>
<td style="text-align: left;">Values of <em>bPCSign</em> from Image Header box (or Bits Per Component box) are equal to corresponding <em>ssizSign</em> values from codestream SIZ header</td>
</tr>
<tr class="even">
<td style="text-align: left;">bPCDepthConsistentWithSIZ</td>
<td style="text-align: left;">Values of <em>bPCDepth</em> from Image Header box (or Bits Per Component box) are equal to corresponding <em>ssizDepth</em> values from codestream SIZ header</td>
</tr>
</tbody>
</table>


<h1 id="contiguous-codestream-box-chapter">Contiguous Codestream box</h1>


<h2 id="codestream-structure">General codestream structure</h2>


<p>The Contiguous Codestream box holds the JPEG 2000 codestream, which contains the actual image data in a JP2.</p>


<h3 id="markers-and-marker-segments">Markers and marker segments</h3>


<p>A codestream is made up of a number of functional entities which are called <em>markers</em> and <em>marker segments</em>. A <em>marker</em> is essentially a 2-byte delimiter that delineates the start or end position of a functional entity. A <em>marker segment</em> is the combination of a marker and a set of associated parameters (<em>segment parameters</em>). However, not every marker has any associated parameters.</p>


<h3 id="general-structure-of-the-codestream">General structure of the codestream</h3>


<p>The codestream is made up of a number of components. The Figure below gives an overview.</p>


<figure>
<img src="images/codestreamStructure.png" alt="General structure of a JPEG 2000 codestream."/><figcaption aria-hidden="true">General structure of a JPEG 2000 codestream.</figcaption>
</figure>


<p>From top to bottom, the Figure shows the following components:</p>


<ol type="1">
<li><p>A <em>start of codestream</em> (SOC) marker, which indicates the start of the codestream</p></li>
<li><p>A main codestream header (which includes a number of header marker segments)</p></li>
<li><p>A sequence of one or more <em>tile parts</em>. Each tile part consists of the following components:</p>
<ol type="a">
<li><p>A <em>start of tile-part</em> (SOT) marker segment, which indicates the start of a tile part, and which also contains index information of the tile part and its associated tile</p></li>
<li><p>Optionally this may be followed by one or more additional tile-part header marker segments</p></li>
<li><p>A <em>start of data</em> (SOD) marker that indicates the start of the bitstream for the current tile part</p></li>
<li><p>The bitstream</p></li>
</ol></li>
<li><p>An ‘end of codestream’ (EOC) marker that indicates the end of the codestream.</p></li>
</ol>


<h2 id="limitations-codestream-validation">Limitations of codestream validation</h2>


<p>It is important to stress here that <em>jpylyzer</em> currently doesn’t support the full set of marker segments that can occur in a codestream. As a result, the validation of codestreams is somewhat limited. These limitations are discussed in this sub-section.</p>


<h3 id="main-codestream-header">Main codestream header</h3>


<p>Annex A of ISO/IEC 15444-1 lists a total of 13 marker segments that can occur in the main codestream header. Most of these are optional. The current version of <em>jpylyzer</em> only offers full support (i.e. reads and validates) for the following main header marker segments (which includes all the required ones):</p>


<ul>
<li><p>Start of codestream (SOC) marker segment (required)</p></li>
<li><p>Image and tile size (SIZ) marker segment (required)</p></li>
<li><p>Coding style default (COD) marker segment (required)</p></li>
<li><p>Coding style component (COC) marker segment (optional)</p></li>
<li><p>Region-of-interest (RGN) marker segment (optional)</p></li>
<li><p>Quantization default (QCD) marker segment (required)</p></li>
<li><p>Quantization component (QCC) marker segment (optional)</p></li>
<li><p>Progression order change (POC) marker segment (optional)</p></li>
<li><p>Component registration (CRG) marker segment (optional)</p></li>
<li><p>Comment (COM) marker segment (optional)</p></li>
</ul>


<p>In addition the codestream header may also contain any of the following marker segments, which are all optional:</p>


<ul>
<li><p>Packet length, main header (PLM) marker segment (optional) <sup>*</sup></p></li>
<li><p>Packed packet headers, main header (PPM) marker segment (optional) <sup>*</sup></p></li>
<li><p>Tile-part lengths (TLM) marker segment (optional) <sup>*</sup></p></li>
</ul>


<p>The optional markers that are marked with an asterisk above are only minimally supported at this stage.</p>


<h3 id="tile-parts">Tile parts</h3>


<p>The tile part validation has similar limitations. The standard lists 11 marker segments that can occur in the tile part header. Currently, <em>jpylyzer</em> only fully supports the following ones:</p>


<ul>
<li><p>Start of tile part (SOT) marker segment (required)</p></li>
<li><p>Coding style default (COD) marker segment (optional)</p></li>
<li><p>Coding style component (COC) marker segment (optional)</p></li>
<li><p>Region-of-interest (RGN) marker segment (optional)</p></li>
<li><p>Quantization default (QCD) marker segment (optional)</p></li>
<li><p>Quantization component (QCC) marker segment (optional)</p></li>
<li><p>Progression order change (POC) marker segment (optional)</p></li>
<li><p>Comment (COM) marker segment (optional)</p></li>
<li><p>Start of data (SOD) marker segment (required)</p></li>
</ul>


<p>In addition the following optional marker segments may also occur:</p>


<ul>
<li><p>Packet length, tile-part header (PLT) marker segment (optional) <sup>*</sup></p></li>
<li><p>Packed packet headers, tile-part header (PPT) marker segment (optional) <sup>*</sup></p></li>
</ul>


<p>The optional markers that are marked with an asterisk above are only minimally supported at this stage: if <em>jpylyzer</em> encounters them, it will include the corresponding element in the <em>properties</em> element of the output. However, <em>jpylyzer</em> does not analyse the contents of these marker segments, which means that the respective elements in the output will be empty.</p>


<h3 id="bit-streams">Bit streams</h3>


<p>In addition to the above limitations, <em>jpylyzer</em> can <em>not</em> be used to establish whether the data in the bitstream are correct (this would require decoding the compressed image data, which is completely out of <em>jpylyzer</em>’s scope)<a href="#fn15" class="footnote-ref" id="fnref15" role="doc-noteref"><sup>15</sup></a>. As a result, if <em>jpylyzer</em> is used as part of a quality assurance workflow, it is recommended to also include an additional check on the image contents<a href="#fn16" class="footnote-ref" id="fnref16" role="doc-noteref"><sup>16</sup></a>. Also, <em>jpylyzer</em> does not perform any checks on marker segments within the bit-stream: start-of packet (SOP) and end-of-packet (EPH) markers.</p>


<h3 id="detection-of-incomplete-or-truncated-codestreams">Detection of incomplete or truncated codestreams</h3>


<p>A JP2’s tile part header contains information that makes it possible to detect incomplete and truncated codestreams in most cases. Depending on the encoder software used, this method may fail for images that only contain one single tile part (i.e. images that do not contain tiling).</p>


<h3 id="current-limitations-of-comment-extraction">Current limitations of comment extraction</h3>


<p>Both the codestream header and the tile part header can contain comment marker segments, which are used for embedding arbitrary binary data or text. <em>Jpylyzer</em> will extract the contents of any comments that are text.</p>


<h2 id="structure-reported-output">Structure of reported output</h2>


<p>The Figure below illustrates the structure of <em>jpylyzer</em>’s codestream-level output.</p>


<figure>
<img src="images/codestreamOutput.png" alt="Structure of codestream-level XML output."/><figcaption aria-hidden="true">Structure of codestream-level XML output.</figcaption>
</figure>


<p>At the top level, the SIZ, COD, QCD and COM marker segments are each represented as individual sub elements. The tile part properties are nested in a <em>tileParts</em> element, where each individual tile part is represented as a separate <em>tilePart</em> sub element.</p>


<h2 id="contiguous-codestream-box">Contiguous Codestream box</h2>


<h3 id="element-name-19">Element name</h3>


<p>contiguousCodestreamBox</p>


<h3 id="reported-properties-19">Reported properties</h3>


<p>The reported properties for this box are organised into a number groups, which are represented as child elements in the properties tree:</p>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">Child element</th>
<th style="text-align: left;">Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;"><a href="#siz-marker">siz</a></td>
<td style="text-align: left;">Properties from the image and tile size (SIZ) marker segment (codestream main header)</td>
</tr>
<tr class="even">
<td style="text-align: left;"><a href="#cod-marker">cod</a></td>
<td style="text-align: left;">Properties from the coding style default (COD) marker segment (codestream main header)</td>
</tr>
<tr class="odd">
<td style="text-align: left;"><a href="#coc-marker">coc</a></td>
<td style="text-align: left;">Properties from the (optional) coding style component (COC) marker segment (codestream main header)</td>
</tr>
<tr class="even">
<td style="text-align: left;"><a href="#rgn-marker">rgn</a></td>
<td style="text-align: left;">Properties from the (optional) region of interest (RGN) marker segment (codestream main header)</td>
</tr>
<tr class="odd">
<td style="text-align: left;"><a href="#qcd-marker">qcd</a></td>
<td style="text-align: left;">Properties from the quantization default (QCD) marker segment (codestream main header)</td>
</tr>
<tr class="even">
<td style="text-align: left;"><a href="#qcc-marker">qcc</a></td>
<td style="text-align: left;">Properties from the (optional) quantization component (QCC) marker segment (codestream main header)</td>
</tr>
<tr class="odd">
<td style="text-align: left;"><a href="#poc-marker">poc</a></td>
<td style="text-align: left;">Properties from the (optional) progression order change (POC) marker segment (codestream main header)</td>
</tr>
<tr class="even">
<td style="text-align: left;"><a href="#crg-marker">crg</a></td>
<td style="text-align: left;">Properties from the (optional) component registration (CRG) marker segment (codestream main header)</td>
</tr>
<tr class="odd">
<td style="text-align: left;"><a href="#com-marker">com</a></td>
<td style="text-align: left;">Properties from the (optional) comment (COM) marker segment (codestream main header)</td>
</tr>
<tr class="even">
<td style="text-align: left;"><a href="#plm-marker">plm</a></td>
<td style="text-align: left;">Properties from the (optional) packet length (PLM) marker (codestream main header)</td>
</tr>
<tr class="odd">
<td style="text-align: left;"><a href="#ppm-marker">ppm</a></td>
<td style="text-align: left;">Properties from the (optional) packed packet headers(PPM) marker segment (codestream main header)</td>
</tr>
<tr class="even">
<td style="text-align: left;"><a href="#tile-part">tileParts</a></td>
<td style="text-align: left;">Properties from individual tile parts</td>
</tr>
</tbody>
</table>


<p>Note that the <em>plm</em> and <em>ppm</em> elements are only written if the <code>--packetmarkers</code> option is used. The number of PLM and PPM markers is given by the following 2 derived properties (these are always reported, irrespective of <code>--packetmarkers</code>):</p>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">Property</th>
<th style="text-align: left;">Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">plmCount</td>
<td style="text-align: left;">Number of PLM markers in main header</td>
</tr>
<tr class="even">
<td style="text-align: left;">ppmCount</td>
<td style="text-align: left;">Number of PPM markers in main header</td>
</tr>
</tbody>
</table>


<h3 id="tests-18">Tests</h3>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">Test name</th>
<th style="text-align: left;">True if</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">codestreamStartsWithSOCMarker</td>
<td style="text-align: left;">First 2 bytes in codestream constitute a start of codestream (SOC) marker segment</td>
</tr>
<tr class="even">
<td style="text-align: left;">foundSIZMarker</td>
<td style="text-align: left;">Second marker segment in codestream is image and tile size (SIZ) marker segment</td>
</tr>
<tr class="odd">
<td style="text-align: left;">foundCODMarker</td>
<td style="text-align: left;">Codestream main header contains coding style default (COD) marker segment</td>
</tr>
<tr class="even">
<td style="text-align: left;">foundQCDMarker</td>
<td style="text-align: left;">Codestream main header contains quantization default (QCD) marker segment</td>
</tr>
<tr class="odd">
<td style="text-align: left;">foundExpectedNumberOfTiles</td>
<td style="text-align: left;">Number of encountered tiles is consistent with expected number of tiles (as calculated from <a href="#siz-marker">SIZ marker</a>)</td>
</tr>
<tr class="even">
<td style="text-align: left;">foundExpectedNumberOfTileParts</td>
<td style="text-align: left;">For all tiles, number of encountered tile parts is consistent with expected number of tile parts (values of <em>tnsot</em> from <a href="#sot-marker">SOT marker</a>)</td>
</tr>
<tr class="odd">
<td style="text-align: left;">maxOneCcocPerComponent</td>
<td style="text-align: left;">No more than one <em>ccoc</em> value for each component (only reported if codestream contains any COC marker segments)</td>
</tr>
<tr class="even">
<td style="text-align: left;">maxOneCqccPerComponent</td>
<td style="text-align: left;">No more than one <em>cqcc</em> value for each component (only reported if codestream contains any QCC marker segments)</td>
</tr>
<tr class="odd">
<td style="text-align: left;">foundEOCMarker</td>
<td style="text-align: left;">Last 2 bytes in codestream constitute an end of codestream (EOC) marker segment</td>
</tr>
</tbody>
</table>


<h2 id="siz-marker">Image and tile size (SIZ) marker segment (child of Contiguous Codestream box)</h2>


<h3 id="element-name-20">Element name</h3>


<p>siz</p>


<h3 id="reported-properties-20">Reported properties</h3>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">Property</th>
<th style="text-align: left;">Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">lsiz</td>
<td style="text-align: left;">Length of SIZ marker segment in bytes</td>
</tr>
<tr class="even">
<td style="text-align: left;">rsiz</td>
<td style="text-align: left;">Decoder capabilities</td>
</tr>
<tr class="odd">
<td style="text-align: left;">xsiz</td>
<td style="text-align: left;">Width of reference grid</td>
</tr>
<tr class="even">
<td style="text-align: left;">ysiz</td>
<td style="text-align: left;">Height of reference grid</td>
</tr>
<tr class="odd">
<td style="text-align: left;">xOsiz</td>
<td style="text-align: left;">Horizontal offset from origin of reference grid to left of image area</td>
</tr>
<tr class="even">
<td style="text-align: left;">yOsiz</td>
<td style="text-align: left;">Vertical offset from origin of reference grid to top of image area</td>
</tr>
<tr class="odd">
<td style="text-align: left;">xTsiz</td>
<td style="text-align: left;">Width of one reference tile with respect to the reference grid</td>
</tr>
<tr class="even">
<td style="text-align: left;">yTsiz</td>
<td style="text-align: left;">Height of one reference tile with respect to the reference grid</td>
</tr>
<tr class="odd">
<td style="text-align: left;">xTOsiz</td>
<td style="text-align: left;">Horizontal offset from origin of reference grid to left side of first tile</td>
</tr>
<tr class="even">
<td style="text-align: left;">yTOsiz</td>
<td style="text-align: left;">Vertical offset from origin of reference grid to top side of first tile</td>
</tr>
<tr class="odd">
<td style="text-align: left;">numberOfTiles</td>
<td style="text-align: left;">Number of tiles<a href="#fn17" class="footnote-ref" id="fnref17" role="doc-noteref"><sup>17</sup></a></td>
</tr>
<tr class="even">
<td style="text-align: left;">csiz</td>
<td style="text-align: left;">Number of components</td>
</tr>
<tr class="odd">
<td style="text-align: left;">ssizSign<sup>*</sup></td>
<td style="text-align: left;">Indicates whether image component is signed or unsigned (repeated for all components)</td>
</tr>
<tr class="even">
<td style="text-align: left;">ssizDepth<sup>*</sup></td>
<td style="text-align: left;">Number of bits for this component (repeated for all components)</td>
</tr>
<tr class="odd">
<td style="text-align: left;">xRsiz<sup>*</sup></td>
<td style="text-align: left;">Horizontal separation of sample of this component with respect to reference grid (repeated for all components)</td>
</tr>
<tr class="even">
<td style="text-align: left;">yRsiz<sup>*</sup></td>
<td style="text-align: left;">Vertical separation of sample of this component with respect to reference grid (repeated for all components)</td>
</tr>
</tbody>
</table>


<h3 id="tests-19">Tests</h3>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">Test name</th>
<th style="text-align: left;">True if</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">lsizIsValid</td>
<td style="text-align: left;"><em>lsiz</em> is within range [41,49190]</td>
</tr>
<tr class="even">
<td style="text-align: left;">rsizIsValid</td>
<td style="text-align: left;"><em>rsiz</em> equals 0 (“ISO/IEC 15444-1”), 1 (“Profile 0”) or 2 (“Profile 1”)</td>
</tr>
<tr class="odd">
<td style="text-align: left;">xsizIsValid</td>
<td style="text-align: left;"><em>xsiz</em> is within range [1,2<sup>32</sup> - 1]</td>
</tr>
<tr class="even">
<td style="text-align: left;">ysizIsValid</td>
<td style="text-align: left;"><em>ysiz</em> is within range [1,2<sup>32</sup> - 1]</td>
</tr>
<tr class="odd">
<td style="text-align: left;">xOsizIsValid</td>
<td style="text-align: left;"><em>xOsiz</em> is within range [0,2<sup>32</sup> - 2]</td>
</tr>
<tr class="even">
<td style="text-align: left;">yOsizIsValid</td>
<td style="text-align: left;"><em>yOsiz</em> is within range [0,2<sup>32</sup> - 2]</td>
</tr>
<tr class="odd">
<td style="text-align: left;">xTsizIsValid</td>
<td style="text-align: left;"><em>xTsiz</em> is within range [1,2<sup>32</sup> - 1]</td>
</tr>
<tr class="even">
<td style="text-align: left;">yTsizIsValid</td>
<td style="text-align: left;"><em>yTsiz</em> is within range [1,2<sup>32</sup> - 1]</td>
</tr>
<tr class="odd">
<td style="text-align: left;">xTOsizIsValid</td>
<td style="text-align: left;"><em>xTOsiz</em> is within range [0,2<sup>32</sup> - 2]</td>
</tr>
<tr class="even">
<td style="text-align: left;">yTOsizIsValid</td>
<td style="text-align: left;"><em>yTOsiz</em> is within range [0,2<sup>32</sup> - 2]</td>
</tr>
<tr class="odd">
<td style="text-align: left;">csizIsValid</td>
<td style="text-align: left;"><em>csiz</em> is within range [1,16384]</td>
</tr>
<tr class="even">
<td style="text-align: left;">lsizConsistentWithCsiz</td>
<td style="text-align: left;"><em>lsiz</em> equals 38 + 3*<em>csiz</em></td>
</tr>
<tr class="odd">
<td style="text-align: left;">ssizIsValid<sup>*</sup></td>
<td style="text-align: left;"><em>ssizDepth</em> is within range [1,38] (repeated for all components)</td>
</tr>
<tr class="even">
<td style="text-align: left;">xRsizIsValid<sup>*</sup></td>
<td style="text-align: left;"><em>xRsiz</em> is within range [1,255] (repeated for all components)</td>
</tr>
<tr class="odd">
<td style="text-align: left;">yRsizIsValid<sup>*</sup></td>
<td style="text-align: left;"><em>yRsiz</em> is within range [1,255] (repeated for all components)</td>
</tr>
</tbody>
</table>


<h2 id="cod-marker">Coding style default (COD) marker segment</h2>


<h3 id="element-name-21">Element name</h3>


<p>cod</p>


<h3 id="reported-properties-21">Reported properties</h3>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">Property</th>
<th style="text-align: left;">Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">lcod</td>
<td style="text-align: left;">Length of COD marker segment in bytes</td>
</tr>
<tr class="even">
<td style="text-align: left;">precincts</td>
<td style="text-align: left;">Indicates default or user-defined precinct size (“default”/“user defined”)</td>
</tr>
<tr class="odd">
<td style="text-align: left;">sop</td>
<td style="text-align: left;">Indicates use of start of packet marker segments (“yes”/“no”)</td>
</tr>
<tr class="even">
<td style="text-align: left;">eph</td>
<td style="text-align: left;">Indicates use of end of packet marker segments (“yes”/“no”)</td>
</tr>
<tr class="odd">
<td style="text-align: left;">order</td>
<td style="text-align: left;">Progression order</td>
</tr>
<tr class="even">
<td style="text-align: left;">layers</td>
<td style="text-align: left;">Number of layers</td>
</tr>
<tr class="odd">
<td style="text-align: left;">multipleComponentTransformation</td>
<td style="text-align: left;">Indicates use of multiple component transformation (“yes”/“no”)</td>
</tr>
<tr class="even">
<td style="text-align: left;">levels</td>
<td style="text-align: left;">Number of decomposition levels</td>
</tr>
<tr class="odd">
<td style="text-align: left;">codeBlockWidth</td>
<td style="text-align: left;">Code block width</td>
</tr>
<tr class="even">
<td style="text-align: left;">codeBlockHeight</td>
<td style="text-align: left;">Code block height</td>
</tr>
<tr class="odd">
<td style="text-align: left;">codingBypass</td>
<td style="text-align: left;">Indicates use of coding bypass (“yes”/“no”)</td>
</tr>
<tr class="even">
<td style="text-align: left;">resetOnBoundaries</td>
<td style="text-align: left;">Indicates reset of context probabilities on coding pass boundaries (“yes”/“no”)</td>
</tr>
<tr class="odd">
<td style="text-align: left;">termOnEachPass</td>
<td style="text-align: left;">Indicates termination on each coding pass (“yes”/“no”)</td>
</tr>
<tr class="even">
<td style="text-align: left;">vertCausalContext</td>
<td style="text-align: left;">Indicates vertically causal context (“yes”/“no”)</td>
</tr>
<tr class="odd">
<td style="text-align: left;">predTermination</td>
<td style="text-align: left;">Indicates predictable termination (“yes”/“no”)</td>
</tr>
<tr class="even">
<td style="text-align: left;">segmentationSymbols</td>
<td style="text-align: left;">Indicates use of segmentation symbols (“yes”/“no”)</td>
</tr>
<tr class="odd">
<td style="text-align: left;">transformation</td>
<td style="text-align: left;">Wavelet transformation: “9-7 irreversible” or “5-3 reversible”</td>
</tr>
<tr class="even">
<td style="text-align: left;">precinctSizeX<sup>*</sup></td>
<td style="text-align: left;">Precinct width (repeated for all resolution levels; order: low to high). Equals 32768 if <em>precincts</em> is “default”</td>
</tr>
<tr class="odd">
<td style="text-align: left;">precinctSizeY<sup>*</sup></td>
<td style="text-align: left;">Precinct height (repeated for all resolution levels; order: low to high). Equals 32768 if <em>precincts</em> is “default”</td>
</tr>
</tbody>
</table>


<h3 id="tests-20">Tests</h3>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">Test name</th>
<th style="text-align: left;">True if</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">lcodIsValid</td>
<td style="text-align: left;"><em>lcod</em> is within range [12,45]</td>
</tr>
<tr class="even">
<td style="text-align: left;">orderIsValid</td>
<td style="text-align: left;"><em>order</em> equals 0 (“LRCP”), 1 (“RLCP”), 2 (“RPCL”), 3 (“PCRL”) or 4 (“CPRL”)</td>
</tr>
<tr class="odd">
<td style="text-align: left;">layersIsValid</td>
<td style="text-align: left;"><em>layers</em> is within range [1,65535]</td>
</tr>
<tr class="even">
<td style="text-align: left;">multipleComponentTransformation</td>
<td style="text-align: left;">IsValid</td>
</tr>
<tr class="odd">
<td style="text-align: left;">levelsIsValid</td>
<td style="text-align: left;"><em>levels</em> is within range [0,32]</td>
</tr>
<tr class="even">
<td style="text-align: left;">lcodConsistencyCheck</td>
<td style="text-align: left;"><em>lcod</em> value is consistent with <em>precincts</em> and <em>levels</em> (Eq A-2 in ISO/IEC 15444-1)</td>
</tr>
<tr class="odd">
<td style="text-align: left;">codeBlockWidthExponentIsValid</td>
<td style="text-align: left;"><em>codeBlockWidthExponent</em> is within range [2,10]</td>
</tr>
<tr class="even">
<td style="text-align: left;">codeBlockHeightExponentIsValid</td>
<td style="text-align: left;"><em>codeBlockHeightExponent</em> is within range [2,10]</td>
</tr>
<tr class="odd">
<td style="text-align: left;">sumHeightWidthExponentIsValid</td>
<td style="text-align: left;"><em>codeBlockWidthExponent</em> + <em>codeBlockHeightExponent</em> ≤ 12</td>
</tr>
<tr class="even">
<td style="text-align: left;">precinctSizeXIsValid<sup>*</sup></td>
<td style="text-align: left;"><em>precinctSizeX</em> ≥ 2 (except lowest resolution level) (repeated for all resolution levels; order: low to high) (only if <em>precincts</em> is “user defined”)</td>
</tr>
<tr class="odd">
<td style="text-align: left;">precinctSizeYIsValid<sup>*</sup></td>
<td style="text-align: left;"><em>precinctSizeY</em> ≥ 2 (except lowest resolution level) (repeated for all resolution levels; order: low to high) (only if <em>precincts</em> is “user defined”)</td>
</tr>
</tbody>
</table>


<h2 id="coc-marker">Coding style component (COC) marker segment</h2>


<h3 id="element-name-22">Element name</h3>


<p>coc</p>


<h3 id="reported-properties-22">Reported properties</h3>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">Property</th>
<th style="text-align: left;">Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">lcoc</td>
<td style="text-align: left;">Length of COC marker segment in bytes</td>
</tr>
<tr class="even">
<td style="text-align: left;">ccoc</td>
<td style="text-align: left;">Index of the component to which this marker segment relates</td>
</tr>
<tr class="odd">
<td style="text-align: left;">precincts</td>
<td style="text-align: left;">Indicates default or user-defined precinct size (“default”/“user defined”)</td>
</tr>
<tr class="even">
<td style="text-align: left;">levels</td>
<td style="text-align: left;">Number of decomposition levels</td>
</tr>
<tr class="odd">
<td style="text-align: left;">codeBlockWidth</td>
<td style="text-align: left;">Code block width</td>
</tr>
<tr class="even">
<td style="text-align: left;">codeBlockHeight</td>
<td style="text-align: left;">Code block height</td>
</tr>
<tr class="odd">
<td style="text-align: left;">codingBypass</td>
<td style="text-align: left;">Indicates use of coding bypass (“yes”/“no”)</td>
</tr>
<tr class="even">
<td style="text-align: left;">resetOnBoundaries</td>
<td style="text-align: left;">Indicates reset of context probabilities on coding pass boundaries (“yes”/“no”)</td>
</tr>
<tr class="odd">
<td style="text-align: left;">termOnEachPass</td>
<td style="text-align: left;">Indicates termination on each coding pass (“yes”/“no”)</td>
</tr>
<tr class="even">
<td style="text-align: left;">vertCausalContext</td>
<td style="text-align: left;">Indicates vertically causal context (“yes”/“no”)</td>
</tr>
<tr class="odd">
<td style="text-align: left;">predTermination</td>
<td style="text-align: left;">Indicates predictable termination (“yes”/“no”)</td>
</tr>
<tr class="even">
<td style="text-align: left;">segmentationSymbols</td>
<td style="text-align: left;">Indicates use of segmentation symbols (“yes”/“no”)</td>
</tr>
<tr class="odd">
<td style="text-align: left;">transformation</td>
<td style="text-align: left;">Wavelet transformation: “9-7 irreversible” or “5-3 reversible”</td>
</tr>
<tr class="even">
<td style="text-align: left;">precinctSizeX<sup>*</sup></td>
<td style="text-align: left;">Precinct width (repeated for all resolution levels; order: low to high). Equals 32768 if <em>precincts</em> is “default”</td>
</tr>
<tr class="odd">
<td style="text-align: left;">precinctSizeY<sup>*</sup></td>
<td style="text-align: left;">Precinct height (repeated for all resolution levels; order: low to high). Equals 32768 if <em>precincts</em> is “default”</td>
</tr>
</tbody>
</table>


<h3 id="tests-21">Tests</h3>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">Test name</th>
<th style="text-align: left;">True if</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">lcocIsValid</td>
<td style="text-align: left;"><em>lcoc</em> is within range [9,43]</td>
</tr>
<tr class="even">
<td style="text-align: left;">ccocIsValid</td>
<td style="text-align: left;"><em>ccoc</em> is within range [0,255] (<em>csiz</em> &lt; 257) or [0,16383] (<em>csiz</em> &gt;= 257)</td>
</tr>
<tr class="odd">
<td style="text-align: left;">levelsIsValid</td>
<td style="text-align: left;"><em>levels</em> is within range [0,32]</td>
</tr>
<tr class="even">
<td style="text-align: left;">lcocConsistencyCheck</td>
<td style="text-align: left;"><em>lcoc</em> value is consistent with <em>levels</em>, <em>csiz</em> and <em>precincts</em> (Eq A-3 in ISO/IEC 15444-1)</td>
</tr>
<tr class="odd">
<td style="text-align: left;">codeBlockWidthExponentIsValid</td>
<td style="text-align: left;"><em>codeBlockWidthExponent</em> is within range [2,10]</td>
</tr>
<tr class="even">
<td style="text-align: left;">codeBlockHeightExponentIsValid</td>
<td style="text-align: left;"><em>codeBlockHeightExponent</em> is within range [2,10]</td>
</tr>
<tr class="odd">
<td style="text-align: left;">sumHeightWidthExponentIsValid</td>
<td style="text-align: left;"><em>codeBlockWidthExponent</em> + <em>codeBlockHeightExponent</em> ≤ 12</td>
</tr>
<tr class="even">
<td style="text-align: left;">precinctSizeXIsValid<sup>*</sup></td>
<td style="text-align: left;"><em>precinctSizeX</em> ≥ 2 (except lowest resolution level) (repeated for all resolution levels; order: low to high) (only if <em>precincts</em> is “user defined”)</td>
</tr>
<tr class="odd">
<td style="text-align: left;">precinctSizeYIsValid<sup>*</sup></td>
<td style="text-align: left;"><em>precinctSizeY</em> ≥ 2 (except lowest resolution level) (repeated for all resolution levels; order: low to high) (only if <em>precincts</em> is “user defined”)</td>
</tr>
</tbody>
</table>


<h2 id="rgn-marker">Region-of-interest (RGN) marker segment</h2>


<h3 id="element-name-23">Element name</h3>


<p>rgn</p>


<h3 id="reported-properties-23">Reported properties</h3>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">Property</th>
<th style="text-align: left;">Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">lrgn</td>
<td style="text-align: left;">Length of RGN marker segment in bytes</td>
</tr>
<tr class="even">
<td style="text-align: left;">crgn</td>
<td style="text-align: left;">Index of the component to which this marker segment relates</td>
</tr>
<tr class="odd">
<td style="text-align: left;">roiStyle</td>
<td style="text-align: left;">ROI style for the current ROI</td>
</tr>
<tr class="even">
<td style="text-align: left;">roiShift</td>
<td style="text-align: left;">Implicit ROI shift</td>
</tr>
</tbody>
</table>


<h3 id="tests-22">Tests</h3>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">Test name</th>
<th style="text-align: left;">True if</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">lrgnIsValid</td>
<td style="text-align: left;"><em>lrgn</em> is within range [5,6]</td>
</tr>
<tr class="even">
<td style="text-align: left;">crgnIsValid</td>
<td style="text-align: left;"><em>crgn</em> is within range [0,255] (<em>csiz</em> &lt; 257) or [0,16383] (<em>csiz</em> &gt;= 257)</td>
</tr>
<tr class="odd">
<td style="text-align: left;">roiStyleIsValid</td>
<td style="text-align: left;"><em>roiStyle</em> equals 0 (“Implicit ROI (maximum shift)”)</td>
</tr>
<tr class="even">
<td style="text-align: left;">roiShiftIsValid</td>
<td style="text-align: left;"><em>roiShift</em> is within range [0,255]</td>
</tr>
</tbody>
</table>


<h2 id="qcd-marker">Quantization default (QCD) marker segment</h2>


<h3 id="element-name-24">Element name</h3>


<p>qcd</p>


<h3 id="reported-properties-24">Reported properties</h3>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">Property</th>
<th style="text-align: left;">Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">lqcd</td>
<td style="text-align: left;">Length of QCD marker segment in bytes</td>
</tr>
<tr class="even">
<td style="text-align: left;">qStyle</td>
<td style="text-align: left;">Quantization style for all components</td>
</tr>
<tr class="odd">
<td style="text-align: left;">guardBits</td>
<td style="text-align: left;">Number of guard bits</td>
</tr>
<tr class="even">
<td style="text-align: left;">epsilon<sup>*</sup></td>
<td style="text-align: left;">- If <em>qStyle</em> equals 0 (“no quantization”): <em>Epsilon</em> exponent in Eq E-5 of ISO/IEC 15444-1 (repeated for all decomposition levels; order: low to high)<br/>- If <em>qStyle</em> equals 1 (“scalar derived”): <em>Epsilon</em> exponent in Eq E-3 of ISO/IEC 15444-1<br/>- If <em>qStyle</em> equals 2 (“scalar expounded”): <em>Epsilon</em> exponent in Eq E-3 of ISO/IEC 15444-1 (repeated for all decomposition levels; order: low to high)</td>
</tr>
<tr class="odd">
<td style="text-align: left;">mu<sup>*</sup></td>
<td style="text-align: left;">- If <em>qStyle</em> equals 1 (“scalar derived”): <em>mu</em> constant in Eq E-3 of ISO/IEC 15444-1<br/>- if <em>qStyle</em> equals 2 (“scalar expounded”) : <em>mu</em> constant in Eq E-3 of ISO/IEC 15444-1 (repeated for all decomposition levels; order: low to high)</td>
</tr>
</tbody>
</table>


<h3 id="tests-23">Tests</h3>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">Test name</th>
<th style="text-align: left;">True if</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">lqcdIsValid</td>
<td style="text-align: left;"><em>lqcd</em> is within range [4,197]</td>
</tr>
<tr class="even">
<td style="text-align: left;">qStyleIsValid</td>
<td style="text-align: left;"><em>qStyle</em> equals 0 (“no quantization”), 1 (“scalar derived”), or 2 (“scalar expounded”)</td>
</tr>
</tbody>
</table>


<h2 id="qcc-marker">Quantization component (QCC) marker segment</h2>


<h3 id="element-name-25">Element name</h3>


<p>qcc</p>


<h3 id="reported-properties-25">Reported properties</h3>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">Property</th>
<th style="text-align: left;">Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">lqcc</td>
<td style="text-align: left;">Length of QCC marker segment in bytes</td>
</tr>
<tr class="even">
<td style="text-align: left;">cqcc</td>
<td style="text-align: left;">Index of the component to which this marker segment relates</td>
</tr>
<tr class="odd">
<td style="text-align: left;">qStyle</td>
<td style="text-align: left;">Quantization style for all components</td>
</tr>
<tr class="even">
<td style="text-align: left;">guardBits</td>
<td style="text-align: left;">Number of guard bits</td>
</tr>
<tr class="odd">
<td style="text-align: left;">epsilon<sup>*</sup></td>
<td style="text-align: left;">- If <em>qStyle</em> equals 0 (“no quantization”): <em>Epsilon</em> exponent in Eq E-5 of ISO/IEC 15444-1 (repeated for all decomposition levels; order: low to high)<br/>- If <em>qStyle</em> equals 1 (“scalar derived”): <em>Epsilon</em> exponent in Eq E-3 of ISO/IEC 15444-1<br/>- If <em>qStyle</em> equals 2 (“scalar expounded”): <em>Epsilon</em> exponent in Eq E-3 of ISO/IEC 15444-1 (repeated for all decomposition levels; order: low to high)</td>
</tr>
<tr class="even">
<td style="text-align: left;">mu<sup>*</sup></td>
<td style="text-align: left;">- If <em>qStyle</em> equals 1 (“scalar derived”): <em>mu</em> constant in Eq E-3 of ISO/IEC 15444-1<br/>- if <em>qStyle</em> equals 2 (“scalar expounded”) : <em>mu</em> constant in Eq E-3 of ISO/IEC 15444-1 (repeated for all decomposition levels; order: low to high)</td>
</tr>
</tbody>
</table>


<h3 id="tests-24">Tests</h3>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">Test name</th>
<th style="text-align: left;">True if</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">lqccIsValid</td>
<td style="text-align: left;"><em>lqcc</em> is within range [5,199]</td>
</tr>
<tr class="even">
<td style="text-align: left;">qStyleIsValid</td>
<td style="text-align: left;"><em>qStyle</em> equals 0 (“no quantization”), 1 (“scalar derived”), or 2 (“scalar expounded”)</td>
</tr>
</tbody>
</table>


<h2 id="poc-marker">Progression order change (POC) marker segment</h2>


<h3 id="element-name-26">Element name</h3>


<p>poc</p>


<h3 id="reported-properties-26">Reported properties</h3>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">Property</th>
<th style="text-align: left;">Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">lpoc</td>
<td style="text-align: left;">Length of POC marker segment in bytes</td>
</tr>
<tr class="even">
<td style="text-align: left;">rspoc<sup>*</sup></td>
<td style="text-align: left;">Resolution level index for the start of a progression (repeated for all progression order changes)</td>
</tr>
<tr class="odd">
<td style="text-align: left;">cspoc<sup>*</sup></td>
<td style="text-align: left;">Component index for the start of a progression (repeated for all progression order changes)</td>
</tr>
<tr class="even">
<td style="text-align: left;">lyepoc<sup>*</sup></td>
<td style="text-align: left;">Layer index for the end of a progression (repeated for all progression order changes)</td>
</tr>
<tr class="odd">
<td style="text-align: left;">repoc<sup>*</sup></td>
<td style="text-align: left;">Resolution level index for the end of a progression (repeated for all progression order changes)</td>
</tr>
<tr class="even">
<td style="text-align: left;">cepoc<sup>*</sup></td>
<td style="text-align: left;">Component index for the end of a progression (repeated for all progression order changes)</td>
</tr>
<tr class="odd">
<td style="text-align: left;">order<sup>*</sup></td>
<td style="text-align: left;">Progression order (repeated for all progression order changes)</td>
</tr>
</tbody>
</table>


<h3 id="tests-25">Tests</h3>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">Test name</th>
<th style="text-align: left;">True if</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">lpocIsValid</td>
<td style="text-align: left;"><em>lpoc</em> is within range [9,65535]</td>
</tr>
<tr class="even">
<td style="text-align: left;">rspocIsValid<sup>*</sup></td>
<td style="text-align: left;"><em>rspoc</em> is within range [0,32] (repeated for all progression order changes)</td>
</tr>
<tr class="odd">
<td style="text-align: left;">cspocIsValid<sup>*</sup></td>
<td style="text-align: left;"><em>cspoc</em> is within range [0,255] (<em>csiz</em> &lt; 257) or [0,16383] (*csiz &gt;= 257) (repeated for all progression order changes)</td>
</tr>
<tr class="even">
<td style="text-align: left;">lyepocIsValid<sup>*</sup></td>
<td style="text-align: left;"><em>lyepoc</em> is within range [1,65535] (repeated for all progression order changes)</td>
</tr>
<tr class="odd">
<td style="text-align: left;">repocIsValid<sup>*</sup></td>
<td style="text-align: left;"><em>repoc</em> is within range [(<em>rspoc</em> + 1),65535] (repeated for all progression order changes)</td>
</tr>
<tr class="even">
<td style="text-align: left;">cepocIsValid<sup>*</sup></td>
<td style="text-align: left;"><em>cepoc</em> is within range [(<em>cspoc</em> + 1),255] (<em>csiz</em> &lt; 257) or [(<em>cspoc</em> + 1),16384] (*csiz &gt;= 257), or 0 (repeated for all progression order changes)</td>
</tr>
<tr class="odd">
<td style="text-align: left;">orderIsValid<sup>*</sup></td>
<td style="text-align: left;"><em>order</em> equals 0 (“LRCP”), 1 (“RLCP”), 2 (“RPCL”), 3 (“PCRL”) or 4 (“CPRL”) (repeated for all progression order changes)</td>
</tr>
</tbody>
</table>


<h2 id="crg-marker">Component registration (CRG) marker segment</h2>


<h3 id="element-name-27">Element name</h3>


<p>crg</p>


<h3 id="reported-properties-27">Reported properties</h3>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">Property</th>
<th style="text-align: left;">Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">lcrg</td>
<td style="text-align: left;">Length of CRG marker segment in bytes</td>
</tr>
<tr class="even">
<td style="text-align: left;">xrg<sup>*</sup></td>
<td style="text-align: left;">Horizontal offset, in units of 1/65536 of <em>xRsiz</em> (repeated for all components)</td>
</tr>
<tr class="odd">
<td style="text-align: left;">yrg<sup>*</sup></td>
<td style="text-align: left;">Vertical offset, in units of 1/65536 of <em>yRsiz</em> (repeated for all components)</td>
</tr>
</tbody>
</table>


<h3 id="tests-26">Tests</h3>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">Test name</th>
<th style="text-align: left;">True if</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">lcrgIsValid</td>
<td style="text-align: left;"><em>lcrg</em> is within range [6,65534]</td>
</tr>
<tr class="even">
<td style="text-align: left;">xcrgIsValid<sup>*</sup></td>
<td style="text-align: left;"><em>xcrg</em> is within range [0,65535] (repeated for all components)</td>
</tr>
<tr class="odd">
<td style="text-align: left;">ycrgIsValid<sup>*</sup></td>
<td style="text-align: left;"><em>ycrg</em> is within range [0,65535] (repeated for all components)</td>
</tr>
</tbody>
</table>


<h2 id="com-marker">Comment (COM) marker segment</h2>


<h3 id="element-name-28">Element name</h3>


<p>com</p>


<h3 id="reported-properties-28">Reported properties</h3>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">Property</th>
<th style="text-align: left;">Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">lcom</td>
<td style="text-align: left;">Length of COM marker segment in bytes</td>
</tr>
<tr class="even">
<td style="text-align: left;">rcom</td>
<td style="text-align: left;">Registration value of marker segment (indicates whether this comment contains binary data or text)</td>
</tr>
<tr class="odd">
<td style="text-align: left;">comment</td>
<td style="text-align: left;">Embedded comment as text (only if <em>rcom</em> = 1 )</td>
</tr>
</tbody>
</table>


<h3 id="tests-27">Tests</h3>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">Test name</th>
<th style="text-align: left;">True if</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">lcomIsValid</td>
<td style="text-align: left;"><em>lqcd</em> is within range [5,65535]</td>
</tr>
<tr class="even">
<td style="text-align: left;">rcomIsValid</td>
<td style="text-align: left;"><em>rcom</em> equals 0 (“binary”) or 1 (“ISO/IEC 8859-15 (Latin”))</td>
</tr>
<tr class="odd">
<td style="text-align: left;">commentIsValid</td>
<td style="text-align: left;">Comment is valid ISO/IEC8859-15 and does not contain control characters, other than tab, newline or carriage return</td>
</tr>
</tbody>
</table>


<h2 id="tile-part">Tile part (child of Contiguous Codestream box)</h2>


<p>Tile-part level properties and tests. This is not a box or a marker segment!</p>


<h3 id="element-name-29">Element name</h3>


<p>tilePart (child of tileParts)</p>


<h3 id="reported-properties-29">Reported properties</h3>


<p>Each tile part element can contain a number of child elements:</p>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">Child element</th>
<th style="text-align: left;">Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;"><a href="#sot-marker">sot</a></td>
<td style="text-align: left;">Properties from start of tile (SOT) marker segment</td>
</tr>
<tr class="even">
<td style="text-align: left;"><a href="#cod-marker">cod</a></td>
<td style="text-align: left;">Properties from the (optional) coding style default (COD) marker segment (tile part header)</td>
</tr>
<tr class="odd">
<td style="text-align: left;"><a href="#coc-marker">coc</a></td>
<td style="text-align: left;">Properties from the (optional) coding style component (COC) marker segment (tile part header)</td>
</tr>
<tr class="even">
<td style="text-align: left;"><a href="#rgn-marker">rgn</a></td>
<td style="text-align: left;">Properties from the (optional) region of interest (RGN) marker segment (tile part header)</td>
</tr>
<tr class="odd">
<td style="text-align: left;"><a href="#qcd-marker">qcd</a></td>
<td style="text-align: left;">Properties from the (optional) quantization default (QCD) marker segment (tile part header)</td>
</tr>
<tr class="even">
<td style="text-align: left;"><a href="#qcc-marker">qcc</a></td>
<td style="text-align: left;">Properties from the (optional) quantization component (QCC) marker segment (tile part header)</td>
</tr>
<tr class="odd">
<td style="text-align: left;"><a href="#poc-marker">poc</a></td>
<td style="text-align: left;">Properties from the (optional) progression order change (POC) marker segment (tile part header)</td>
</tr>
<tr class="even">
<td style="text-align: left;"><a href="#com-marker">com</a></td>
<td style="text-align: left;">Properties from the (optional) comment (COM) marker segment (tile part header)</td>
</tr>
<tr class="odd">
<td style="text-align: left;"><a href="#plt-marker">plt</a></td>
<td style="text-align: left;">Properties from the (optional) packet length (PLT) marker(tile part header)</td>
</tr>
<tr class="even">
<td style="text-align: left;"><a href="#ppt-marker">ppt</a></td>
<td style="text-align: left;">Properties from the (optional) packed packet headers(PPT) marker segment (tile part header)</td>
</tr>
</tbody>
</table>


<p>Note that the <em>plt</em> and <em>ppt</em> elements are only written if the <code>--packetmarkers</code> option is used. The number of PLT and PPT markers is given by the following 2 derived properties (these are always reported, irrespective of <code>--packetmarkers</code>):</p>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">Property</th>
<th style="text-align: left;">Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">pltCount</td>
<td style="text-align: left;">Number of PLT markers in tile part header</td>
</tr>
<tr class="even">
<td style="text-align: left;">pptCount</td>
<td style="text-align: left;">Number of PPT markers in tile part header</td>
</tr>
</tbody>
</table>


<h3 id="tests-28">Tests</h3>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">Test name</th>
<th style="text-align: left;">True if</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">foundNextTilePartOrEOC</td>
<td style="text-align: left;">Tile part start offset + <em>tilePartLength</em> points to either start of new tile or EOC marker (useful for detecting within-codestream byte corruption)</td>
</tr>
<tr class="even">
<td style="text-align: left;">foundSODMarker</td>
<td style="text-align: left;">Last marker segment of tile part is a start-of-data (SOD) marker</td>
</tr>
</tbody>
</table>


<h2 id="sot-marker">Start of tile part (SOT) marker segment (child of tile part)</h2>


<h3 id="element-name-30">Element name</h3>


<p>sot</p>


<h3 id="reported-properties-30">Reported properties</h3>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">Property</th>
<th style="text-align: left;">Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">lsot</td>
<td style="text-align: left;">Length of SOT marker segment in bytes</td>
</tr>
<tr class="even">
<td style="text-align: left;">isot</td>
<td style="text-align: left;">Tile index</td>
</tr>
<tr class="odd">
<td style="text-align: left;">psot</td>
<td style="text-align: left;">Length of tile part</td>
</tr>
<tr class="even">
<td style="text-align: left;">tpsot</td>
<td style="text-align: left;">Tile part index</td>
</tr>
<tr class="odd">
<td style="text-align: left;">tnsot</td>
<td style="text-align: left;">Number of tile-parts of a tile in the codestream (value of 0 indicates that number of tile-parts of tile in the codestream is not defined in current header)</td>
</tr>
</tbody>
</table>


<h3 id="tests-29">Tests</h3>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">Test name</th>
<th style="text-align: left;">True if</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">lsotIsValid</td>
<td style="text-align: left;"><em>lsot</em> equals 10</td>
</tr>
<tr class="even">
<td style="text-align: left;">isotIsValid</td>
<td style="text-align: left;"><em>isot</em> is within range [0,65534]</td>
</tr>
<tr class="odd">
<td style="text-align: left;">psotIsValid</td>
<td style="text-align: left;"><em>psot</em> is <strong>not</strong> within range [1,13]</td>
</tr>
<tr class="even">
<td style="text-align: left;">tpsotIsValid</td>
<td style="text-align: left;"><em>tpsot</em> is within range [0,254]</td>
</tr>
</tbody>
</table>


<p><br/></p>


<p>The following marker segments are only minimally supported: <em>jpylyzer</em> will report their presence in the <em>properties</em> element, but it does not perform any further tests or analyses. This may change in upcoming versions of the software.</p>


<h2 id="tlm-marker">Tile-part lengths (TLM) marker segment</h2>


<h3 id="element-name-31">Element name</h3>


<p>tlm</p>


<h3 id="reported-properties-31">Reported properties</h3>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">Property</th>
<th style="text-align: left;">Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;"/>
<td style="text-align: left;"/>
</tr>
<tr class="even">
<td style="text-align: left;"/>
<td style="text-align: left;"/>
</tr>
</tbody>
</table>


<h3 id="tests-30">Tests</h3>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">Test name</th>
<th style="text-align: left;">True if</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;"/>
<td style="text-align: left;"/>
</tr>
<tr class="even">
<td style="text-align: left;"/>
<td style="text-align: left;"/>
</tr>
</tbody>
</table>


<h2 id="plm-marker">Packet length, main header (PLM) marker segment</h2>


<h3 id="element-name-32">Element name</h3>


<p>plm</p>


<h3 id="reported-properties20">Reported properties<a href="#fn18" class="footnote-ref" id="fnref18" role="doc-noteref"><sup>18</sup></a></h3>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">Property</th>
<th style="text-align: left;">Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">lplm</td>
<td style="text-align: left;">Length of PLM marker segment in bytes</td>
</tr>
<tr class="even">
<td style="text-align: left;">zplm</td>
<td style="text-align: left;">PLM marker segment index</td>
</tr>
<tr class="odd">
<td style="text-align: left;">nplm</td>
<td style="text-align: left;">Number of bytes of Iplm information for the ith tile-part</td>
</tr>
<tr class="even">
<td style="text-align: left;">iplm</td>
<td style="text-align: left;">Comma separated list of packet length values (as hexadecimal strings)</td>
</tr>
</tbody>
</table>


<h3 id="tests-31">Tests</h3>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">Test name</th>
<th style="text-align: left;">True if</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;"/>
<td style="text-align: left;"/>
</tr>
<tr class="even">
<td style="text-align: left;"/>
<td style="text-align: left;"/>
</tr>
</tbody>
</table>


<h2 id="ppm-marker">Packed packet headers, main header (PPM) marker segment</h2>


<h3 id="element-name-33">Element name</h3>


<p>ppm</p>


<h3 id="reported-properties20-1">Reported properties<a href="#fn19" class="footnote-ref" id="fnref19" role="doc-noteref"><sup>19</sup></a></h3>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">Property</th>
<th style="text-align: left;">Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;"/>
<td style="text-align: left;"/>
</tr>
<tr class="even">
<td style="text-align: left;"/>
<td style="text-align: left;"/>
</tr>
</tbody>
</table>


<h3 id="tests-32">Tests</h3>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">Test name</th>
<th style="text-align: left;">True if</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;"/>
<td style="text-align: left;"/>
</tr>
<tr class="even">
<td style="text-align: left;"/>
<td style="text-align: left;"/>
</tr>
</tbody>
</table>


<h2 id="plt-marker">Packet length, tile-part header (PLT) marker segment</h2>


<h3 id="element-name-34">Element name</h3>


<p>plt</p>


<h3 id="reported-properties20-2">Reported properties<a href="#fn20" class="footnote-ref" id="fnref20" role="doc-noteref"><sup>20</sup></a></h3>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">Property</th>
<th style="text-align: left;">Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">lplt</td>
<td style="text-align: left;">Length of PLT marker segment in bytes</td>
</tr>
<tr class="even">
<td style="text-align: left;">zplt</td>
<td style="text-align: left;">PLT marker segment index</td>
</tr>
<tr class="odd">
<td style="text-align: left;">nplm</td>
<td style="text-align: left;">Number of bytes of Iplm information for the ith tile-part</td>
</tr>
<tr class="even">
<td style="text-align: left;">iplt</td>
<td style="text-align: left;">Comma separated list of packet length values (as hexadecimal strings)</td>
</tr>
</tbody>
</table>


<h3 id="tests-33">Tests</h3>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">Test name</th>
<th style="text-align: left;">True if</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;"/>
<td style="text-align: left;"/>
</tr>
<tr class="even">
<td style="text-align: left;"/>
<td style="text-align: left;"/>
</tr>
</tbody>
</table>


<h2 id="ppt-marker">Packed packet headers, tile-part header (PPT) marker segment</h2>


<h3 id="element-name-35">Element name</h3>


<p>ppt</p>


<h3 id="reported-properties20-3">Reported properties<a href="#fn21" class="footnote-ref" id="fnref21" role="doc-noteref"><sup>21</sup></a></h3>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">Property</th>
<th style="text-align: left;">Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;"/>
<td style="text-align: left;"/>
</tr>
<tr class="even">
<td style="text-align: left;"/>
<td style="text-align: left;"/>
</tr>
</tbody>
</table>


<h3 id="tests-34">Tests</h3>


<table>
<thead>
<tr class="header">
<th style="text-align: left;">Test name</th>
<th style="text-align: left;">True if</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;"/>
<td style="text-align: left;"/>
</tr>
<tr class="even">
<td style="text-align: left;"/>
<td style="text-align: left;"/>
</tr>
</tbody>
</table>


<h1 id="references">References</h1>


<p>ICC. Specification ICC.1:1998-09 – File Format for Color Profiles. International Color Consortium, 1998. <a href="https://www.color.org/ICC-1_1998-09.pdf">https://www.color.org/ICC-1_1998-09.pdf</a>.</p>


<p>ISO/IEC. Information technology — JPEG 2000 image coding system: Core coding system. ISO/IEC 15444-1, Second edition. Geneva: ISO/IEC, 2004a. <a href="https://www.jpeg.org/public/15444-1annexi.pdf">https://www.jpeg.org/public/15444-1annexi.pdf</a> (“Annex I: JP2 file format syntax” only).</p>


<p>ISO/IEC. Information technology — JPEG 2000 image coding system: Extensions. ISO/IEC 15444-2, First edition. Geneva: ISO/IEC, 2004b. <a href="https://www.jpeg.org/public/15444-2annexm.pdf">https://www.jpeg.org/public/15444-2annexm.pdf</a> (“Annex M: JPX extended file format syntax” only).</p>


<p>Leach, P., Mealling, M. &amp; Salz, R. A Universally Unique IDentifier (UUID) URN namespace. Memo, IETF. <a href="https://tools.ietf.org/html/rfc4122.html">https://tools.ietf.org/html/rfc4122.html</a>.</p>


<section class="footnotes" role="doc-endnotes">
<hr/>
<ol>
<li id="fn1" role="doc-endnote"><p>The <em>jpylyzer</em> binaries were created using the <em>PyInstaller</em> package: <a href="https://www.pyinstaller.org/">https://www.pyinstaller.org/</a><a href="#fnref1" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
<li id="fn2" role="doc-endnote"><p>Note that <em>jpylyzer</em> versions 1.8 and earlier returned a formatted XML string instead of an element object!<a href="#fnref2" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
<li id="fn3" role="doc-endnote"><p>Note that <em>jpylyzer</em> versions 1.4 and earlier used the verbose output format by default. This behaviour has changed in version 1.5 onwards, as the lengthy output turned out to be slightly confusing to some users.<a href="#fnref3" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
<li id="fn4" role="doc-endnote"><p>The “Any ICC” method is defined in ISO/IEC 15444-2 (the JPX format), and is not allowed in JP2. However, <em>jpylyzer</em> offers limited support for JPX here by also reporting the properties of ICC profiles that were embedded using this method. Note that any file that uses this method will fail the “methIsValid” test (and thereby the validation).<a href="#fnref4" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
<li id="fn5" role="doc-endnote"><p>Originally ISO/IEC 15444-1 only allowed “input device” profiles. Support of “display device” profiles was added through an <a href="http://www.itu.int/rec/T-REC-T.800-201303-P!Amd6/en">amendment</a> to the standard in 2013. The behaviour of <em>jpylyzer</em> is consistent with this amendment.<a href="#fnref5" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
<li id="fn6" role="doc-endnote"><p>Calculated as: <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> <mfrac> <mrow> <mi>vRcN</mi> </mrow> <mrow> <mi>vRcD</mi> </mrow> </mfrac> <mo>•</mo> <msup> <mn>10</mn> <mi>vRcE</mi> </msup> </mrow> </math><a href="#fnref6" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
<li id="fn7" role="doc-endnote"><p>Calculated as: <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> <mfrac> <mrow> <mi>hRcN</mi> </mrow> <mrow> <mi>hRcD</mi> </mrow> </mfrac> <mo>•</mo> <msup> <mn>10</mn> <mi>hRcE</mi> </msup> </mrow> </math><a href="#fnref7" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
<li id="fn8" role="doc-endnote"><p>Calculated as: <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> <mi>vRescInPixelsPerMeter</mi> <mo>•</mo> <mn>25.4</mn> <mo>•</mo> <msup> <mn>10</mn> <mi>-3</mi> </msup> </mrow> </math><a href="#fnref8" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
<li id="fn9" role="doc-endnote"><p>Calculated as: <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> <mi>hRescInPixelsPerMeter</mi> <mo>•</mo> <mn>25.4</mn> <mo>•</mo> <msup> <mn>10</mn> <mi>-3</mi> </msup> </mrow> </math><a href="#fnref9" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
<li id="fn10" role="doc-endnote"><p>Calculated as: <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> <mfrac> <mrow> <mi>vRdN</mi> </mrow> <mrow> <mi>vRdD</mi> </mrow> </mfrac> <mo>•</mo> <msup> <mn>10</mn> <mi>vRdE</mi> </msup> </mrow> </math><a href="#fnref10" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
<li id="fn11" role="doc-endnote"><p>Calculated as: <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> <mfrac> <mrow> <mi>hRdN</mi> </mrow> <mrow> <mi>hRdD</mi> </mrow> </mfrac> <mo>•</mo> <msup> <mn>10</mn> <mi>hRdE</mi> </msup> </mrow> </math><a href="#fnref11" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
<li id="fn12" role="doc-endnote"><p>Calculated as: <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> <mi>vResdInPixelsPerMeter</mi> <mo>•</mo> <mn>25.4</mn> <mo>•</mo> <msup> <mn>10</mn> <mi>-3</mi> </msup> </mrow> </math><a href="#fnref12" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
<li id="fn13" role="doc-endnote"><p>Calculated as: <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> <mi>hResdInPixelsPerMeter</mi> <mo>•</mo> <mn>25.4</mn> <mo>•</mo> <msup> <mn>10</mn> <mi>-3</mi> </msup> </mrow> </math><a href="#fnref13" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
<li id="fn14" role="doc-endnote"><p>Link: <a href="https://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/xmp/pdfs/cs6/XMPSpecificationPart3.pdf">https://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/xmp/pdfs/cs6/XMPSpecificationPart3.pdf</a><a href="#fnref14" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
<li id="fn15" role="doc-endnote"><p>However, support for start of packet (SOP) and end of packet (EPH) markers may be included in future versions.<a href="#fnref15" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
<li id="fn16" role="doc-endnote"><p>For example, in a TIFF to JP2 conversion workflow one could include a pixel-by-pixel comparison of the values in the TIFF and the JP2.<a href="#fnref16" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
<li id="fn17" role="doc-endnote"><p>Calculated as: <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> <mi>numberOfTiles</mi> <mo>=</mo> <mo>[</mo> <mfrac> <mrow> <mi>xsiz</mi> <mo>-</mo> <mi>xOsiz</mi> </mrow> <mrow> <mi>xTsiz</mi> </mrow> </mfrac> <mo>]</mo> <mo>•</mo> <mo>[</mo> <mfrac> <mrow> <mi>ysiz</mi> <mo>-</mo> <mi>yOsiz</mi> </mrow> <mrow> <mi>yTsiz</mi> </mrow> </mfrac> <mo>]</mo> </mrow> </math><a href="#fnref17" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
<li id="fn18" role="doc-endnote"><p>Only reported if the <code>--packetmarkers</code> option is used.<a href="#fnref18" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
<li id="fn19" role="doc-endnote"><p>Only reported if the <code>--packetmarkers</code> option is used.<a href="#fnref19" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
<li id="fn20" role="doc-endnote"><p>Only reported if the <code>--packetmarkers</code> option is used.<a href="#fnref20" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
<li id="fn21" role="doc-endnote"><p>Only reported if the <code>--packetmarkers</code> option is used.<a href="#fnref21" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
</ol>
</section>