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
|
<pre>Network Working Group L. McIntyre
Request for Comments: 2301 Xerox Corporation
Category: Standards Track S. Zilles
Adobe Systems, Inc.
R. Buckley
Xerox Corporation
D. Venable
Xerox Corporation
G. Parsons
Northern Telecom
J. Rafferty
Human Communications
March 1998
<span class="h1">File Format for Internet Fax</span>
Status of this Memo
This document specifies an Internet standards track protocol for the
Internet community, and requests discussion and suggestions for
improvements. Please refer to the current edition of the "Internet
Official Protocol Standards" (STD 1) for the standardization state
and status of this protocol. Distribution of this memo is unlimited.
Copyright Notice
Copyright (C) The Internet Society (1998). All Rights Reserved.
Abstract
This document describes the TIFF (Tag Image File Format)
representation of image data specified by the ITU-T Recommendations
for black-and-white and color facsimile. This file format
specification is commonly known as TIFF-FX. It formally defines
minimal, extended and lossless JBIG modes (Profiles S, F, J) for
black-and-white fax, and base JPEG, lossless JBIG and Mixed Raster
Content modes (Profiles C, L, M) for color and grayscale fax. These
modes or profiles correspond to the content of the applicable ITU-T
Recommendations. Files formatted according to this specification use
the image/tiff MIME Content Type.
<span class="grey">McIntyre, et. al. Standards Track [Page 1]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-2" ></span>
<span class="grey"><a href="./rfc2301">RFC 2301</a> File Format for Internet Fax March 1998</span>
Table of Contents
<a href="#section-1">1</a>. INTRODUCTION........................................................<a href="#page-4">4</a>
<a href="#section-1.1">1.1</a>. Scope..........................................................<a href="#page-5">5</a>
<a href="#section-1.2">1.2</a>. Approach.......................................................<a href="#page-5">5</a>
<a href="#section-1.3">1.3</a>. Overview of this draft.........................................<a href="#page-5">5</a>
<a href="#section-2">2</a>. TIFF and Fax........................................................<a href="#page-7">7</a>
<a href="#section-2.1">2.1</a>. TIFF Overview..................................................<a href="#page-7">7</a>
<a href="#section-2.1.1">2.1.1</a>. File Structure.............................................<a href="#page-7">7</a>
<a href="#section-2.1.2">2.1.2</a>. Image Structure............................................<a href="#page-9">9</a>
<a href="#section-2.1.3">2.1.3</a>. TIFF File Structure for Fax Applications..................<a href="#page-10">10</a>
<a href="#section-2.2">2.2</a> TIFF Fields for All Fax Applications...........................<a href="#page-11">11</a>
<a href="#section-2.2.1">2.2.1</a>. TIFF Fields required for all fax modes....................<a href="#page-12">12</a>
<a href="#section-2.2.2">2.2.2</a>. Additional TIFF Fields required for all fax modes.........<a href="#page-13">13</a>
<a href="#section-2.2.3">2.2.3</a>. TIFF Fields recommended for all fax modes.................<a href="#page-15">15</a>
<a href="#section-2.2.4">2.2.4</a>. New TIFF Fields recommended for fax modes.................<a href="#page-16">16</a>
<a href="#section-3">3</a>. Minimal Black-and-White Fax Mode...................................<a href="#page-18">18</a>
<a href="#section-3.1">3.1</a>. Overview......................................................<a href="#page-18">18</a>
<a href="#section-3.2">3.2</a>. Required TIFF Fields..........................................<a href="#page-18">18</a>
<a href="#section-3.2.1">3.2.1</a> Baseline Fields............................................<a href="#page-18">18</a>
<a href="#section-3.2.2">3.2.2</a> Extension Fields...........................................<a href="#page-20">20</a>
<a href="#section-3.2.3">3.2.3</a> New Fields.................................................<a href="#page-20">20</a>
<a href="#section-3.3">3.3</a>. Recommended TIFF Fields.......................................<a href="#page-20">20</a>
<a href="#section-3.4">3.4</a>. End of Line (EOL) and Return to Control (RTC).................<a href="#page-20">20</a>
<a href="#section-3.4.1">3.4.1</a> RTC Exclusion..............................................<a href="#page-21">21</a>
<a href="#section-3.5">3.5</a>. File Structure................................................<a href="#page-22">22</a>
<a href="#section-3.6">3.6</a>. Minimal Black-and-White Mode Summary..........................<a href="#page-23">23</a>
<a href="#section-4">4</a>. Extended Black-and-White Fax Mode..................................<a href="#page-24">24</a>
<a href="#section-4.1">4.1</a>. TIFF-F Overview...............................................<a href="#page-25">25</a>
<a href="#section-4.2">4.2</a>. Required TIFF Fields..........................................<a href="#page-26">26</a>
<a href="#section-4.2.1">4.2.1</a>. Baseline Fields...........................................<a href="#page-26">26</a>
<a href="#section-4.2.2">4.2.2</a>. Extension Fields..........................................<a href="#page-28">28</a>
<a href="#section-4.2.3">4.2.3</a>. New Fields................................................<a href="#page-29">29</a>
<a href="#section-4.3">4.3</a>. Recommended TIFF Fields.......................................<a href="#page-29">29</a>
<a href="#section-4.3.1">4.3.1</a>. Baseline Fields...........................................<a href="#page-29">29</a>
<a href="#section-4.3.2">4.3.2</a>. Extension Fields..........................................<a href="#page-29">29</a>
<a href="#section-4.3.3">4.3.3</a>. New Fields................................................<a href="#page-29">29</a>
<a href="#section-4.4">4.4</a>. Technical Implementation Issues...............................<a href="#page-30">30</a>
<a href="#section-4.4.1">4.4.1</a>. Strips....................................................<a href="#page-30">30</a>
<a href="#section-4.4.2">4.4.2</a>. Bit Order.................................................<a href="#page-31">31</a>
<a href="#section-4.4.3">4.4.3</a>. Multi-Page................................................<a href="#page-31">31</a>
<a href="#section-4.4.4">4.4.4</a>. Compression...............................................<a href="#page-31">31</a>
<a href="#section-4.4.5">4.4.5</a>. Example Use of Page-quality Fields........................<a href="#page-32">32</a>
4.4.6. Practical Guidelines for Writing and Reading Multi-Page
TIFF-F Files..............................................<a href="#page-33">33</a>
<a href="#section-4.4.7">4.4.7</a>. Use of TIFF-F for Streaming Applications..................<a href="#page-34">34</a>
<a href="#section-4.5">4.5</a>. Implementation Warnings.......................................<a href="#page-34">34</a>
<a href="#section-4.5.1">4.5.1</a>. Uncompressed Data.........................................<a href="#page-34">34</a>
<span class="grey">McIntyre, et. al. Standards Track [Page 2]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-3" ></span>
<span class="grey"><a href="./rfc2301">RFC 2301</a> File Format for Internet Fax March 1998</span>
<a href="#section-4.5.2">4.5.2</a>. Encoding and Resolution...................................<a href="#page-35">35</a>
<a href="#section-4.5.3">4.5.3</a>. EOL byte-aligned..........................................<a href="#page-35">35</a>
<a href="#section-4.5.4">4.5.4</a>. EOL.......................................................<a href="#page-36">36</a>
<a href="#section-4.5.5">4.5.5</a>. RTC Exclusion.............................................<a href="#page-36">36</a>
<a href="#section-4.5.6">4.5.6</a>. Use of EOFB for T.6 Compressed Images.....................<a href="#page-37">37</a>
<a href="#section-4.6">4.6</a>. Example Use of TIFF-F.........................................<a href="#page-37">37</a>
<a href="#section-4.7">4.7</a>. Extended Black-and-white Fax Mode Summary.....................<a href="#page-37">37</a>
<a href="#section-5">5</a>. Lossless JBIG Black-and-White Fax Mode.............................<a href="#page-39">39</a>
<a href="#section-5.1">5.1</a>. Overview......................................................<a href="#page-40">40</a>
<a href="#section-5.2">5.2</a>. Required TIFF Fields..........................................<a href="#page-40">40</a>
<a href="#section-5.2.1">5.2.1</a>. Baseline Fields...........................................<a href="#page-40">40</a>
<a href="#section-5.2.2">5.2.2</a>. Extension Fields..........................................<a href="#page-40">40</a>
<a href="#section-5.2.3">5.2.3</a>. New Fields................................................<a href="#page-41">41</a>
<a href="#section-5.3">5.3</a>. Recommended TIFF Fields.......................................<a href="#page-41">41</a>
<a href="#section-5.4">5.4</a>. Lossless JBIG Black-and-White Mode Summary....................<a href="#page-41">41</a>
<a href="#section-6">6</a>. Base Color Fax Mode................................................<a href="#page-43">43</a>
<a href="#section-6.1">6.1</a>. Overview......................................................<a href="#page-43">43</a>
<a href="#section-6.2">6.2</a>. Required TIFF Fields..........................................<a href="#page-43">43</a>
<a href="#section-6.2.1">6.2.1</a>. Baseline Fields...........................................<a href="#page-43">43</a>
<a href="#section-6.2.2">6.2.2</a>. Extension Fields..........................................<a href="#page-45">45</a>
<a href="#section-6.2.3">6.2.3</a>. New Fields................................................<a href="#page-46">46</a>
<a href="#section-6.3">6.3</a>. Recommended TIFF Fields.......................................<a href="#page-47">47</a>
<a href="#section-6.4">6.4</a>. Base Color Fax Mode Summary...................................<a href="#page-47">47</a>
<a href="#section-7">7</a>. Lossless Color Mode................................................<a href="#page-49">49</a>
<a href="#section-7.1">7.1</a>. Overview......................................................<a href="#page-50">50</a>
<a href="#section-7.1.1">7.1.1</a>. Color Encoding............................................<a href="#page-50">50</a>
<a href="#section-7.1.2">7.1.2</a>. JBIG Encoding.............................................<a href="#page-50">50</a>
<a href="#section-7.2">7.2</a>. Required TIFF Fields..........................................<a href="#page-51">51</a>
<a href="#section-7.2.1">7.2.1</a>. Baseline Fields...........................................<a href="#page-51">51</a>
<a href="#section-7.2.2">7.2.2</a>. Extension Fields..........................................<a href="#page-52">52</a>
<a href="#section-7.2.3">7.2.3</a>. New Fields................................................<a href="#page-53">53</a>
<a href="#section-7.3">7.3</a>. Recommended TIFF Fields.......................................<a href="#page-53">53</a>
<a href="#section-7.4">7.4</a>. Lossless Color Fax Mode Summary...............................<a href="#page-53">53</a>
<a href="#section-8">8</a>. Mixed Raster Content Mode..........................................<a href="#page-55">55</a>
<a href="#section-8.1">8.1</a> Overview.......................................................<a href="#page-55">55</a>
<a href="#section-8.1.1">8.1.1</a>. MRC 3-layer model.........................................<a href="#page-55">55</a>
<a href="#section-8.1.2">8.1.2</a>. A TIFF Representation for the MRC 3-layer model...........<a href="#page-56">56</a>
<a href="#section-8.2">8.2</a>. Required TIFF Fields..........................................<a href="#page-58">58</a>
<a href="#section-8.2.1">8.2.1</a>. Baseline Fields...........................................<a href="#page-58">58</a>
<a href="#section-8.2.2">8.2.2</a>. Extension Fields..........................................<a href="#page-59">59</a>
<a href="#section-8.2.3">8.2.3</a>. New Fields................................................<a href="#page-60">60</a>
<a href="#section-8.3">8.3</a>. Recommended TIFF Fields.......................................<a href="#page-62">62</a>
<a href="#section-8.4">8.4</a>. Rules and Requirements for Images.............................<a href="#page-62">62</a>
<a href="#section-8.5">8.5</a>. MRC Fax Mode Summary..........................................<a href="#page-63">63</a>
<a href="#section-9">9</a>. MIME content-type image/tiff.......................................<a href="#page-66">66</a>
9.1 Refinement of MIME content-type image/tiff for Facsimile
Applications...................................................<a href="#page-66">66</a>
<a href="#section-10">10</a>. Security Considerations...........................................<a href="#page-67">67</a>
<span class="grey">McIntyre, et. al. Standards Track [Page 3]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-4" ></span>
<span class="grey"><a href="./rfc2301">RFC 2301</a> File Format for Internet Fax March 1998</span>
<a href="#section-11">11</a>. References........................................................<a href="#page-67">67</a>
<a href="#section-12">12</a>. Authors' Addresses................................................<a href="#page-69">69</a>
Annex A: Summary of TIFF Fields for Internet Fax .....................<a href="#page-70">70</a>
Annex B. IANA Registration for image/tiff Application Parameter
Values used for facsimile....................................<a href="#page-75">75</a>
Full Copyright Statement..............................................<a href="#page-77">77</a>
<span class="h2"><a class="selflink" id="section-1" href="#section-1">1</a>. Introduction</span>
This document describes the use of TIFF (Tag Image File Format) to
represent the data content and structure generated by the current
suite of ITU-T Recommendations for Group 3 facsimile. These
Recommendations and the TIFF fields described here support the
following facsimile modes or profiles:
S: minimal black-and-white mode, using binary MH compression
[<a href="#ref-T.4" title="Standardization of group 3 facsimile apparatus for document transmission">T.4</a>]
F: extended black-and-white mode, using binary MH, MR and MMR
compression [<a href="#ref-T.4" title="Standardization of group 3 facsimile apparatus for document transmission">T.4</a>, <a href="#ref-T.6" title="Facsimile coding schemes and coding control functions for group 4 facsimile apparatus">T.6</a>]
J: lossless JBIG black-and-white mode, with JBIG compression
[<a href="#ref-T.85" title="Application profile for Recommendation T.82 - Progressive bi-level image compression (JBIG coding scheme) for facsimile apparatus">T.85</a>, <a href="#ref-T.82" title="Information technology - Coded representation of picture and audio information - Progressive bi- level image compression">T.82</a>]
C: lossy color and grayscale mode, using JPEG compression
[<a href="#ref-T.42" title="Continuous-tone colour representation method for facsimile">T.42</a>, <a href="#ref-T.81" title="Information technology - Digital compression and coding of continuous-tone still images - Requirements and guidelines">T.81</a>]
L: lossless color and grayscale mode, using JBIG compression
[<a href="#ref-T.43" title="Colour and gray-scale image representations using lossless coding scheme for facsimile">T.43</a>, <a href="#ref-T.82" title="Information technology - Coded representation of picture and audio information - Progressive bi- level image compression">T.82</a>]
M: mixed raster content mode [<a href="#ref-T.44" title="Mixed Raster Content (MRC)">T.44</a>], using a combination of
existing compression methods
Each profile corresponds to the content of ITU-T Recommendations
shown and is a subset of the full TIFF for facsimile specification.
Profile S describes a minimal interchange set of fields, which will
guarantee that, at least, binary black-and-white images will be
supported. Implementations are required to support this minimal
interchange set of fields.
With the intent of specifying a file format for Internet Fax, this
draft:
1. specifies the structure of TIFF files for facsimile data,
2. defines ITU fax-compatible values for existing TIFF fields,
3. defines new TIFF fields and values required for compatibility
with ITU color fax.
This specification of TIFF for facsimile is known as TIFF-FX.
<span class="grey">McIntyre, et. al. Standards Track [Page 4]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-5" ></span>
<span class="grey"><a href="./rfc2301">RFC 2301</a> File Format for Internet Fax March 1998</span>
<span class="h3"><a class="selflink" id="section-1.1" href="#section-1.1">1.1</a> Scope</span>
This document defines a TIFF-based file format specification for
enabling standardized messaging-based fax over the Internet. It
specifies the TIFF fields and field values required for compatibility
with the existing ITU-T Recommendations for Group 3 black-and-white,
grayscale and color facsimile. TIFF has historically been used for
handling fax image files in applications such as store-and-forward
messaging. Implementations that support this file format
specification for import/export may elect to support it as a native
format. This document recommends a TIFF file structure that is
compatible with low-memory and page-level streaming implementations.
Unless otherwise noted, the current TIFF specification [<a href="#ref-TIFF" title="Revision 6.0">TIFF</a>] and
selected TIFF Technical Notes [<a href="#ref-TTN1" title="1995">TTN1</a>, <a href="#ref-TTN2" title="1995">TTN2</a>] are the primary references
for describing TIFF and defining TIFF fields. This document is the
primary reference for defining TIFF field values for fax
applications.
<span class="h3"><a class="selflink" id="section-1.2" href="#section-1.2">1.2</a> Approach</span>
The basic approach to using TIFF for facsimile data is to insert the
compressed fax image data in a TIFF file and use TIFF fields to
encode the parameters that describe the image data. These fields will
have values that comply with the ITU-T Recommendations. The MIME
content type of the resulting file will be image/tiff, with an
optional Application parameter [<a href="#ref-TIFF-REG" title=""Tag Image File Format (TIFF) - image/tiff MIME Sub-type Registration"">TIFF-REG</a>]; see <a href="#section-9">Section 9</a>.
This approach takes advantage of TIFF features and structures that
bridge the data formats and performance requirements of both legacy
fax machines and host-based fax applications. TIFF constructs for
pages, images, and strips allow a TIFF file to preserve the fax data
stream structure and the performance advantages that come with it. A
TIFF-based approach also builds on an established base of users and
implementors and ensures backward compatibility with existing TIFF-
based IETF proposals and work in progress for Internet fax.
<span class="h3"><a class="selflink" id="section-1.3" href="#section-1.3">1.3</a> Overview of this draft</span>
<a href="#section-2">Section 2</a> gives an overview of TIFF. <a href="#section-2.1">Section 2.1</a> describes the
structure of TIFF files, including general guidelines for structuring
multi-page TIFF files. <a href="#section-2.2">Section 2.2</a> lists the TIFF fields that are
required or recommended for all fax modes. The TIFF fields used only
by specific fax modes are described in Sections <a href="#section-3">3</a>-<a href="#section-8">8</a>, which describe
the individual fax modes. These sections also specify the ITU-
compatible field values (image parameters) for each mode.
<span class="grey">McIntyre, et. al. Standards Track [Page 5]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-6" ></span>
<span class="grey"><a href="./rfc2301">RFC 2301</a> File Format for Internet Fax March 1998</span>
The full set of permitted fields of TIFF for facsimile are included
in the current TIFF specification, <a href="#section-2">Section 2</a> of this document and the
sections on specific modes of facsimile operation. This document
defines profiles of TIFF for facsimile, where a profile is a subset
of the full set of permitted fields and field values of TIFF for
facsimile.
<a href="#section-3">Section 3</a> defines the minimal black-and-white facsimile mode (Profile
S), which is required in all implementations. <a href="#section-4">Section 4</a> defines the
extended black-and-white fax mode (Profile F), which provides a
standard definition of TIFF-F. <a href="#section-5">Section 5</a> describes the lossless
black-and-white mode using JBIG compression (Profile J). <a href="#section-6">Section 6</a>
defines the base color mode, required in all color implementations,
for the lossy JPEG representation of color and grayscale facsimile
data (Profile C). <a href="#section-7">Section 7</a> defines the lossless JBIG color and
grayscale facsimile mode (Profile L) and <a href="#section-8">Section 8</a> defines the Mixed
Raster Content facsimile mode (Profile M). Each of these sections
concludes with a table summarizing the required and recommended
fields for each mode and the values they can have.
<a href="#section-9">Section 9</a> describes the MIME content type image/tiff and the use of
the optional Application parameter in connection with TIFF for
facsimile. Sections <a href="#section-10">10</a>, <a href="#section-11">11</a>, <a href="#section-12">12</a> and <a href="#section-13">13</a> give Security Considerations,
the ISOC Copyright Notice, References and Authors' Addresses. Annex A
gives a summary of the TIFF fields used or defined in this document
and provides a convenient reference for implementors.
To implement only the minimal interchange black-and-white set of
fields and values (Profile S), one need read only Sections <a href="#section-1">1</a>, <a href="#section-2">2</a>, <a href="#section-3">3</a>, <a href="#section-9">9</a>
and 10.
The following tree diagram shows the relationship among profiles and
between profiles and coding methods.
S (MH)
/ \
B&W / \ Color
------------ ----------
/ \ \
/ F (MMR, MR) C (JPEG)
/ / \
J (JBIG) ---- \
/ \
L (JBIG) \
\
M (MRC)
A profile is based on a collection of ITU-T facsimile coding methods.
<span class="grey">McIntyre, et. al. Standards Track [Page 6]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-7" ></span>
<span class="grey"><a href="./rfc2301">RFC 2301</a> File Format for Internet Fax March 1998</span>
For example, Profile S, the minimal mode, is based on Modified
Huffman (MH) compression, which are defined in ITU-T Rec. T.4.
Profile F specifies Modified Read (MR) and Modified Modified Read
(MMR) compressions, which are defined in ITU-T Rec. T.4 and T.6.
All implementations of TIFF for facsimile MUST implement Profile S,
which is the root node of the tree. All color implementations of TIFF
for facsimile MUST implement Profile C. The implementation of a
particular profile MUST also implement those profiles on the path
that connect it to the root node, and MAY optionally implement
profiles not on the path connecting it to the root node. For example,
an implementation of Profile M must also implement Profiles C and S,
and may optionally implement Profile F, J or L. For another example,
an implementation of Profile C must also implement Profile S, and may
optionally implement Profile F or J.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", " NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in [<a href="#ref-REQ" title=""Key words for use in RFCs to Indicate Requirement Levels"">REQ</a>].
<span class="h2"><a class="selflink" id="section-2" href="#section-2">2</a>. TIFF and Fax</span>
<span class="h3"><a class="selflink" id="section-2.1" href="#section-2.1">2.1</a>. TIFF Overview</span>
TIFF provides a means for describing, storing and interchanging
raster image data. A primary goal of TIFF is to provide a rich
environment within which applications can exchange image data. The
current TIFF specification [<a href="#ref-TIFF" title="Revision 6.0">TIFF</a>] defines a commonly used, core set
of TIFF fields known as Baseline TIFF. The current specification and
TIFF Technical Notes 1 and 2 [<a href="#ref-TTN1" title="1995">TTN1</a>, <a href="#ref-TTN2" title="1995">TTN2</a>] define several TIFF
extensions. The TIFF- based specification for fax applications uses a
subset of Baseline TIFF fields, with selected extensions, as
described in this document. In a few cases, this document defines new
TIFF fields specifically for fax applications.
<span class="h4"><a class="selflink" id="section-2.1.1" href="#section-2.1.1">2.1.1</a>. File Structure</span>
TIFF is designed for raster images, which makes it a good match for
facsimile documents, which are multi-page raster images. Each raster
image consists of a number of rows or scanlines, each of which has
the same number of pixels, the unit of sampling. Each pixel has at
least one sample or component (exactly one for black-and-white
images).
A TIFF file begins with an 8-byte image file header. The first two
bytes describe the byte order used within the file. Legal values are
"II" (0x4949) when bytes are ordered from least to most significant
(little- endian), and "MM" (0x4D4D), when bytes are ordered from most
<span class="grey">McIntyre, et. al. Standards Track [Page 7]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-8" ></span>
<span class="grey"><a href="./rfc2301">RFC 2301</a> File Format for Internet Fax March 1998</span>
to least significant (big-endian) within a 16- or 32-bit integer.
Either byte order can be used, except in the case of the minimal
black-and-white mode, which SHALL use value "II". The next two bytes
contain the value 42 that identifies the file as a TIFF file and is
ordered according to the value in the first two bytes of the header.
The last four bytes give the offset that points to the first image
file directory (IFD). This and all other offsets in a TIFF file are
with respect to the beginning of the TIFF file. An IFD can be at any
location in the file after the header but must begin on a word
boundary.
An IFD is a sequence of tagged fields, sorted in ascending order by
tag value. An IFD consists of a 2-byte count of the number of fields,
a sequence of field entries and a 4-byte offset to the next IFD. The
fields contain information about the image and pointers to the image
data. Each separate raster image in the file is represented by an
IFD.
Each field entry in an IFD has 12 bytes and consists of a 2-byte Tag,
2 bytes identifying the field type (e.g. short, long, rational,
ASCII), 4 bytes giving the count (number of values or offsets), and 4
bytes that either contain the offset to a field value stored outside
the IFD, or, based on the type and count, the field value itself.
Resolution and metadata such as dates, names and descriptions are
examples of "long" field values that do not fit in 4 bytes and
therefore use offsets in the field entry. Details are given in the
TIFF specification [<a href="#ref-TIFF" title="Revision 6.0">TIFF</a>].
A TIFF file can contain more than one IFD, where each IFD is a
subfile whose type is given in the NewSubfileType field. Multiple
IFDs can be organized either as a linked list, with the last entry in
each IFD pointing to the next IFD (the pointer in the last IFD is 0),
or as a tree, using the SubIFDs field in the primary IFD [<a href="#ref-TTN1" title="1995">TTN1</a>]. The
SubIFDs field contains an array of pointers to child IFDs of the
primary IFD.
Child IFDs describe related images, such as reduced resolution
versions of the primary IFD image. The same IFD can point both to a
next IFD and to child IFDs, and child IFDs can themselves point to
other IFDs.
All fax modes represent a multi-page fax image as a linked list of
IFDs, with a NewSubfileType field containing a bit that identifies
the IFD as one page of a multi-page document. Each IFD has a
PageNumber field, identifying the page number in ascending order,
starting at 0 for the first page. While a Baseline TIFF reader is not
<span class="grey">McIntyre, et. al. Standards Track [Page 8]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-9" ></span>
<span class="grey"><a href="./rfc2301">RFC 2301</a> File Format for Internet Fax March 1998</span>
required to read any IFDs beyond the first, an implementation that
reads the files that comply with this specification SHALL read
multiple IFDs. Only the Mixed Raster Content fax mode, described in
<a href="#section-8">Section 8</a>, requires the use of child IFDs.
The following figure illustrates the structure of a multi-page TIFF
file.
+-----------------------+
| Header |------------+
+-----------------------+ | First IFD
| IFD (page 0) |<-----------+ Offset
+---| |------------+
Value | +-----------------------+ |
Offset +-->| Long Values |--+ |
+-----------------------| | Strip |
| Image Data |<-+ Offset |
| strip 1 page 0 | | |
+-----------------------+ | |
| : | : |
|
+-----------------------+ | Next IFD
| IFD (page 1) |<-----------+ Offset
+---| |------------+
Value | +-----------------------+ |
Offset +-->| Long Values |--+ |
+-----------------------| | Strip |
| Image Data |<-+ Offset |
| strip 1 page 1 | | |
+-----------------------+ | |
| strip 2 page 1 |<-+ |
+-----------------------+ | |
| : | : |
|
+-----------------------+ | Next IFD
| IFD (page 2) |<-----------+ Offset
| : |
<span class="h4"><a class="selflink" id="section-2.1.2" href="#section-2.1.2">2.1.2</a> Image Structure</span>
An IFD stores an image as one or more strips, as shown in the
preceding figure. A strip consists of 1 or more scanlines (rows) of
raster image data in compressed form. An image may be stored in a
single strip or may be divided into several strips, which would
require less memory to buffer. (Baseline TIFF recommends about 8k
bytes per strip, but existing fax usage is typically one strip per
image.)
<span class="grey">McIntyre, et. al. Standards Track [Page 9]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-10" ></span>
<span class="grey"><a href="./rfc2301">RFC 2301</a> File Format for Internet Fax March 1998</span>
Each IFD requires three strip-related fields: StripOffsets,
RowsPerStrip and StripByteCounts. The StripOffsets field is an array
of pointers to the strip or strips that contain the actual image
data. The StripByteCounts field gives the number of bytes in each
strip after compression. TIFF requires that each strip, except the
last, contain the same number of scanlines, which is given in the
RowsPerStrip field. This document introduces the new StripRowCounts
field that allows a variable number of scanlines per strip, which is
required by the Mixed Raster Content fax mode (<a href="#section-8">Section 8</a>).
Image data is stored as uninterpreted, compressed image data streams
within a strip. The formats of these streams follow the ITU-T
Recommendations. The Compression field in the IFD indicates the type
of compression, and other TIFF fields in the IFD describe image
attributes, such as color encoding and spatial resolution.
Compression parameters are stored in the compressed data stream,
rather than in TIFF fields. This makes the TIFF representation and
compressed data format specification independent of each another.
This approach, modeled on [<a href="#ref-TTN2" title="1995">TTN2</a>], allows TIFF to gracefully add new
compression schemes as they become available.
Some attributes can be specified both in the compressed data stream
and within a TIFF field. It is possible that the two values will
differ. When this happens for values required to interpret the data
stream, then the values in the data stream take precedence. For
informational values that are not required to interpret the data
stream, such as author name, then the TIFF field value takes
precedence.
<span class="h4"><a class="selflink" id="section-2.1.3" href="#section-2.1.3">2.1.3</a> TIFF File Structure for Fax Applications</span>
The TIFF specification has a very flexible file structure, which does
not specify the ordering of IFDs, field values and image data in a
file. Individual applications may require or recommend an ordering.
This specification recommends that when using a TIFF file for
facsimile, A multi-page fax document SHOULD be represented as a
linked list of IFDs. It also recommends that a TIFF file for
facsimile SHOULD order pages in a TIFF file in the same way that they
are ordered in a fax data stream. In a TIFF file, a page consists of
several elements: one or more IFDs (including subIFDs), long field
values that are stored outside the IFDs, and image data (in one or
more strips).
The minimal black-and-white mode (Profile S) specifies a required
ordering of pages and elements within a page (<a href="#section-3.5">Section 3.5</a>). The
extended black-and-white mode (Profile F) provides guidelines for
ordering pages and page elements (<a href="#section-4.4.6">Section 4.4.6</a>). Other profiles
<span class="grey">McIntyre, et. al. Standards Track [Page 10]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-11" ></span>
<span class="grey"><a href="./rfc2301">RFC 2301</a> File Format for Internet Fax March 1998</span>
SHOULD follow these guidelines. This recommendation is intended to
simplify the implementation of TIFF writers and readers in fax
applications and the conversion between TIFF file and fax data stream
representations. However, for interchange robustness, readers SHOULD
be prepared to read TIFF files whose structure is consistent with
[<a href="#ref-TIFF" title="Revision 6.0">TIFF</a>], which supports a more flexible file structure than is
recommended here.
This specification introduces an optional new GlobalParametersIFD
field, defined in <a href="#section-2.2.4">Section 2.2.4</a>. This field has type IFD and
indicates parameters describing the fax session. While it is often
possible to obtain these parameters by scanning the file, it is
convenient to make them available together in one place for fast and
easy access. If the GlobalParametersIFD occurs in a TIFF file, it
SHOULD be located in the first IFD, immediately following the 8-byte
image file header.
<span class="h3"><a class="selflink" id="section-2.2" href="#section-2.2">2.2</a> TIFF Fields for All Fax Applications</span>
The TIFF specification [<a href="#ref-TIFF" title="Revision 6.0">TIFF</a>] is organized as a baseline set and
several extensions, including technical notes [<a href="#ref-TTN1" title="1995">TTN1</a>, <a href="#ref-TTN2" title="1995">TTN2</a>] that will
be incorporated in the next release of TIFF. The baseline and
extensions have required and optional fields.
Facsimile applications require (and recommend) a mixture of baseline
and extensions fields, as well as some new fields that are not part
of the TIFF specification and that are defined in this document. This
sub- section lists the fields that are required or recommended for
all modes. In particular, <a href="#section-2.2.1">Section 2.2.1</a> lists the fields that are
required by all modes and that have values that do not depend on the
mode. <a href="#section-2.2.2">Section 2.2.2</a> lists the fields that are required by all modes
and that have values which do depend on the mode. <a href="#section-2.2.3">Section 2.2.3</a> lists
the fields that are recommended for all modes. Fields that are
required or recommended by some but not all modes are given in the
section (<a href="#section-3">Section 3</a>-8) that describes that mode. The sections for each
fax mode have sub-sections for required and recommended fields; each
sub-section organizes the fields according to whether they are
baseline, extension or new.
The fields required for facsimile have only a few legal values,
specified in the ITU-T Recommendations. Of these legal values, some
are required and some are optional, just as they are required
(mandatory) or optional in fax implementations that conform to the
ITU-T Recommendations. The required and optional values are noted in
the sections on the different fax modes.
<span class="grey">McIntyre, et. al. Standards Track [Page 11]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-12" ></span>
<span class="grey"><a href="./rfc2301">RFC 2301</a> File Format for Internet Fax March 1998</span>
This section describes the fields required or recommended by all fax
modes. The pattern for the description of TIFF fields in this draft
is:
FieldName(TagValueInDecimal) = allowable values. TYPE
WhetherRequiredByTIFForTIFFforFAX
Count = (omitted if =1) = (if not in current spec but available)
Explanation of the field, how it's used, and the values it can have.
Default value, if any, as specified in [<a href="#ref-TIFF" title="Revision 6.0">TIFF</a>]
When a field's default value is the desired value, that field may be
omitted from the relevant IFD unless specifically required by the
text of this specification.
<span class="h4"><a class="selflink" id="section-2.2.1" href="#section-2.2.1">2.2.1</a>. TIFF fields required for all fax modes</span>
The TIFF fields listed in this section SHALL be used by all fax
modes, but have field values that are not specified by the ITU
standards, i.e. the fields do not depend on the mode. The next sub-
section lists the fields that SHALL be used by all fax modes, but
which do have values specified by the ITU-specified or mode-specific
values. Fields that SHALL be used by some but not all modes are given
in the sections (3-8) which describe the modes that uses them.
ImageLength(257) SHORT or LONG
RequiredByTIFFBaseline
Total number of scanlines in image.
No default, must be specified.
PageNumber(297) SHORT
RequiredByTIFFforFAX, TIFFExtension
Count = 2
The first number represents the page number (0 for the first page);
the second number is the total number of pages in the document. If
the second value is 0, then the total page count is not available.
No default, must be specified
RowsPerStrip(278) SHORT or LONG
RequiredByTIFFBaseline
The number of scanlines per TIFF strip, except for the last strip.
For a single strip image, this is the same as the value of the
ImageLength field.
Default = 2**32 - 1 (meaning all scanlines in one strip)
StripByteCounts(279) SHORT or LONG
RequiredByTIFFBaseline
Count = number of strips
For each strip, the number of bytes in that strip after compression.
<span class="grey">McIntyre, et. al. Standards Track [Page 12]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-13" ></span>
<span class="grey"><a href="./rfc2301">RFC 2301</a> File Format for Internet Fax March 1998</span>
No default, must be specified.
StripOffsets(273) SHORT or LONG
RequiredByTIFFBaseline
Count = number of strips
For each strip, the byte offset from the beginning of the file to
the start of that strip.
No default, must be specified.
<span class="h4"><a class="selflink" id="section-2.2.2" href="#section-2.2.2">2.2.2</a> Additional TIFF fields required for all fax modes</span>
The TIFF fields listed in this section SHALL be used by all fax
modes, but the values associated with them depend on the mode being
described and the associated ITU Recommendations. Therefore, only the
fields are defined here; the values applicable to a particular fax
mode are described in Sections <a href="#section-3">3</a>-<a href="#section-8">8</a>. Fields that SHALL be used by some
but not all modes are given in the section (3-8) describing the mode
that uses them.
BitsPerSample(258) SHORT
RequiredByTIFFBaseline
Number of bits per image sample
Default = 1 (field may be omitted if this is the value)
Compression(259) SHORT
RequiredByTIFFBaseline
Compression method used for image data
Default = 1 (no compression, so may not be omitted for FAX)
FillOrder(266) SHORT
RequiredByTIFFforFax
The default bit order in Baseline TIFF per [<a href="#ref-TIFF" title="Revision 6.0">TIFF</a>] is indicated by
FillOrder=1, where bits are not reversed before being stored.
However, TIFF for Fax typically utilizes the setting of FillOrder=2,
where the bit order within bytes is reversed before storage (i.e.,
bits are stored with the Least Significant Bit first).
Default = 1 (field may be omitted if this is the value)
Facsimile data appears on the phone line in bit-reversed order
relative to its description in the relevant ITU compression
Recommendation. Therefore, a wide majority of facsimile
implementations choose this natural order for storage. Nevertheless,
all readers conforming to this specification must be able to read
data in both bit orders.
ImageWidth(256) SHORT or LONG
RequiredByTIFFBaseline
The number of pixels (columns) per scanline (row) of the image
No default, must be specified.
<span class="grey">McIntyre, et. al. Standards Track [Page 13]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-14" ></span>
<span class="grey"><a href="./rfc2301">RFC 2301</a> File Format for Internet Fax March 1998</span>
NewSubFileType(254) LONG
RequiredByTIFFforFAX
A general indication of the kind of data contained in this IFD
Bit 1 is 1 if the image is a single page of a multi-page document.
Default = 0 (no subfile bits on, so may not be omitted for FAX)
PhotometricInterpretation(262) SHORT
RequiredByTIFFBaseline
The color space of the image data
No default, must be specified
ResolutionUnit(296) SHORT
RequiredByTIFFBaseline
The unit of measure for resolution. 2 = inch, 3 = centimeter;
Default = 2 (field may be omitted if this is the value)
SamplesPerPixel(277) SHORT
RequiredByTIFFBaseline
The number of color components per pixel; SamplesPerPixel is 1 for a
black-and-white, grayscale or indexed (palette) image.
Default =1 (field may be omitted if this is the value)
XResolution(282) RATIONAL
RequiredByTIFFBaseline
The horizontal resolution of the image in pixels per resolution
unit. The ITU-T Recommendations for facsimile specify a small number
of horizontal resolutions: 100, 200, 300, 400 pixels per inch, and
80, 160 pixels per centimeter (or 204, 408 pixels per inch). The
allowed XResolution values for each mode are given in the section
defining that mode. Per [<a href="#ref-T.4" title="Standardization of group 3 facsimile apparatus for document transmission">T.4</a>], it is permissible for applications to
treat the following XResolution values as being equivalent: <204,
200> and <400,408> in pixels/inch. These equivalencies were allowed
by [<a href="#ref-T.4" title="Standardization of group 3 facsimile apparatus for document transmission">T.4</a>] to permit conversions between inch and metric based
facsimile terminals.
TIFF for Facsimile Writers SHOULD express XResolution in inch based
units, for consistency with historical practice and to maximize
interoperability. See the table below for information on how to
convert from an ITU-T metric value to its inch based equivalent
resolution.
No default, must be specified
YResolution(283) RATIONAL
RequiredByTIFFBaseline
The vertical resolution of the image in pixels per resolution unit.
The ITU-T Recommendations for facsimile specify a small number of
vertical resolutions: 100, 200, 300, 400 pixels per inch, and 38.5,
77, 154 pixels per centimeter (or 98, 196, 391 pixels per inch). The
allowed YResolution values for each mode are given in the section
<span class="grey">McIntyre, et. al. Standards Track [Page 14]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-15" ></span>
<span class="grey"><a href="./rfc2301">RFC 2301</a> File Format for Internet Fax March 1998</span>
defining that mode. Per [<a href="#ref-T.4" title="Standardization of group 3 facsimile apparatus for document transmission">T.4</a>], it is permissible for applications to
treat the following YResolution values as being equivalent: <98,
100>, <196, 200>, and <391, 400> in pixels/inch. These equivalencies
were allowed by [<a href="#ref-T.4" title="Standardization of group 3 facsimile apparatus for document transmission">T.4</a>] to permit conversions between inch and metric
based facsimile terminals. TIFF for Facsimile Writers SHOULD express
YResolution in inch based units, for consistency with historical
practice and to maximize interoperability. See the table below for
information on how to convert from an ITU-T metric value to its inch
based equivalent resolution. No default, must be specified
+-----------------------------+-----------------------------+
| XResolution | YResolution |
+--------------+--------------+--------------+--------------+
|ResolutionUnit|ResolutionUnit|ResolutionUnit|ResolutionUnit|
| =2 (inch) | =3 (cm) | =2 (inch) | =3 (cm) |
+--------------+--------------+--------------+--------------+
| 100 | | 100 | |
+--------------+--------------+--------------+--------------+
| 204 | 80 | 98 | 38.5 |
| 200 | | 100 | |
+--------------+--------------+--------------+--------------+
| 204 | 80 | 196 | 77 |
| 200 | | 200 | |
+--------------+--------------+--------------+--------------+
| 204 | 80 | 391 | 154 |
+--------------+--------------+--------------+--------------+
| 300 | | 300 | |
+--------------+--------------+--------------+--------------+
| 408 | 160 | 391 | 154 |
| 400 | | 400 | |
+--------------+--------------+--------------+--------------+
<span class="h4"><a class="selflink" id="section-2.2.3" href="#section-2.2.3">2.2.3</a> TIFF fields recommended for all fax modes</span>
The TIFF fields listed in this section MAY be used by all fax modes.
However, Profile S writers (the minimal fax mode described in <a href="#section-3">Section</a>
<a href="#section-3">3</a>) SHOULD NOT use these fields. Recommended fields that are mode-
specific are described in Sections <a href="#section-3">3</a>-<a href="#section-8">8</a>.
DateTime(306) ASCII
OptionalInTIFFBaseline
Date/time of image creation in 24-hour format "YYYY:MM:DD HH:MM:SS".
No default.
DocumentName(269) ASCII
OptionalInTIFFExtension(DocumentStorageAndRetrieval)
The name of the scanned document. This is a TIFF extension field,
not a Baseline TIFF field.
<span class="grey">McIntyre, et. al. Standards Track [Page 15]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-16" ></span>
<span class="grey"><a href="./rfc2301">RFC 2301</a> File Format for Internet Fax March 1998</span>
No default.
ImageDescription(270) ASCII
OptionalInTIFFBaseline
A string describing the contents of the image.
No default.
Orientation(274) = 1-8. SHORT
OptionalinTIFFBaseline
1: 0th row represents the visual top of the image; the 0th column
represents the visual left side of the image. See the current TIFF
spec [<a href="#ref-TIFF" title="Revision 6.0">TIFF</a>] for further values; Baseline TIFF only requires value=1.
Default = 1.
Note: It is recommended that a writer that is aware of the
orientation will include this field to give a positive indication of
the orientation, even if the value is the default. If the
Orientation field is omitted, the reader SHALL assume a value of 1.
Software(305) ASCII
OptionalInTIFFBaseline
The optional name and release number of the software package that
created the image.
No default.
<span class="h4"><a class="selflink" id="section-2.2.4" href="#section-2.2.4">2.2.4</a> New TIFF fields recommended for fax modes</span>
The new TIFF fields listed in this section MAY be used by all fax
modes, but their support is not expected for the minimal fax mode
described in <a href="#section-3">Section 3</a>. In addition, support for these new TIFF
fields has not been included in historical TIFF-F readers described
in <a href="#section-4">Section 4</a> and [TIFF- F]. These fields describe "global" parameters
of the fax session that created the image data. They are optional,
not part of the current TIFF specification, and are defined in this
document.
The first new field, GlobalParametersIFD, is an IFD that contains
global parameters and is located in a Primary IFD.
GlobalParametersIFD (400) IFD
An IFD containing global parameters. It is recommended that a TIFF
writer place this field in the first IFD, where a TIFF reader would
find it quickly.
Each field in the GlobalParametersIFD is a TIFF field that is legal
in any IFD. Required baseline fields should not be located in the
GlobalParametersIFD, but should be in each image IFD. If a conflict
exists between fields in the GlobalParametersIFD and in the image
IFDs, then the data in the image IFD shall prevail.
<span class="grey">McIntyre, et. al. Standards Track [Page 16]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-17" ></span>
<span class="grey"><a href="./rfc2301">RFC 2301</a> File Format for Internet Fax March 1998</span>
Among the GlobalParametersIFD entries is a new ProfileType field
which generally describes information in this IFD and in the TIFF
file.
ProfileType(401) LONG
The type of image data stored in this IFD.
0 = Unspecified
1 = Group 3 fax
No default
The following new global fields are defined in this document as IFD
entries for use with fax applications.
FaxProfile(402) = 0 - 6. BYTE
The profile that applies to this file; a profile is subset of the
full set of permitted fields and field values of TIFF for facsimile.
The currently defined values are:
0: does not conform to a profile defined for TIFF for facsimile
1: minimal black & white lossless, Profile S
2: extended black & white lossless, Profile F
3: lossless JBIG black & white, Profile J
4: lossy color and grayscale, Profile C
5: lossless color and grayscale, Profile L
6: Mixed Raster Content, Profile M
CodingMethods(403) LONG
This field indicates which coding methods are used in the file. A
bit value of 1 indicates which of the following coding methods is
used:
Bit 0: unspecified compression,
Bit 1: 1-dimensional coding, ITU-T Rec. T.4 (MH - Modified Huffman),
Bit 2: 2-dimensional coding, ITU-T Rec. T.4 (MR - Modified Read),
Bit 3: 2-dimensional coding, ITU-T Rec. T.6 (MMR - Modified MR),
Bit 4: ITU-T Rec. T.82 coding, using ITU-T Rec. T.85 (JBIG),
Bit 5: ITU-T Rec. T.81 (Baseline JPEG),
Bit 6: ITU-T Rec. T.82 coding, using ITU-T Rec. T.43 (JBIG color),
Bits 7-31: reserved for future use
Note: There is a limit of 32 compression types to identify standard
compression methods.
VersionYear(404) BYTE
Count: 4
The year of the standard specified by the FaxProfile field, given as
4 characters, e.g. '1997'; used in lossy and lossless color modes.
ModeNumber (405) BYTE
The mode of the standard specified by the FaxProfile field. A
value of 0 indicates Mode 1.0; used in Mixed Raster Content mode.
<span class="grey">McIntyre, et. al. Standards Track [Page 17]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-18" ></span>
<span class="grey"><a href="./rfc2301">RFC 2301</a> File Format for Internet Fax March 1998</span>
<span class="h2"><a class="selflink" id="section-3" href="#section-3">3</a>. Minimal Black-and-White Fax Mode</span>
This section defines the minimal black-and-white subset of TIFF for
facsimile. This subset is designated Profile S. All implementations
of TIFF for facsimile SHALL support the minimal subset.
Black-and-white mode is the binary fax application most users are
familiar with today. This mode is appropriate for black-and-white
text and line art. Black-and-white mode is divided into two levels of
capability. This section describes the minimal interchange set of
TIFF fields that must be supported by all implementations in order to
assure that some form of image, albeit black-and-white, can be
interchanged. This minimum interchange set is a strict subset of the
fields and values defined for the extended black-and-white mode
(TIFF-F or Profile F) in <a href="#section-4">Section 4</a>, which describes extensions to the
minimal interchange set of fields that provide a richer set of
black-and-white capabilities.
<span class="h3"><a class="selflink" id="section-3.1" href="#section-3.1">3.1</a>. Overview</span>
The minimal interchange portion of the black-and-white facsimile mode
supports 1-dimensional Modified Huffman (MH) compression, with the
original Group 3 fax resolutions, commonly called "standard" and
"fine."
To assure interchange, this mode uses the minimal set of fields, with
a minimal set of values. There are no recommended fields in this
mode. Further, the TIFF file is required to be "little endian," which
means that the byte order value in the TIFF header is "II". This mode
defines a required ordering for the pages in a fax document and for
the IFDs and image data of a page. It also requires that a single
strip contain the image data for each page; see <a href="#section-3.5">Section 3.5</a>. The
image data may contain RTC sequences, as specified in <a href="#section-3.4">Section 3.4</a>.
<span class="h3"><a class="selflink" id="section-3.2" href="#section-3.2">3.2</a>. Required TIFF Fields</span>
Besides the fields listed in <a href="#section-2.2.1">Section 2.2.1</a>, the minimal black-and-
white fax mode requires the following fields. The fields listed in
<a href="#section-2.2.1">Section 2.2.1</a> and the fields and fax-specific values specified in
this sub- section must be supported by all implementations.
<span class="h4"><a class="selflink" id="section-3.2.1" href="#section-3.2.1">3.2.1</a> Baseline fields</span>
BitsPerSample(258) = 1. SHORT
RequiredByTIFFBaseline
Binary data only.
Default = 1 (field may be omitted if this is the value)
<span class="grey">McIntyre, et. al. Standards Track [Page 18]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-19" ></span>
<span class="grey"><a href="./rfc2301">RFC 2301</a> File Format for Internet Fax March 1998</span>
Compression(259) = 3. SHORT
RequiredByTIFFBaseline
3 = 1- or 2- dimensional coding.
The value 3 is a TIFF extension value [<a href="#ref-TIFF" title="Revision 6.0">TIFF</a>]. The T4Options field
must be specified and its value specifies that the data is encoded
using the Modified Huffman (MH) encoding of [<a href="#ref-T.4" title="Standardization of group 3 facsimile apparatus for document transmission">T.4</a>].
FillOrder(266) = 2. SHORT
RequiredByTIFFBaseline
2 = Least Significant Bit first
NOTE: Baseline TIFF readers are only required to support FillOrder =
1, where the lowest numbered pixel is stored in the MSB of the byte.
However, because many devices, such as modems, transmit the LSB first
when converting the data to serial form, it is common for black-and-
white fax products to use the second FillOrder =2, where the lowest
numbered pixel is stored in the LSB. Therefore, this value is
specified in the minimal black-and-white mode.
ImageWidth(256) = 1728. SHORT or LONG
RequiredByTIFFBaseline
This mode only supports a page width of 1728 pixels. This width
corresponds to North American Letter and Legal and to ISO A4 size
pages.
No default, must be specified.
NewSubFileType(254) = (Bit 1=1). LONG
RequiredByTIFFforFAX
Bit 1 is 1 if the image is a single page of a multi-page document.
Default = 0 (no subfile bits on, so may not be omitted for fax)
PhotometricInterpretation(262) = 0. SHORT
RequiredByTIFFBaseline
0 = pixel value 1 means black
No default, must be specified
ResolutionUnit(296) = 2. SHORT
RequiredByTIFFBaseline
The unit of measure for resolution. 2 = inch.
Default = 2 (field may be omitted if this is the value)
SamplesPerPixel(277) = 1. SHORT
RequiredByTIFFBaseline
The number of components per pixel; 1 for black-and-white
Default =1 (field may be omitted if this is the value)
XResolution(282) = 200, 204. RATIONAL
RequiredByTIFFBaseline
<span class="grey">McIntyre, et. al. Standards Track [Page 19]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-20" ></span>
<span class="grey"><a href="./rfc2301">RFC 2301</a> File Format for Internet Fax March 1998</span>
The horizontal resolution of the image is expressed in pixels per
resolution unit. In pixels/inch, the allowed values are 200 and 204,
which may be treated as equivalent. See <a href="#section-2.2.2">Section 2.2.2</a> for inch-
metric equivalency.
No default, must be specified
YResolution(283) = 98, 100, 196, 200. RATIONAL
RequiredByTIFFBaseline
The vertical resolution of the image is expressed in pixels per
resolution unit. In pixels/inch, the allowed values are 98, 100,
196 and 200; 98 and 100 may be treated as equivalent, and 196 and
200 may be treated as equivalent. See <a href="#section-2.2.2">Section 2.2.2</a> for inch-metric
equivalency.
No default, must be specified
<span class="h4"><a class="selflink" id="section-3.2.2" href="#section-3.2.2">3.2.2</a> Extension fields</span>
T4Options(292) = (Bit 0 = 0, Bit 1 = 0, Bit 2 = 0, 1) LONG
RequiredTIFFExtension (when Compression = 3)
Bit 0 = 0 indicates MH encoding.
Bit 1 must be 0
Bit 2 = 1 indicates that EOLs are byte aligned, = 0 EOLs not byte
aligned
Default is all bits are 0 (applies when EOLs are not byte aligned)
Note: The T4Options field is required when the Compression field has
a value of 3. Bit 0 of this field specifies the encoding used (MH
only in this mode) and Bit 2 indicates whether the EOL codes are
byte-aligned or not. If they are byte aligned, then fill bits have
been added as necessary so that the End of Line (EOL) codes always
end on byte boundaries. See <a href="#section-3.4">Section 3.4</a> for details.
<span class="h4"><a class="selflink" id="section-3.2.3" href="#section-3.2.3">3.2.3</a>. New Fields</span>
None.
<span class="h3"><a class="selflink" id="section-3.3" href="#section-3.3">3.3</a>. Recommended TIFF Fields</span>
None.
<span class="h3"><a class="selflink" id="section-3.4" href="#section-3.4">3.4</a>. End of Line (EOL) and Return to Control (RTC)</span>
The handling of End of Line (EOL) codes and Return to Control (RTC)
sequences illustrate the differences between conventional fax, which
is bit and stream oriented, and TIFF, which is byte and file
oriented. Conventional fax, Baseline TIFF and TIFF extensions for fax
all handle EOLs and RTCs differently.
<span class="grey">McIntyre, et. al. Standards Track [Page 20]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-21" ></span>
<span class="grey"><a href="./rfc2301">RFC 2301</a> File Format for Internet Fax March 1998</span>
In conventional fax, an MH-compressed fax data stream for a page
consists of the following sequence:
EOL, compressed data (first line), EOL, compressed data, ... ,
EOL, compressed data (last line), RTC (6 consecutive EOL codes)
Baseline TIFF does not use EOL codes or Return to Control (RTC)
sequences for MH-compressed data. However, the TIFF extension field
T4Options used in this specification for MH compression (Compression
= 3) requires EOLs.
Furthermore, Bit 2 in the T4Options field indicates whether or not
the EOL codes are byte aligned. If Bit 2 = 1, indicating the EOL
codes are byte aligned, then fill bits have been added as necessary
before EOL codes so that an EOL code always ends on a byte boundary,
and the first bit of data following an EOL begins on a byte boundary.
Without fill bits, an EOL code may end in the middle of a byte. Byte
alignment relieves application software of the burden of bit-shifting
every byte while parsing scan lines for line-oriented image
manipulation (such as writing a TIFF file). Not all TIFF readers
historically used for fax are able to deal with non-byte aligned
data.
While TIFF extension requires EOL codes, TIFF in fax applications has
traditionally prohibited RTC sequences. Implementations that want
common processing and interfaces for fax data streams and Internet
fax files would prefer that the TIFF data include RTC sequences.
To reconcile these differences, RTCs are allowed in cases where EOL
codes are not byte aligned and no fill bits have been added to the
data. This corresponds to situations where the fax data is simply
inserted in a strip without being processed or interpreted. RTCs
should not occur in the data when EOLs have been byte aligned. This
is formally specified in the next sub-section.
<span class="h4"><a class="selflink" id="section-3.4.1" href="#section-3.4.1">3.4.1</a>. RTC Exclusion</span>
Implementations which wish to maintain strict conformance with TIFF
and compatibility with the historical use of TIFF for fax SHOULD NOT
include the RTC sequence when writing TIFF files. However,
implementations which need to support "transparency" of T.4-generated
image data MAY include RTCs when writing TIFF files if the flag
settings of the T4Options field are set for non-byte aligned data,
i.e. Bit 2 is 0. Implementors of TIFF readers should be aware that
there are some existing TIFF implementations for fax that include the
RTC sequence in MH image data. Therefore, minimal set readers MUST be
able to process files which do not include RTCs and SHOULD be able to
process files which do include RTCs.
<span class="grey">McIntyre, et. al. Standards Track [Page 21]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-22" ></span>
<span class="grey"><a href="./rfc2301">RFC 2301</a> File Format for Internet Fax March 1998</span>
<span class="h3"><a class="selflink" id="section-3.5" href="#section-3.5">3.5</a>. File Structure</span>
The TIFF header, described in <a href="#section-2.1.1">Section 2.1.1</a>, contains two bytes which
describe the byte order used within the file. For the minimal black-
and- white mode, these bytes SHALL have the value "II" (0x4949),
denoting that the bytes in the TIFF file are in LSByte-first order
(little- endian). The first or 0th IFD immediately follows the
header, so that offset to the first IFD is 8. The headers values are
shown in the following table:
+--------+-------------------+--------+-----------+
| Offset | Description | Value |
+--------+-------------------+--------+-----------+
| 0 | Byte Order | 0x4949 (II) |
+--------+-------------------+--------+-----------+
| 2 | Identifier | 42 decimal |
+--------+-------------------+--------+-----------+
| 4 | Offset of 0th IFD | 0x 0000 0008 |
+--------+-------------------+--------+-----------+
The minimal black-and-white mode SHALL order IFDs and image data
within a file as follows: 1) there SHALL be an IFD for each page in a
multi- page fax document; (2) the IFDs SHALL occur in the same order
in the file as the pages occur in the document; (3) the IFD SHALL
precede the image data to which it has offsets; (4) the image data
SHALL occur in the same order in the file as the pages occur in the
document; (5) the IFD, the value data and the image data it has
offsets to SHALL precede the next image IFD; and (6) the image data
for each page SHALL be contained within a single strip.
As a result of (6), the StripOffsets field will contain the pointer
to the image data. With two exceptions, the field entries in the IFD
contain the field values instead of offsets to field values located
outside the IFD. The two exceptions are the values for the
XResolution and YResolution fields, both of which are type RATIONAL
and require 2 4- byte numbers. These "long" field values SHALL be
placed immediately after the IFD which contains the offsets to them,
and before the image data pointed to by that IFD.
The effect of these requirements is that the IFD for the first page
SHALL come first in the file after the TIFF header, followed by the
long field values for XResolution and YResolution, followed by the
image data for the first page, then the IFD for second page, etc.
This is shown in the following figure. Each IFD is required to have a
PageNumber field, which has value 0 for the first page, 1 for the
second page, and so on.
<span class="grey">McIntyre, et. al. Standards Track [Page 22]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-23" ></span>
<span class="grey"><a href="./rfc2301">RFC 2301</a> File Format for Internet Fax March 1998</span>
+-----------------------+
| Header |------------+
+-----------------------+ | First IFD
| IFD (page 0) | <----------+ Offset
+---| |------------+
| | |--+ |
Value | +-----------------------+ | |
Offset +-->| Long Values | | |
+-----------------------| | Strip |
| Image Data (page 0) |<-+ Offset |
+-----------------------+ | Next IFD
| IFD (page 1) | <----------+ Offset
+---| |------------+
| | |--+ |
Value | +-----------------------+ | |
Offset +-->| Long Values | | |
+-----------------------| | Strip |
| Image Data (page 1) |<-+ Offset |
+-----------------------+ | Next IFD
| IFD (page 2) | <----------+ Offset
+-----------------------+
| : |
Using this file structure may reduce the memory requirements in
implementations. It is also provides some support for streaming, in
which a file can be processed as it is received and before the entire
file is received.
<span class="h3"><a class="selflink" id="section-3.6" href="#section-3.6">3.6</a> Minimal Black-and-white Mode Summary</span>
The table below summarizes the TIFF fields that comprise the minimal
interchange set for black-and-white facsimile. The Baseline and
Extension fields and field values MUST be supported by all
implementations. For convenience in the table, certain fields which
have a value that is a sequence of flag bits are shown taking integer
values that correspond to the flags that are set. An implementation
should test the setting of the relevant flag bits individually,
however, to allow extensions to the sequence of flag bits to be
appropriately ignored. (See, for example, T4Options below.)
+---------------------------+--------------------------------+
| Baseline Fields | Values |
+---------------------------+--------------------------------+
| BitsPerSample | 1 |
+---------------------------+--------------------------------+
| Compression | 3: 1D Modified Huffman coding |
| | set T4Options = 0 or 4 |
+------------------------------------------------------------+
<span class="grey">McIntyre, et. al. Standards Track [Page 23]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-24" ></span>
<span class="grey"><a href="./rfc2301">RFC 2301</a> File Format for Internet Fax March 1998</span>
+---------------------------+--------------------------------+
| FillOrder | 2: least significant bit first |
+---------------------------+--------------------------------+
| ImageWidth | 1728 |
+---------------------------+--------------------------------+
| ImageLength | n: total number of scanlines |
| | in image |
+---------------------------+--------------------------------+
| NewSubFileType | 2: Bit 1 identifies single |
| | page of a multi-page document |
+---------------------------+--------------------------------+
| PageNumber | n,m: page number n followed by |
| | total page count m |
+---------------------------+--------------------------------+
| PhotometricInterpretation | 0: pixel value 1 means black |
+---------------------------+--------------------------------+
| ResolutionUnit | 2: inch |
+---------------------------+--------------------------------+
| RowsPerStrip | number of scanlines per strip |
| | = ImageLength, with one strip |
+---------------------------+--------------------------------+
| SamplesPerPixel | 1 |
+---------------------------+--------------------------------+
| StripByteCounts | number of bytes in TIFF strip |
+---------------------------+--------------------------------+
| StripOffsets | offset from beginning of |
| | file to single TIFF strip |
+---------------------------+--------------------------------+
| XResolution | 204, 200 (pixels/inch) |
+---------------------------+--------------------------------+
| YResolution | 98, 196, 100, 200 (pixels/inch)|
+---------------------------+--------------------------------+
| Extension Fields |
+---------------------------+--------------------------------+
| T4Options | 0: MH coding, EOLs not byte |
| | aligned |
| | 4: MH coding, EOLs byte aligned|
+---------------------------+--------------------------------+
<span class="h2"><a class="selflink" id="section-4" href="#section-4">4</a>. Extended Black-and-White fax mode</span>
This section defines the extended black-and-white mode or Profile F
of TIFF for facsimile. It provides a standard definition of what has
historically been known as TIFF Class F and now TIFF-F. In doing so,
it aligns this mode with current ITU-T Recommendations for black-
and-white fax and with existing industry practice. Implementations of
this profile include implementations of Profile S.
<span class="grey">McIntyre, et. al. Standards Track [Page 24]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-25" ></span>
<span class="grey"><a href="./rfc2301">RFC 2301</a> File Format for Internet Fax March 1998</span>
This section describes extensions to the minimal interchange set of
fields (Profile S) that provide a richer set of black-and-white
capabilities. The fields and values described in this section are a
superset of the fields and values defined for the minimal interchange
set in <a href="#section-3">Section 3</a>. In addition to the MH encoding, Modified READ (MR)
and Modified Modified READ (MMR) encoding as described in [<a href="#ref-T.4" title="Standardization of group 3 facsimile apparatus for document transmission">T.4</a>] and
[<a href="#ref-T.6" title="Facsimile coding schemes and coding control functions for group 4 facsimile apparatus">T.6</a>] are supported.
<a href="#section-4.1">Section 4.1</a> gives an overview of TIFF-F. <a href="#section-4.2">Section 4.2</a> describes the
TIFF fields that SHALL be used in this mode. <a href="#section-4.3">Section 4.3</a> describes
the fields that MAY be used in this mode. In the spirit of the
original TIFF-F specification, Sections <a href="#section-4.4">4.4</a> and <a href="#section-4.5">4.5</a> discuss technical
implementation issues and warnings. <a href="#section-4.6">Section 4.6</a> gives an example use
of TIFF-F. <a href="#section-4.7">Section 4.7</a> gives a summary of the required and
recommended fields and their values.
<span class="h3"><a class="selflink" id="section-4.1" href="#section-4.1">4.1</a> TIFF-F Overview</span>
Though it has been in common usage for many years, TIFF-F has
previously never been documented in the form of a standard. An
informal TIFF-F document was originally created by a small group of
fax experts led by Joe Campbell. The existence of TIFF-F is noted in
[<a href="#ref-TIFF" title="Revision 6.0">TIFF</a>] but it is not defined. This document serves as the formal
definition of the F application of [<a href="#ref-TIFF" title="Revision 6.0">TIFF</a>] for Internet applications.
For ease of reference, the term TIFF-F will be used throughout this
document as a shorthand for the extended black-and-white mode or
profile of TIFF for facsimile.
Up until the TIFF 6.0 specification, TIFF supported various "Classes"
which defined the use of TIFF for various applications. Classes were
used to support specific applications. In this spirit, TIFF-F has
been known historically as "TIFF Class F". Previous informal TIFF-F
documents [<a href="#ref-TIFF-F0" title="1990">TIFF-F0</a>] used the "Class F" terminology. As of TIFF 6.0
[<a href="#ref-TIFF" title="Revision 6.0">TIFF</a>], the TIFF Class concept has been eliminated in favor of the
concept of Baseline TIFF. Therefore, this document updates the
definition of TIFF-F as the F profile of TIFF for facsimile, by using
Baseline TIFF as defined in [<a href="#ref-TIFF" title="Revision 6.0">TIFF</a>] as the starting point and then
adding the TIFF extensions to Baseline TIFF which apply for TIFF-F.
In almost all cases, the resulting definition of TIFF-F fields and
values remains consistent with those used historically in earlier
definitions of TIFF Class F. Where some of the values for fields
have been updated to provide more precise conformance with the ITU-T
[<a href="#ref-T.4" title="Standardization of group 3 facsimile apparatus for document transmission">T.4</a>] and [<a href="#ref-T.30">T.30</a>] fax recommendations, these differences are noted.
<span class="grey">McIntyre, et. al. Standards Track [Page 25]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-26" ></span>
<span class="grey"><a href="./rfc2301">RFC 2301</a> File Format for Internet Fax March 1998</span>
<span class="h3"><a class="selflink" id="section-4.2" href="#section-4.2">4.2</a>. Required TIFF Fields</span>
This section lists the required fields and the values they must have
to be ITU-compatible. Besides the fields listed in <a href="#section-2.2.1">Section 2.2.1</a>, the
extended black-and-white fax mode SHALL use the following fields.
<span class="h4"><a class="selflink" id="section-4.2.1" href="#section-4.2.1">4.2.1</a>. Baseline fields</span>
BitsPerSample(258) = 1. SHORT
RequiredByTIFFBaseline
Binary data only.
Default = 1 (field may be omitted if this is the value)
Compression(259) = 3, 4. SHORT
RequiredByTIFFBaseline
3 = 1- or 2- dimensional coding, must have T4Options field This is
a TIFF Extension value [<a href="#ref-TIFF" title="Revision 6.0">TIFF</a>].
4 = 2-dimensional coding, ITU-T Rec. T.6 (MMR - Modified Modified
Read, must have T6Options field)) This is a TIFF Extension value.
Default = 1 (and is not applicable; field must be specified)
NOTE: Baseline TIFF permits use of value 2 for Modified Huffman
encoding, but data is presented in a form which does not use EOLs,
and so TIFF for facsimile uses Compression=3 instead. See Sections
4.4.4, 4.5.1 and 4.5.2 for more information on compression and
encoding.
FillOrder(266) = 1 , 2. SHORT
RequiredByTIFFBaseline
Profile F readers must be able to read data in both bit orders,
but the vast majority of facsimile products store data LSB
first, exactly as it appears on the telephone line.
1 = Most Significant Bit first.
2 = Least Significant Bit first
ImageWidth(256) SHORT or LONG
RequiredByTIFFBaseline
This mode supports the following fixed page widths: 1728, 2592, 3456
(corresponding to North American Letter and Legal, ISO A4 paper
sizes), 2048, 3072, 4096 (corresponding to ISO B4 paper size), and
2432, 3648, 4864 (corresponding to ISO A3 paper size).
No default; must be specified
NOTE: Historical TIFF-F did not include support for the following
widths related to higher resolutions: 2592, 3072, 3648, 3456, 4096
and 4864. Historical TIFF-F documents also included the following
values related to A5 and A6 widths: 816 and 1216. Per the most recent
<span class="grey">McIntyre, et. al. Standards Track [Page 26]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-27" ></span>
<span class="grey"><a href="./rfc2301">RFC 2301</a> File Format for Internet Fax March 1998</span>
version of [<a href="#ref-T.4" title="Standardization of group 3 facsimile apparatus for document transmission">T.4</a>], A5 and A6 documents are no longer supported in
Group 3 facsimile, so the related width values are now obsolete. See
<a href="#section-4.5.2">section 4.5.2</a> for more information on inch/metric equivalencies and
other implementation details.
NewSubFileType(254) = (Bit 1=1). LONG
RequiredByTIFFforFAX
Bit 1 is 1 if the image is a single page of a multi-page document.
Default = 0 (no subfile bits on, so may not be omitted for fax)
NOTE: Bit 1 is always set to 1 for TIFF-F, indicating a single page
of a multi-page image. The same bit settings are used when TIFF-F is
used for a one page fax image. See <a href="#section-4.4.3">Section 4.4.3</a> for details on
multi-page files.
PhotometricInterpretation(262) = 0, 1. SHORT
RequiredByTIFFBaseline
0 = pixel value 1 means black, 1 = pixel value 1 means white.
This field allows notation of an inverted or negative image.
No default, must be specified
ResolutionUnit(296) = 2, 3. SHORT
RequiredByTIFFBaseline
The unit of measure for resolution. 2 = inch, 3 = centimeter; TIFF-F
has traditionally used inch-based measures.
Default = 2 (field may be omitted if this is the value)
SamplesPerPixel(277) = 1. SHORT
RequiredByTIFFBaseline
1 = monochrome, bilevel in this case (see BitsPerSample)
Default =1 (field may be omitted if this is the value)
XResolution(282) = 200, 204, 300, 400, 408 RATIONAL
RequiredByTIFFBaseline
The horizontal resolution of the image is expressed in pixels per
resolution unit. In pixels/inch, the allowed values are: 200, 204,
300, 400, and 408. See <a href="#section-2.2.2">Section 2.2.2</a> for inch-metric equivalency.
No default, must be specified
NOTE: The values of 200 and 408 have been added to the historical
TIFF-F values, for consistency with [<a href="#ref-T.30">T.30</a>]. Some existing TIFF-F
implementations may also support values of 80 pixels/cm, which is
equivalent to 204 pixels per inch. See <a href="#section-4.5.2">section 4.5.2</a> for information
on implementation details.
YResolution(283) = 98, 100, 196, 200, 300, 391, and 400 RATIONAL
RequiredByTIFFBaseline
The vertical resolution of the image is expressed in pixels per
<span class="grey">McIntyre, et. al. Standards Track [Page 27]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-28" ></span>
<span class="grey"><a href="./rfc2301">RFC 2301</a> File Format for Internet Fax March 1998</span>
resolution unit. In pixels/inch, the allowed values are: 98, 100,
196, 200, 300, 391, and 400 pixels/inch.
See <a href="#section-2.2.2">Section 2.2.2</a> for inch-metric equivalency.
No default, must be specified
NOTE: The values of 100, 200, and 391 have been added to the
historical TIFF-F values, for consistency with [<a href="#ref-T.30">T.30</a>]. Some existing
TIFF-F implementations may also support values of 77 and 38.5 (cm),
which are equivalent to 196 and 98 pixels per inch respectively. See
<a href="#section-4.5.2">section 4.5.2</a> for more information on implementation details.
NOTE: Not all combinations of XResolution, YResolution and ImageWidth
are legal. The following table gives the legal combinations and
corresponding paper size [<a href="#ref-T.30">T.30</a>].
+--------------+-----------------+---------------------------+
| XResolution x YResolution | ImageWidth |
+--------------+-----------------+---------+--------+--------+
| 200x100, 204x98 | | | |
| 200x200, 204x196 | 1728 | 2048 | 2432 |
| 204x391 | | | |
+--------------+-----------------+---------+--------+--------+
| 300 x 300 | 2592 | 3072 | 3648 |
+--------------+-----------------+---------+--------+--------+
| 408 x 391, 400 x 400 | 3456 | 4096 | 4864 |
+--------------+-----------------+---------+--------+--------+
|Letter,A4| B4 | A3 |
| Legal | | |
+---------+--------+--------+
| Paper Size |
+---------------------------+
<span class="h4"><a class="selflink" id="section-4.2.2" href="#section-4.2.2">4.2.2</a>. Extension fields</span>
T4Options(292) = (Bit 0 = 0 or 1, Bit 1 = 0, Bit 2 = 0 or 1) LONG
RequiredTIFFExtension (when Compression = 3)
T4Options was also known as Group3Options in a prior version of
[<a href="#ref-TIFF" title="Revision 6.0">TIFF</a>].
Bit 0 = 1 indicates MR encoding, = 0 indicates MH encoding.
Bit 1 must be 0
Bit 2 = 1 indicates that EOLs are byte aligned, = 0 EOLs not byte
aligned
Default is all bits are 0 (applies when MH encoding is used and EOLs
are not byte aligned EOLs) (See <a href="#section-3.2.2">Section 3.2.2</a>.)
The T4Options field is required when the Compression field has a
value of 3. This field specifies the encoding used (MH or MR) and
whether the EOL codes are byte-aligned or not. If they are byte
<span class="grey">McIntyre, et. al. Standards Track [Page 28]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-29" ></span>
<span class="grey"><a href="./rfc2301">RFC 2301</a> File Format for Internet Fax March 1998</span>
aligned, then fill bits have been added as necessary so that the End
of Line (EOL) codes always end on byte boundaries See Sections <a href="#section-3.4">3.4</a>,
4.5.3 and 4.5.4 for details.
T6Options(293) = (Bit 0 = 0, Bit 1 = 0). LONG
RequiredTIFFExtension (when Compression = 4)
Used to indicate parameterization of 2D Modified Modified Read
compression. T6Options was also known as Group4Options in a prior
version of [<a href="#ref-TIFF" title="Revision 6.0">TIFF</a>].
Bit 0 must be 0.
Bit 1 = 0 indicates uncompressed data mode is not allowed; = 1
indicates uncompressed data is allowed (see [<a href="#ref-TIFF" title="Revision 6.0">TIFF</a>]).
Default is all bits 0. For FAX, the field must be present and have
the value 0. The use of uncompressed data where compression would
expand the data size is not allowed for FAX.
NOTE: MMR compressed data is two-dimensional and does not use EOLs.
Each MMR encoded image MUST include an "end-of-facsimile-block"
(EOFB) code at the end of each coded strip; see <a href="#section-4.5.6">Section 4.5.6</a>.
<span class="h4"><a class="selflink" id="section-4.2.3" href="#section-4.2.3">4.2.3</a>. New fields</span>
None.
<span class="h3"><a class="selflink" id="section-4.3" href="#section-4.3">4.3</a>. Recommended TIFF fields</span>
<span class="h4"><a class="selflink" id="section-4.3.1" href="#section-4.3.1">4.3.1</a>. Baseline fields</span>
See <a href="#section-2.2.3">Section 2.2.3</a>.
<span class="h4"><a class="selflink" id="section-4.3.2" href="#section-4.3.2">4.3.2</a>. Extension fields</span>
See <a href="#section-2.2.3">Section 2.2.3</a>.
<span class="h4"><a class="selflink" id="section-4.3.3" href="#section-4.3.3">4.3.3</a>. New fields</span>
Three new, optional fields, used in the original TIFF-F description
to describe page quality, are defined in this specification. The
information contained in these fields is usually obtained from
receiving facsimile hardware (if applicable). They SHOULD NOT be used
in writing TIFF-F files for facsimile image data that is error
corrected or otherwise guaranteed not to have coding errors. Some
applications need to understand exactly the error content of the
data. For example, a CAD program might wish to verify that a file
has a low error level before importing it into a high-accuracy
document. Because Group 3 facsimile devices do not necessarily
perform error correction on the image data, the quality of a received
page must be inferred from the pixel count of decoded scan lines. A
<span class="grey">McIntyre, et. al. Standards Track [Page 29]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-30" ></span>
<span class="grey"><a href="./rfc2301">RFC 2301</a> File Format for Internet Fax March 1998</span>
"good" scan line is defined as a line that, when decoded, contains
the correct number of pixels. Conversely, a "bad" scan line is
defined as a line that, when decoded, comprises an incorrect number
of pixels.
BadFaxLines(326) SHORT or LONG
The number of "bad" scan lines encountered by the facsimile device
during reception. A "bad" scanline is defined as a scanline that,
when decoded, comprises an incorrect number of pixels. Note that
PercentBad = (BadFaxLines/ImageLength) * 100
No default.
CleanFaxData(327) = 0, 1, 2. SHORT
Indicates if "bad" lines encountered during reception are stored in
the data, or if "bad" lines have been replaced by the receiver.
0 = No "bad" lines
1 = "bad" lines exist, but were regenerated by the receiver,
2 = "bad" lines exist, but have not been regenerated.
No default.
NOTE: Many facsimile devices do not actually output bad lines.
Instead, the previous good line is repeated in place of a bad line.
Although this substitution, known as line regeneration, results in a
visual improvement to the image, the data is nevertheless corrupted.
The CleanFaxData field describes the error content of the data. That
is, when the BadFaxLines and ImageLength fields indicate that the
facsimile device encountered lines with an incorrect number of pixels
during reception, the CleanFaxData field indicates whether these bad
lines are actually still in the data or if the receiving facsimile
device replaced them with regenerated lines.
ConsecutiveBadFaxLines(328) LONG or SHORT
Maximum number of consecutive "bad" scanlines received. The
BadFaxLines field indicates only the quantity of bad lines.
No Default.
NOTE: The BadFaxLines and ImageLength data indicate only the quantity
of bad lines. The ConsecutiveBadFaxLines field is an indicator of the
distribution of bad lines and may therefore be a better general
indicator of perceived image quality. See <a href="#section-4.4.5">Section 4.4.5</a> for examples
of the use of these fields.
<span class="h3"><a class="selflink" id="section-4.4" href="#section-4.4">4.4</a>. Technical Implementation Issues</span>
<span class="h4"><a class="selflink" id="section-4.4.1" href="#section-4.4.1">4.4.1</a> Strips</span>
In general, TIFF files divide an image into "strips," also known as
"bands." Each strip contains a few scanlines of the image. By using
<span class="grey">McIntyre, et. al. Standards Track [Page 30]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-31" ></span>
<span class="grey"><a href="./rfc2301">RFC 2301</a> File Format for Internet Fax March 1998</span>
strips, a TIFF reader need not load the entire image into memory,
thus enabling it to fetch and decompress small random portions of the
image as necessary.
The number of scanlines in a strip is described by the RowsPerStrip
value and the number of bytes in the strip after compression by the
StripByteCount value. The location in the TIFF file of each strip is
given by the StripOffsets values.
Strip size is application dependent. The recommended approach for
multi- page TIFF-F images is to represent each page as a single
strip. Existing TIFF-F usage is typically one strip per page in
multi-page TIFF-F files. See Sections <a href="#section-2.1.2">2.1.2</a> and <a href="#section-2.1.3">2.1.3</a>.
<span class="h4"><a class="selflink" id="section-4.4.2" href="#section-4.4.2">4.4.2</a> Bit Order</span>
The current TIFF specification [<a href="#ref-TIFF" title="Revision 6.0">TIFF</a>] does not require a Baseline
TIFF reader to support FillOrder=2, i.e. lowest numbered 1-bit pixel
in the least significant bit of a byte. It further recommends that
FillOrder=2 be used only in special purpose applications.
Facsimile data appears on the phone line in bit-reversed order
relative to its description in ITU-T Recommendation T.4. Therefore,
a wide majority of facsimile applications choose this natural order
for data in a file. Nevertheless, TIFF-F readers must be able to read
data in both bit orders and support FillOrder values of 1 and 2.
<span class="h4"><a class="selflink" id="section-4.4.3" href="#section-4.4.3">4.4.3</a>. Multi-Page</span>
Many existing applications already read TIFF-F-like files, but do not
support the multi-page field. Since a multi-page format greatly
simplifies file management in fax application software, TIFF-F
specifies multi-page documents (NewSubfileType = 2) as the standard
case.
It is recommended that applications export multiple page TIFF-F files
without manipulating fields and values. Historically, some TIFF-F
writers have attempted to produce individual single-page TIFF-F files
with modified NewSubFileType and PageNumber (page one-of-one) values
for export purposes. However, there is no easy way to link such
multiple single page files together into a logical multiple page
document, so that this practice is not recommended.
<span class="h4"><a class="selflink" id="section-4.4.4" href="#section-4.4.4">4.4.4</a>. Compression</span>
In Group 3 facsimile, there are three compression methods which had
been standardized as of 1994 and are in common use. The ITU-T T.4
Recommendation [<a href="#ref-T.4" title="Standardization of group 3 facsimile apparatus for document transmission">T.4</a>] defines a one-dimensional compression method
<span class="grey">McIntyre, et. al. Standards Track [Page 31]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-32" ></span>
<span class="grey"><a href="./rfc2301">RFC 2301</a> File Format for Internet Fax March 1998</span>
known as Modified Huffman (MH) and a two-dimensional method known as
Modified READ (MR) (READ is short for Relative Element Address
Designate). In 1984, a somewhat more efficient compression method
known as Modified Modified READ (MMR) was defined in the ITU-T T.6
Recommendation [<a href="#ref-T.6" title="Facsimile coding schemes and coding control functions for group 4 facsimile apparatus">T.6</a>]. MMR was originally defined for use with Group 4
facsimile, so that this compression method has been commonly called
Group 4 compression. In 1991, the MMR method was approved for use in
Group 3 facsimile and has since been widely utilized.
TIFF-F supports these three compression methods. The most common
practice is the one-dimensional Modified Huffman (MH) compression
method. This is specified by setting the Compression field value to
3 and then setting bit 0 of the T4Options field to 0. Alternatively,
the two dimensional Modified READ (MR) method, which is much less
frequently used in historical TIFF-F implementations, may be selected
by setting bit 0 of the T4Options field to 1. The value of Bit 2 in
this field is determined by the use of fill bits.
Depending upon the application, the more efficient two-dimensional
Modified Modified Read (MMR)compression method from T.6 may be
selected by setting the Compression field value to 4 and then setting
the first two bits (and all unused bits) of the T6Options field to 0.
More information to aid the implementor in making a compression
selection is contained in <a href="#section-4.5.2">Section 4.5.2</a>.
Baseline TIFF also permits use of Compression=2 to specify Modified
Huffman compression, but the data does not use EOLs. As a result,
TIFF-F uses Compression=3 instead of Compression=2 to specify
Modified Huffman compression.
<span class="h4"><a class="selflink" id="section-4.4.5" href="#section-4.4.5">4.4.5</a>. Example Use of Page-quality Fields</span>
Here are examples for writing the CleanFaxData, BadFaxLines, and
ConsecutiveBadFaxLines fields:
1. Facsimile hardware does not provide page quality
information: MUST NOT write page-quality fields.
2. Facsimile hardware provides page quality information, but
reports no bad lines. Write only BadFaxLines = 0.
3. Facsimile hardware provides page quality information, and
reports bad lines. Write both BadFaxLines and
ConsecutiveBadFaxLines. Also write CleanFaxData = 1 or 2 if
the hardware's regeneration capability is known.
4. Source image data stream is error-corrected or otherwise
guaranteed to be error-free such as for a computer generated
file: SHOULD NOT write page-quality fields.
<span class="grey">McIntyre, et. al. Standards Track [Page 32]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-33" ></span>
<span class="grey"><a href="./rfc2301">RFC 2301</a> File Format for Internet Fax March 1998</span>
TIFF Writers SHOULD only generate these fields when the image has
been generated from a fax image data stream where error correction,
e.g. Group 3 Error Correction Mode, was not used.
<span class="h4"><a class="selflink" id="section-4.4.6" href="#section-4.4.6">4.4.6</a>. Practical Guidelines for Writing and Reading Multi-Page TIFF-F</span>
<span class="h4"> Files</span>
Traditionally, historical TIFF-F has required readers and writers to
be able to handle multi-page TIFF-F files. Based on the experience
of various TIFF-F implementors, it has been seen that the
implementation of TIFF-F can be greatly simplified if certain
practical guidelines are followed when writing multi-page TIFF-F
files.
The structure for a multi-page TIFF-F file will include one IFD per
page of the document. In this case, this IFD will define the
attributes for a single page. A second simplifying guideline is that
the writer of TIFF-F files SHOULD present IFDs in the same order as
the actual sequence of pages. (The pages are numbered within TIFF-F
beginning with page 0 as the first page and then ascending (i.e. 0,
1, 2,...). However, any field values over 4 bytes will be stored
separately from the IFD. TIFF-F readers SHOULD expect IFDs to be
presented in page order, but be able to handle exceptions.
Per [<a href="#ref-TIFF" title="Revision 6.0">TIFF</a>], the exact placement of image data is not specified.
However, the strip offsets for each strip of image are defined from
within each IFD. Where possible, another simplifying guideline for
the writing of TIFF-F files is to specify that the image data for
each page of a multi-page document SHOULD be contained within a
single strip (i.e. one image strip per fax page). The use of a single
image strip per page is very useful for applications such as store
and forward messaging, where the file is usually prepared in advance
of the transmission, but other assumptions may apply for the size of
the image strip for applications which require the use of "streaming"
techniques (see <a href="#section-4.4.7">section 4.4.7</a>). In the event a different image strip
size guideline has been used (e.g. constant size for image strips
that may be less than the page size), this will immediately be
evident from the values/offsets of the fields that are related to
strips.
A third simplifying guideline is that each IFD SHOULD be placed in
the TIFF-F file structure at a point which precedes the image which
the IFD describes.
In addition, a fourth simplifying guideline for TIFF-F writers and
readers is to place the actual image data in a physical order within
the TIFF file structure which is consistent with the logical page
order. In practice, TIFF-F readers will need to use the strip
<span class="grey">McIntyre, et. al. Standards Track [Page 33]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-34" ></span>
<span class="grey"><a href="./rfc2301">RFC 2301</a> File Format for Internet Fax March 1998</span>
offsets to find the exact physical location of the image data,
whether or not it is presented in logical page order.
If the image data is stored in multiple strips, then the strips
SHOULD occur in the file in the same order that the data they contain
occurs in the facsimile transmission, starting at the top of the
page.
TIFF-F writers MAY make a fifth simplifying guideline, in which the
IFD, the value data and the image data to which the IFD has offsets
precede the next image IFD. However, this guideline has been relaxed
(writers MAY rather than SHOULD use it) compared to the other
guidelines given here to reflect past practices for TIFF-F.
In the case of the minimal mode, which is also the minimal subset of
Profile S, the SHOULD's and MAY's of these guidelines become SHALL's
(see <a href="#section-3.5">Section 3.5</a>).
So, a TIFF-F file which is structured using the guidelines of this
section will essentially be composed of a linked list of IFDs,
presented in ascending page order, which in turn each point to a
single page of image data (one strip per page), where the pages of
image data are also placed in a logical page order within the TIFF- F
file structure. (The pages of image data may themselves be stored in
a contiguous manner, at the option of the implementor).
<span class="h4"><a class="selflink" id="section-4.4.7" href="#section-4.4.7">4.4.7</a>. Use of TIFF-F for Streaming Applications</span>
TIFF-F has historically been used for handling fax image files in
applications such as store and forward messaging where the entire
size of the file is known in advance. While TIFF-F may also possibly
be used as a file format for cases such as streaming applications,
assumptions may be required that differ from those provided in this
section (e.g., the entire size and number of pages within the image
are not known in advance). As a result, a definition for the
streaming application of TIFF-F is beyond the scope of this document.
<span class="h3"><a class="selflink" id="section-4.5" href="#section-4.5">4.5</a>. Implementation Warnings</span>
<span class="h4"><a class="selflink" id="section-4.5.1" href="#section-4.5.1">4.5.1</a> Uncompressed data</span>
TIFF-F requires the ability to read and write at least one-
dimensional T.4 Huffman ("compressed") data. Uncompressed data is
not allowed. This means that the "Uncompressed" bit in T4Options or
T6Options must be set to 0.
<span class="grey">McIntyre, et. al. Standards Track [Page 34]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-35" ></span>
<span class="grey"><a href="./rfc2301">RFC 2301</a> File Format for Internet Fax March 1998</span>
<span class="h4"><a class="selflink" id="section-4.5.2" href="#section-4.5.2">4.5.2</a>. Encoding and Resolution</span>
Since two-dimensional encoding is not required for Group 3
compatibility, some historic TIFF-F readers have not been able to
read such files. The minimum subset of TIFF-F REQUIRES support for
one dimensional (Modified Huffman) files, so this choice maximizes
portability. However, implementors seeking greater efficiency SHOULD
use T.6 MMR compression when writing TIFF-F files. Some TIFF-F
readers will also support two-dimensional Modified READ files.
Implementors that wish to have the maximum flexibility in reading
TIFF-F files should support all three of these compression methods
(MH, MR and MMR).
For the case of resolution, almost all facsimile products support
both standard (98 dpi) vertical resolution and "fine" (196 dpi)
resolution. Therefore, fine-resolution files are quite portable in
the real world.
In 1993, the ITU-T added support for higher resolutions in the T.30
recommendation including 200 x 200, 300 x 300, 400 x 400 in dots per
inch based units. At the same time, support was added for metric
dimensions which are equivalent to the following inch based
resolutions: 391v x 204h and 391v x 408h. Therefore, the full set of
inch-based equivalents of the new resolutions are supported in the
TIFF-F writer, since they may appear in some image data streams
received from Group 3 facsimile devices. However, many facsimile
terminals and older versions of TIFF-F readers are likely to not
support the use of these higher resolutions.
Per [<a href="#ref-T.4" title="Standardization of group 3 facsimile apparatus for document transmission">T.4</a>], it is permissible for applications to treat the following
XResolution values as being equivalent: <204,200> and <400,408>. In
a similar respect, the following YResolution values may also be
treated as being equivalent: <98, 100>, <196, 200>, and <391, 400>.
These equivalencies were allowed by [<a href="#ref-T.4" title="Standardization of group 3 facsimile apparatus for document transmission">T.4</a>] to permit conversions
between inch and metric based facsimile terminals.
In a similar respect, the optional support of metric based
resolutions in the TIFF-F reader (i.e. 77 x 38.5 cm) is included for
completeness, since they are used in some legacy TIFF-F applications,
but this use is not recommended for the creation of TIFF-F files by a
writer.
<span class="h4"><a class="selflink" id="section-4.5.3" href="#section-4.5.3">4.5.3</a>. EOL byte-aligned</span>
The historical convention for TIFF-F has been that all EOLs in
Modified Huffman or Modified READ data must be byte-aligned. However,
Baseline TIFF has permitted use of non-byte-aligned EOLs by default,
so that a large percentage of TIFF-F reader implementations support
<span class="grey">McIntyre, et. al. Standards Track [Page 35]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-36" ></span>
<span class="grey"><a href="./rfc2301">RFC 2301</a> File Format for Internet Fax March 1998</span>
both conventions. Therefore, the minimum subset of TIFF-F, or Profile
S, as defined in <a href="#section-3">Section 3</a> includes support for both byte-aligned and
non- byte-aligned EOLs; see <a href="#section-3.2.2">Section 3.2.2</a>.
An EOL is said to be byte-aligned when Fill bits have been added as
necessary before EOL codes such that EOL always ends on a byte
boundary, thus ensuring an EOL-sequence of a one byte preceded by a
zero nibble: xxxx0000 00000001.
Modified Huffman encoding encodes bits, not bytes. This means that
the end-of-line token may end in the middle of a byte. In byte
alignment, extra zero bits (Fill) are added so that the first bit of
data following an EOL begins on a byte boundary. In effect, byte
alignment relieves application software of the burden of bit-
shifting every byte while parsing scan lines for line-oriented image
manipulation (such as writing a TIFF file).
For Modified READ encoding, each line is terminated by an EOL and a
one bit tag bit. Per [<a href="#ref-T.4" title="Standardization of group 3 facsimile apparatus for document transmission">T.4</a>], the value of the tag bit is 0 if the
next line contains two dimensional data and 1 if the next line is a
reference line. To maintain byte alignment, fill bits are added
before the EOL/tag bit sequence, so that the first bit of data
following an MR tag bit begins on a byte boundary.
<span class="h4"><a class="selflink" id="section-4.5.4" href="#section-4.5.4">4.5.4</a>. EOL</span>
As illustrated in FIGURE 1/T.4 in [<a href="#ref-T.4" title="Standardization of group 3 facsimile apparatus for document transmission">T.4</a>], facsimile documents encoded
with Modified Huffman begin with an EOL, which in TIFF-F may be byte-
aligned. The last line of the image is not terminated by an EOL. In
a similar respect, images encoded with Modified READ two-dimensional
encoding begin with an EOL, followed by a tag bit.
<span class="h4"><a class="selflink" id="section-4.5.5" href="#section-4.5.5">4.5.5</a>. RTC Exclusion</span>
Aside from EOLs, TIFF-F files have historically only contained image
data. This means that applications which wish to maintain strict
conformance with the rules in [<a href="#ref-TIFF" title="Revision 6.0">TIFF</a>] and compatibility with
historical TIFF-F, SHOULD NOT include the Return To Control sequence
(RTC) (consisting of 6 consecutive EOLs) when writing TIFF-F files.
However, applications which need to support "transparency" of [<a href="#ref-T.4" title="Standardization of group 3 facsimile apparatus for document transmission">T.4</a>]
image data MAY include RTCs if the flag settings of the T4Options
field are set for non-byte aligned MH or MR image data. Implementors
of TIFF readers should also be aware that there are some existing
TIFF-F implementations which include the RTC sequence in MH/MR image
data. Therefore, TIFF-F readers MUST be able to process files which
do not include RTCs and SHOULD be able to process files which do
include RTCs.
<span class="grey">McIntyre, et. al. Standards Track [Page 36]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-37" ></span>
<span class="grey"><a href="./rfc2301">RFC 2301</a> File Format for Internet Fax March 1998</span>
<span class="h4"><a class="selflink" id="section-4.5.6" href="#section-4.5.6">4.5.6</a> Use of EOFB for T.6 Compressed Images</span>
TIFF-F pages which are encoded with the T.6 Modified Modified READ
compression method MUST include an "end-of-facsimile-block" (EOFB)
code at the end of each coded strip. Per [<a href="#ref-TIFF" title="Revision 6.0">TIFF</a>], the EOFB code is
followed by pad bits as needed to align on a byte boundary. TIFF
readers SHOULD ignore any bits other than pad bits beyond the EOFB.
<span class="h3"><a class="selflink" id="section-4.6" href="#section-4.6">4.6</a>. Example Use of TIFF-F</span>
The Profile F of TIFF (i.e. TIFF-F content) is a secondary component
of the VPIM Message, as defined in [<a href="#ref-VPIM2" title=""Voice Profile for Internet Mail - version 2"">VPIM2</a>]. Voice messaging systems
can often handle fax store-and-forward capabilities in addition to
tradi- tional voice message store-and-forward functions. As a
result, TIFF-F fax messages can optionally be sent between compliant
VPIM systems, and may be rejected if the recipient system cannot deal
with fax.
Refer to the VPIM Specification for proper usage of this content.
<span class="h3"><a class="selflink" id="section-4.7" href="#section-4.7">4.7</a>. Extended Black-and-white Fax Mode Summary</span>
Recommended fields are shown with an asterisk *.
Required fields or values are shown with a double asterisk **. If the
double asterisk is on the field name, then all the listed values are
required of implementations; if the double asterisks are in the
Values column, then only the values suffixed with a double asterisk
are required of implementations.
+---------------------------+--------------------------------+
| Baseline Fields | Values |
+---------------------------+--------------------------------+
| BitsPerSample | 1** |
+---------------------------+--------------------------------+
| Compression | 3**: 1D Modified Huffman and |
| | 2D Modified Read coding |
| | 4: 2D Modified Modified Read |
| | coding |
+---------------------------+--------------------------------+
| DateTime* | {ASCII}: date/time in 24-hour |
| | format "YYYY:MM:DD HH:MM:SS" |
+---------------------------+--------------------------------+
| FillOrder** | 1: most significant bit first |
| | 2: least significant bit first |
+------------------------------------------------------------+
<span class="grey">McIntyre, et. al. Standards Track [Page 37]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-38" ></span>
<span class="grey"><a href="./rfc2301">RFC 2301</a> File Format for Internet Fax March 1998</span>
+------------------------------------------------------------+
| ImageDescription* | {ASCII}: A string describing |
| | the contents of the image. |
+---------------------------+--------------------------------+
| ImageWidth | 1728**, 2048, 2432, 2592, |
| | 3072, 3456, 3648, 4096, 4864 |
+---------------------------+--------------------------------+
| ImageLength** | n: total number of scanlines |
| | in image |
+---------------------------+--------------------------------+
| NewSubFileType | 2**: Bit 1 identifies single |
| | page of a multi-page document |
+---------------------------+--------------------------------+
| Orientation | 1**-8, Default 1 |
+---------------------------+--------------------------------+
| PhotometricInterpretation | 0: pixel value 1 means black |
| ** | 1: pixel value 1 means white |
+---------------------------+--------------------------------+
| ResolutionUnit** | 2: inch |
| | 3: centimeter |
+---------------------------+--------------------------------+
| RowsPerStrip** | n: number of scanlines per |
| | TIFF strip |
+---------------------------+--------------------------------+
| SamplesPerPixel | 1** |
+---------------------------+--------------------------------+
| Software* | {ASCII}: name & release |
| | number of creator software |
+---------------------------+--------------------------------+
| StripByteCounts** | <n>: number or bytes in TIFF |
| | strip |
+---------------------------+--------------------------------+
| StripOffsets** | <n>: offset from beginning of |
| | file to each TIFF strip |
+---------------------------+--------------------------------+
| XResolution | 200, 204**, 300, 400, 408 |
| | (written in pixels/inch) |
+---------------------------+--------------------------------+
| YResolution | 98**, 196**, 100, |
| | 200, 300, 391, 400 |
| | (written in pixels/inch) |
+---------------------------+--------------------------------+
| Extension Fields |
+---------------------------+--------------------------------+
<span class="grey">McIntyre, et. al. Standards Track [Page 38]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-39" ></span>
<span class="grey"><a href="./rfc2301">RFC 2301</a> File Format for Internet Fax March 1998</span>
+---------------------------+--------------------------------+
| T4Options | 0**: required if Compression |
| | is Modified Huffman, EOLs are |
| | not byte aligned |
| | 1: required if Compression is |
| | 2D Modified Read, EOLs are |
| | not byte aligned |
| | 4**: required if Compression |
| | is Modified Huffman, EOLs are |
| | byte aligned |
+---------------------------+--------------------------------+
| T4Options (continued) | 5: required if Compression |
| | is 2D Modified Read, EOLs are |
| | byte aligned |
+---------------------------+--------------------------------+
| T6Options | 0: required if Compression is |
| | 2D Modified Modified Read |
+---------------------------+--------------------------------+
| DocumentName* | {ASCII}: name of scanned |
| | document |
+---------------------------+--------------------------------+
| PageNumber** | n,m: page number followed by |
| | total page count |
+---------------------------+--------------------------------+
| New Fields |
+---------------------------+--------------------------------+
| BadFaxLines* | number of "bad" scanlines |
| | encountered during reception |
+---------------------------+--------------------------------+
| CleanFaxData* | 0: no "bad" lines |
| | 1: "bad" lines exist, but were |
| | regenerated by receiver |
| | 2: "bad" lines exist, but have |
| | not been regenerated |
+---------------------------+--------------------------------+
| ConsecutiveBadFaxLines* | Max number of consecutive |
| | "bad" lines received |
+---------------------------+--------------------------------+
<span class="h2"><a class="selflink" id="section-5" href="#section-5">5</a>. Lossless JBIG Black-and-White Fax Mode</span>
This section defines the lossless JBIG black-and-white mode or
Profile J of TIFF for facsimile. Implementations of this profile are
required to also implement Profile S.
<span class="grey">McIntyre, et. al. Standards Track [Page 39]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-40" ></span>
<span class="grey"><a href="./rfc2301">RFC 2301</a> File Format for Internet Fax March 1998</span>
The previous section described the extended interchange set of TIFF
fields for black-and-white fax, which provided support for the MH, MR
and MMR compression of black-and-white images. This section adds a
mode with JBIG compression capability.
<span class="h3"><a class="selflink" id="section-5.1" href="#section-5.1">5.1</a>. Overview</span>
This section describes a black-and-white mode that uses JBIG
compression. The ITU-T has approved the single-progression sequential
mode of JBIG [<a href="#ref-T.82" title="Information technology - Coded representation of picture and audio information - Progressive bi- level image compression">T.82</a>] for Group 3 facsimile. JBIG coding offers
improved compression for halftoned originals. JBIG compression is
used in accordance with the application rules given in ITU-T Rec.
T.85 [<a href="#ref-T.85" title="Application profile for Recommendation T.82 - Progressive bi-level image compression (JBIG coding scheme) for facsimile apparatus">T.85</a>].
This mode is essentially the extended black-and-white mode with JBIG
compression used instead of MH, MR or MMR.
<span class="h3"><a class="selflink" id="section-5.2" href="#section-5.2">5.2</a>. Required TIFF Fields</span>
This section lists the required fields and the values they must have
to be ITU-compatible. Besides the fields listed in <a href="#section-2.2.1">Section 2.2.1</a>, the
extended black-and-white fax mode requires the following fields.
<span class="h4"><a class="selflink" id="section-5.2.1" href="#section-5.2.1">5.2.1</a>. Baseline fields</span>
The TIFF fields that SHALL be used in this mode are the same as those
described in <a href="#section-4.2.1">Section 4.2.1</a> for the extended black-and-white mode,
with two exceptions: the following text replaces the text in <a href="#section-4.2.1">Section</a>
<a href="#section-4.2.1">4.2.1</a> for the Compression and FillOrder fields.
Compression(259) = 9. SHORT
RequiredByTIFFBaseline
9 = ITU-T Rec. T.82 coding, applying ITU-T Rec. T.85 (JBIG). This is
a TIFF extension value.
Default = 1 (and is not applicable; field must be specified).
FillOrder(266) = 2. SHORT
RequiredByTIFFBaseline
2 = Pixels are arranged within a byte such that pixels with lower
column values are stored in the lower-order bits of the bytes, i.e.,
least significant bit first (LSB).
NOTE: The JBIG coding of black-and-white image data in Profile J
follows ITU-T Rec. T.85 [<a href="#ref-T.85" title="Application profile for Recommendation T.82 - Progressive bi-level image compression (JBIG coding scheme) for facsimile apparatus">T.85</a>], which specifies LSB first ordering
within a byte. Note that Baseline TIFF readers are only required to
support MSB first ordering or FillOrder = 1.
<span class="h4"><a class="selflink" id="section-5.2.2" href="#section-5.2.2">5.2.2</a>. Extension fields</span>
<span class="grey">McIntyre, et. al. Standards Track [Page 40]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-41" ></span>
<span class="grey"><a href="./rfc2301">RFC 2301</a> File Format for Internet Fax March 1998</span>
Same fields as those in <a href="#section-2.2.1">Section 2.2.1</a>.
<span class="h4"><a class="selflink" id="section-5.2.3" href="#section-5.2.3">5.2.3</a>. New fields</span>
None.
<span class="h3"><a class="selflink" id="section-5.3" href="#section-5.3">5.3</a>. Recommended TIFF Fields</span>
See <a href="#section-2.2.3">Section 2.2.3</a> and 2.2.4.
<span class="h3"><a class="selflink" id="section-5.4" href="#section-5.4">5.4</a>. Lossless JBIG Black-and-white Fax Mode Summary</span>
Recommended fields are shown with an asterisk *.
Required fields or values are shown with a double asterisk **. If the
double asterisk is on the field name, then all the listed values are
required of implementations; if the double asterisks are in the
Values column, then only the values suffixed with a double asterisk
are required of implementations.
+---------------------------+--------------------------------+
| Baseline Fields | Values |
+---------------------------+--------------------------------+
| BitsPerSample | 1** |
+---------------------------+--------------------------------+
| Compression | 9**: JBIG coding |
+---------------------------+--------------------------------+
| DateTime* | {ASCII}: date/time in 24-hour |
| | format "YYYY:MM:DD HH:MM:SS" |
+---------------------------+--------------------------------+
| FillOrder** | 1: most significant bit first |
| | 2: least significant bit first |
+---------------------------+--------------------------------+
| ImageDescription* | {ASCII}: A string describing |
| | the contents of the image. |
+---------------------------+--------------------------------+
| ImageWidth | 1728**, 2048, 2432, 2592, |
| | 3072, 3456, 3648, 4096, 4864 |
+---------------------------+--------------------------------+
| ImageLength** | n: total number of scanlines |
| | in image |
+---------------------------+--------------------------------+
| NewSubFileType** | 2: Bit 1 identifies single |
| | page of a multi-page document |
+---------------------------+--------------------------------+
| Orientation | 1**-8, Default 1 |
+------------------------------------------------------------+
<span class="grey">McIntyre, et. al. Standards Track [Page 41]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-42" ></span>
<span class="grey"><a href="./rfc2301">RFC 2301</a> File Format for Internet Fax March 1998</span>
+---------------------------+--------------------------------+
| PhotometricInterpretation | 0: pixel value 1 means black |
| ** | 1: pixel value 1 means white |
+---------------------------+--------------------------------+
| ResolutionUnit** | 2: inch |
| | 3: centimeter |
+---------------------------+--------------------------------+
| RowsPerStrip** | n: number of scanlines per |
| | TIFF strip |
+---------------------------+--------------------------------+
| SamplesPerPixel** | 1 |
+---------------------------+--------------------------------+
| Software* | {ASCII}: name & release |
| | number of creator software |
+---------------------------+--------------------------------+
| StripByteCounts** | <n>: number of bytes in TIFF |
| | strip |
+---------------------------+--------------------------------+
| StripOffsets** | <n>: offset from beginning of |
| | file to each TIFF strip |
+---------------------------+--------------------------------+
| XResolution | 200, 204**, 300, 400, 408 |
| | (written in pixels/inch) |
+---------------------------+--------------------------------+
| YResolution | 98**, 196**, 100, |
| | 200, 300, 391, 400 |
| | (written in pixels/inch) |
+---------------------------+--------------------------------+
| Extension Fields |
+---------------------------+--------------------------------+
| DocumentName* | {ASCII}: name of document |
| | scanned |
+---------------------------+--------------------------------+
| PageNumber** | n,m: page number followed by |
| | total page count |
+---------------------------+--------------------------------+
| New Fields |
+---------------------------+--------------------------------+
| GlobalParametersIFD* | IFD: global parameters IFD |
+---------------------------+--------------------------------+
| ProfileType* | n: type of data stored in file |
+---------------------------+--------------------------------+
| FaxProfile* | n: ITU-compatible fax mode |
+---------------------------+--------------------------------+
| CodingMethods* | n: compression algorithms used |
| | in file |
+---------------------------+--------------------------------+
<span class="grey">McIntyre, et. al. Standards Track [Page 42]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-43" ></span>
<span class="grey"><a href="./rfc2301">RFC 2301</a> File Format for Internet Fax March 1998</span>
<span class="h2"><a class="selflink" id="section-6" href="#section-6">6</a>. Base Color Fax Mode</span>
<span class="h3"><a class="selflink" id="section-6.1" href="#section-6.1">6.1</a>. Overview</span>
This section defines the lossy color mode or Profile C of TIFF for
facsimile. Implementations of this profile are required to also
implement Profile S.
This is the base mode for color and grayscale facsimile, which means
that all applications that support color fax must support this mode.
The basic approach is the lossy JPEG compression [T.4, Annex E; T.81]
of L*a*b* color data [<a href="#ref-T.42" title="Continuous-tone colour representation method for facsimile">T.42</a>]. Grayscale applications use the L*
lightness component; color applications use the L*, a* and b*
components.
This mode uses a new PhotometricInterpretation field value to
describe the L*a*b* encoding specified in [<a href="#ref-T.42" title="Continuous-tone colour representation method for facsimile">T.42</a>]. This encoding
differs in two ways from the other L*a*b* encodings used in TIFF
[<a href="#ref-TIFF" title="Revision 6.0">TIFF</a>, <a href="#ref-TTN1" title="1995">TTN1</a>]: it specifies a different default range for the a* and
b* components, based on a comprehensive evaluation of existing
hardcopy output, and it optionally allows selectable range for the
L*, a* and b* components.
<span class="h3"><a class="selflink" id="section-6.2" href="#section-6.2">6.2</a>. Required TIFF Fields</span>
This section lists the required fields, in addition to those given in
<a href="#section-2.2.1">Section 2.2.1</a>, and the values they must support to be compatible with
ITU-T Rec. T.42 and Annex E in ITU-T Rec. T.4.
<span class="h4"><a class="selflink" id="section-6.2.1" href="#section-6.2.1">6.2.1</a>. Baseline Fields</span>
ImageWidth(256). SHORT or LONG
This mode supports the following fixed page widths: 864, 1024, 1216,
1728, 2048, 2432, 2592, 3072, 3456, 3648, 4096, 4864.
NewSubFileType(254) = (Bit 1=1). LONG
RequiredByTIFFforFAX
Bit 1 is 1 if the image is a single page of a multi-page document.
Default = 0 (no subfile bits on, so may not be omitted for fax)
BitsPerSample(258) = 8, 12. SHORT
Count = SamplesPerPixel
The base color fax mode requires 8 bits per sample, with 12 as an
option. 12 bits per sample is not baseline TIFF.
Compression(259) = 7. SHORT
Base color fax mode uses Baseline JPEG compression. Value 7
represents JPEG compression as specified in [<a href="#ref-TTN2" title="1995">TTN2</a>].
<span class="grey">McIntyre, et. al. Standards Track [Page 43]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-44" ></span>
<span class="grey"><a href="./rfc2301">RFC 2301</a> File Format for Internet Fax March 1998</span>
FillOrder(266) = 1 , 2. SHORT
RequiredByTIFFBaseline
Profile C readers must be able to read data in both bit orders,
but the vast majority of facsimile products store data LSB
first, exactly as it appears on the telephone line.
1 = Most Significant Bit first.
2 = Least Significant Bit first
PhotometricInterpretation(262) = 10. SHORT
Base color fax mode requires pixel values to be stored using the CIE
L*a*b* encoding defined in ITU-T Rec. T.42. This encoding is
indicated by the PhotometricInterpretation value 10, referred to as
ITULAB. With this encoding, the minimum sample value is mapped to 0
and the maximum sample value is mapped to (2^n - 1), i.e. the
maximum value, where n is the BitsPerSample value. The conversion
from unsigned ITULAB-encoded samples values to signed CIE L*a*b*
values is determined by the Decode field; see Sec. 6.2.3
NOTE: PhotometricInterpretation values 8 and 9 specify encodings for
use with 8-bit-per-sample CIE L*a*b* [<a href="#ref-TIFF" title="Revision 6.0">TIFF</a>] and ICC L*a*b* [<a href="#ref-TTN1" title="1995">TTN1</a>]
data, but they are fixed encodings, which use different minimum and
maximum samples than the T.42 default encoding. As currently defined,
they are not able to represent fax-encoded L*a*b* data.
ResolutionUnit(296) = 2, 3. SHORT
The unit of measure for resolution. 2 = inch, 3 = centimeter;
Default = 2 (field may be omitted if this is the value)
SamplesPerPixel(277) = 1, 3. SHORT
1: L* component only, required in base color mode
3: L*, a*, b* components
Encoded according to PhotometricInterpretation field
XResolution(282) = 100, 200, 300, 400. RATIONAL
YResolution(283) = 100, 200, 300, 400. RATIONAL
The resolution of the image is expressed in pixels per resolution
unit. In pixels per inch, allowed XResolution values are: 100, 200,
300, and 400. The base color fax mode requires the pixels to be
square, hence YResolution must equal XResolution. Base resolution is
200 pixels per inch and SHALL be supported by all implementations of
this mode. See <a href="#section-2.2.2">Section 2.2.2</a> for inch-metric equivalency.
NOTE: Not all combinations of XResolution, YResolution and ImageWidth
are legal. The following table gives the legal combinations for inch-
based resolutions and the corresponding paper sizes [<a href="#ref-T.30">T.30</a>].
<span class="grey">McIntyre, et. al. Standards Track [Page 44]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-45" ></span>
<span class="grey"><a href="./rfc2301">RFC 2301</a> File Format for Internet Fax March 1998</span>
+--------------------------------+---------------------------+
| XResolution x YResolution | ImageWidth |
+--------------------------------+---------------------------+
| 100 x 100 | 864 | 1024 | 1216 |
+--------------------------------+---------------------------+
| 200 x 200 | 1728 | 2048 | 2432 |
+--------------------------------+---------------------------+
| 300 x 300 | 2592 | 3072 | 3648 |
+--------------------------------+---------------------------+
| 400 x 400 | 3456 | 4096 | 4864 |
+--------------------------------+---------------------------+
|Letter,A4| B4 | A3 |
| Legal | | |
+---------------------------+
| Paper Size |
+---------------------------+
<span class="h4"><a class="selflink" id="section-6.2.2" href="#section-6.2.2">6.2.2</a> Extension Fields</span>
The JPEG compression standard allows for the a*b* chroma components of
an image to be subsampled relative to the L* lightness component. The
extension fields ChromaSubSampling and ChromaPositioning define the
subsampling. They are the same as YCbCrSubSampling and YCbCrPositioning
in [<a href="#ref-TIFF" title="Revision 6.0">TIFF</a>], but have been renamed to reflect their applicability to other
color spaces.
ChromaSubSampling(530). SHORT
Count = 2
Specifies the subsampling factors for the chroma components of a
L*a*b* image. The two subfields of this field, ChromaSubsampleHoriz
and ChromaSubsampleVert, specify the horizontal and vertical
subsampling factors respectively.
SHORT 0: ChromaSubsampleHoriz = 1, 2.
1: equal numbers of lightness and chroma samples horizontally,
2: twice as many lightness samples as chroma samples horizontally,
SHORT 1: ChromaSubsampleVert = 1, 2.
1: equal numbers of lightness and chroma samples vertically,
2: twice as many lightness samples as chroma samples vertically,
The default value for ChromaSubSampling is (2,2), which is the
default for chroma subsampling in color fax [T.4, Annex E]. No
chroma subsampling, i.e. ChromaSubSampling = (1,1), is an option
for color fax
ChromaPositioning(531) = 1. SHORT
Specifies the spatial positioning of chroma components relative to
<span class="grey">McIntyre, et. al. Standards Track [Page 45]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-46" ></span>
<span class="grey"><a href="./rfc2301">RFC 2301</a> File Format for Internet Fax March 1998</span>
the lightness component.
1: centered,
A value of 1 means chrominance samples are spatially offset and
centered with respect to luminance samples. See the current TIFF
specification under YcbCr positioning for further information.
Default = 1, which is what ITU-T T.4, Annex E specifies.
<span class="h4"><a class="selflink" id="section-6.2.3" href="#section-6.2.3">6.2.3</a>. New Fields</span>
Decode(433). SRATIONAL
Count = 2 * SamplesPerPixel
Describes how to map image sample values into the range of values
appropriate for the current color space. In general, the values are
taken in pairs and specify the minimum and maximum output value for
each color component. For the base color fax mode, Decode has a
count of 6 values and maps the unsigned ITULAB-encoded sample values
(Lsample, asample, bsample) to signed L*a*b* values, as follows:.
L* = Decode[0] + Lsample x (Decode[1]-Decode[0])/(2^n -1)
a* = Decode[2] + asample x (Decode[3]-Decode[2])/(2^n -1)
b* = Decode[4] + bsample x (Decode[5]-Decode[4])/(2^n -1)
where Decode[0], Decode[2] and Decode[4] are the minimum values for
L*, a* and b*; Decode[1], Decode[3] and Decode[5] are the maximum
values for L*, a* and b*; and n is the BitsPerSample, either 8 or
12. For example, when n=8, L*=Decode[0] when Lsample=0 and
L*=Decode[1] when Lsample=255.
ITU-T Rec. T.42 specifies the ITULAB encoding in terms of a range
and offset for each component, which are related to the minimum and
maximum values as follows:
minimum = - (range x offset) / 2^n - 1
maximum = minimum + range
The Decode field default values depend on the color space. For the
ITULAB color space encoding, the default values correspond to the
base range and offset, as specified in ITU-T Rec. T.42 [<a href="#ref-T.42" title="Continuous-tone colour representation method for facsimile">T.42</a>]. The
following table gives the base range and offset values for
BitsPerSample=8 and 12, and the corresponding default minimum and
maximum default values for the Decode field, calculated using the
equations above when PhotometricInterpetation=10.
<span class="grey">McIntyre, et. al. Standards Track [Page 46]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-47" ></span>
<span class="grey"><a href="./rfc2301">RFC 2301</a> File Format for Internet Fax March 1998</span>
+-----------------------------------------------+
| ITU-T Rec. T.42 | Decode |
+---------+-----------| base values | default values |
| BitsPer + Component +------------------+----------------------------+
| -Sample | | Range | Offset | Min | Max |
+---------+-----------+--------+---------+--------------+-------------+
| 8 | L* | 100 | 0 | 0 | 100 |
| +-----------+--------+---------+--------------+-------------+
| | a* | 170 | 128 | -21760/255 | 21590/255 |
| +-----------+--------+---------+--------------+-------------+
| | b* | 200 | 96 | -19200/255 | 31800/255 |
+---------+-----------+--------+---------+--------------+-------------+
| 12 | L* | 100 | 0 | 0 | 100 |
| +-----------+--------+---------+--------------+-------------+
| | a* | 170 | 2048 | -348160/4095 | 347990/4095 |
| +-----------+--------+---------+--------------+-------------+
| | b* | 200 | 1536 | -307200/4095 | 511800/4095 |
+---------+-----------+--------+---------+--------------+-------------+
For example, when PhotometricInterpretation=10 and BitsPerSample=8,
the default value for Decode is (0, 100, -21760/255, 21590/255,
-19200/255, 31800/255).
<span class="h3"><a class="selflink" id="section-6.3" href="#section-6.3">6.3</a>. Recommended TIFF Fields</span>
See Sections <a href="#section-2.2.3">2.2.3</a>. and 2.2.4.
<span class="h3"><a class="selflink" id="section-6.4" href="#section-6.4">6.4</a> Base Color Fax Mode Summary</span>
Recommended fields are shown with an asterisk *
Required fields or values are shown with a double asterisk **. If the
double asterisk is on the field name, then all the listed values are
required of implementations; if the double asterisks are in the
Values column, then only the values suffixed with a double asterisk
are required of implementations.
+---------------------------+--------------------------------+
| Baseline Fields | Values |
+---------------------------+--------------------------------+
| BitsPerSample | 8**: 8 bits per color sample |
| | 12: optional 12 bits/sample |
+---------------------------+--------------------------------+
| Compression** | 7: JPEG |
+---------------------------+--------------------------------+
| DateTime* | {ASCII}: date/time in 24-hour |
| | format "YYYY:MM:DD HH:MM:SS" |
+---------------------------+--------------------------------+
<span class="grey">McIntyre, et. al. Standards Track [Page 47]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-48" ></span>
<span class="grey"><a href="./rfc2301">RFC 2301</a> File Format for Internet Fax March 1998</span>
+------------------------------------------------------------+
| FillOrder** | 1: most significant bit first |
| | 2: least significant bit first |
+---------------------------+--------------------------------+
| ImageDescription* | {ASCII}: A string describing |
| | the contents of the image. |
+---------------------------+--------------------------------+
| ImageWidth | 864, 1024, 1216, 1728**, 2048 |
| | 2432, 2592, 3072, 3456, 3648 |
| | 4096, 4864 |
+---------------------------+--------------------------------+
| ImageLength** | n: total number of scanlines |
| | in image |
+---------------------------+--------------------------------+
| NewSubFileType** | 2: Bit 1 identifies single page|
| | of a multi-page document |
+---------------------------+--------------------------------+
| Orientation | 1**-8, Default 1 |
+---------------------------+--------------------------------+
| PhotometricInterpretation | 10**: ITULAB |
+---------------------------+--------------------------------+
| ResolutionUnit** | 2: inch |
| | 3: centimeter |
+---------------------------+--------------------------------+
| RowsPerStrip** | n: number of scanlines per |
| | TIFF strip |
+---------------------------+--------------------------------+
| SamplesPerPixel | 1**: L* (lightness) |
| | 3: LAB |
+---------------------------+--------------------------------+
| Software* | {ASCII}: name & release number |
| | of creator software |
+---------------------------+--------------------------------+
| StripByteCounts** | <n>: number or bytes in |
| | TIFF strip |
+---------------------------+--------------------------------+
| StripOffsets** | <n>: offset from beginning |
| | of file to each TIFF strip |
+---------------------------+--------------------------------+
| XResolution | 100, 200**, 300, 400 (written |
| | in pixels/inch) |
+---------------------------+--------------------------------+
| YResolution | 100, 200**, 300, 400 |
| | (must equal XResolution) |
+---------------------------+--------------------------------+
<span class="grey">McIntyre, et. al. Standards Track [Page 48]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-49" ></span>
<span class="grey"><a href="./rfc2301">RFC 2301</a> File Format for Internet Fax March 1998</span>
+---------------------------+--------------------------------+
| Extension Fields |
+---------------------------+--------------------------------+
| DocumentName* | {ASCII}: name of scanned |
| | document |
+---------------------------+--------------------------------+
| PageNumber** | n,m: page number followed by |
| | total page count |
+---------------------------+--------------------------------+
| ChromaSubSampling | (1,1), (2, 2)** |
| | (1, 1): equal numbers of |
| | lightness and chroma samples |
| | horizontally and vertically |
| | (2, 2): twice as many lightness|
| | samples as chroma samples |
| | horizontally and vertically |
+---------------------------+--------------------------------+
| ChromaPositioning | 1**: centered |
+---------------------------+--------------------------------+
| New Fields |
+---------------------------+--------------------------------+
| Decode** | minL, maxL, mina, maxa, minb, |
| | maxb: minimum and maximum |
| | values for L*a*b* |
+---------------------------+--------------------------------+
| GlobalParametersIFD* | IFD: IFD containing |
| | global parameters |
+---------------------------+--------------------------------+
| ProfileType* | n: type of data stored in |
| | TIFF file |
+---------------------------+--------------------------------+
| FaxProfile* | n: ITU-compatible fax mode |
+---------------------------+--------------------------------+
| CodingMethods* | n: compression algorithms |
| | used in file |
+---------------------------+--------------------------------+
| VersionYear* | byte sequence: year of ITU std |
+---------------------------+--------------------------------+
<span class="h2"><a class="selflink" id="section-7" href="#section-7">7</a>. Lossless Color Mode</span>
This section defines the lossless color mode or Profile L of TIFF for
facsimile. Implementations of this profile are required to also
implement Profiles S and C.
<span class="grey">McIntyre, et. al. Standards Track [Page 49]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-50" ></span>
<span class="grey"><a href="./rfc2301">RFC 2301</a> File Format for Internet Fax March 1998</span>
<span class="h3"><a class="selflink" id="section-7.1" href="#section-7.1">7.1</a>. Overview</span>
This mode, defined in [<a href="#ref-T.43" title="Colour and gray-scale image representations using lossless coding scheme for facsimile">T.43</a>], uses JBIG to losslessly code three
types of color and grayscale images: one bit per color CMY, CMYK and
RGB images; a palettized (i.e. mapped) color image; and continuous
tone color and grayscale images. The last two are multi-level and use
the L*a*b* encoding specified in [<a href="#ref-T.42" title="Continuous-tone colour representation method for facsimile">T.42</a>].
<span class="h4"><a class="selflink" id="section-7.1.1" href="#section-7.1.1">7.1.1</a>. Color Encoding</span>
While under development, this mode was called T.Palette, as one of
its major additions was palette or mapped color images. Baseline TIFF
only allows RGB color maps, but ITU-T Rec. T.43 requires L*a*b* color
maps, using the encoding specified in ITU-T Rec. T.42. Palette color
images are expressed with indices (bits per sample) of 12 bits or
less, or optionally 13 to 16 bits, per [<a href="#ref-T.43" title="Colour and gray-scale image representations using lossless coding scheme for facsimile">T.43</a>].
Enabling T.43 color maps in TIFF requires the extension field
Indexed, defined in [<a href="#ref-TTN1" title="1995">TTN1</a>], and the PhotometricInterpretation field
value 10, defined in <a href="#section-6.2.1">Section 6.2.1</a>. The following table shows the
corresponding PhotometricInterpretation, SamplesPerPixel,
BitsPerSample and Indexed field values for the different T.43 image
types.
+----------------------------------------------------------+
| Image Type |PhotometricIn| Samples | Bits Per | Indexed |
| |-terpretation| PerPixel | Sample | |
|------------+-------------+----------+----------+---------|
| RGB | 2=RGB | 3 | 1 | 0 |
+----------------------------------------------------------+
| CMY | 5=CMYK | 3 | 1 | 0 |
+------------+-------------+----------+----------+---------+
| CMYK | 5=CMYK | 4 | 1 | 0 |
+------------+-------------+----------+----------+---------+
| Palette | 10=ITULAB | 1 | n | 1 |
+------------+-------------+----------+----------+---------+
| Grayscale | 10=ITULAB | 1 | 8, 12 | 0 |
+------------+-------------+----------+----------+---------+
| Color | 10=ITULAB | 3 | 8, 12 | 0 |
+------------+-------------+----------+----------+---------+
<span class="h4"><a class="selflink" id="section-7.1.2" href="#section-7.1.2">7.1.2</a>. JBIG Encoding</span>
T.43 uses the single-progression sequential mode of JBIG, defined in
ITU-T Rec. T.82. To code multi-level images using JBIG, which is a
bi-level compression method, an image is resolved into a set of bit-
planes, and each bit-plane is then JBIG compressed. For continuous
tone color and grayscale images, Gray code conversion is used. The
<span class="grey">McIntyre, et. al. Standards Track [Page 50]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-51" ></span>
<span class="grey"><a href="./rfc2301">RFC 2301</a> File Format for Internet Fax March 1998</span>
Gray code conversion is part of the data stream encoding, and is
therefore invisible to TIFF.
<span class="h3"><a class="selflink" id="section-7.2" href="#section-7.2">7.2</a>. Required TIFF Fields</span>
This section lists the required fields, in addition to those in
<a href="#section-2.2.1">Section 2.2.1</a>, and the values they must have to be compatible with
ITU-T Rec. T.43.
<span class="h4"><a class="selflink" id="section-7.2.1" href="#section-7.2.1">7.2.1</a>. Baseline Fields</span>
ImageWidth(256). SHORT or LONG
Same page widths as the base color mode; see <a href="#section-6.2.1">Section 6.2.1</a>.
NewSubFileType(254) = (Bit 1=1). LONG
RequiredByTIFFforFAX
Bit 1 is 1 if the image is a single page of a multi-page document.
Default = 0 (no subfile bits on, so may not be omitted for fax)
BitsPerSample(258) = 1, 2-8, 9-16. SHORT
Count = SamplesPerPixel
RGB, CMY, CMYK: 1 bit per sample
Continuous tone (L*a*b*): 2-8 bits per sample, 9-12 bits optional
Palette color: 12 or fewer bits per sample, 13-16 bits optional
Note: More than 8 bits per sample is not baseline TIFF.
ColorMap(320). SHORT
Count = 3 * number of sample values
Lossless color fax mode supports palette-color (indexed) images
where the single component value is used as an index into a full
color lookup table stored in the ColorMap field. The sample value is
encoded using the number of bits given by the BitsPerSample field
value. However, per [<a href="#ref-T.43" title="Colour and gray-scale image representations using lossless coding scheme for facsimile">T.43</a>],the number of sample values may be less
than 2**BitsPerSample. The color lookup table is only required to
have as many entries as there are number of sample values. For
palette-color images in lossless color fax mode, the ITULAB encoding
with 8 or optionally 12 bits per color map value is supported. To
utilize a color map, the TIFF Indexed field must be present. TIFF
orders the color map values so that all the L* values come first,
followed by all the a* values and then all the b* values. Because
ITU-T Rec. T.43 specifies a "chunky" ordering with the L*a*b*
components of the first value, followed by those of the second
value, and so on, reproducing color map values from a fax data
stream in a TIFF file requires reordering values.
Compression(259) = 10. SHORT
10: ITU-T Rec. T.43 representation, using ITU-T Rec. T.82 (JBIG)
coding
<span class="grey">McIntyre, et. al. Standards Track [Page 51]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-52" ></span>
<span class="grey"><a href="./rfc2301">RFC 2301</a> File Format for Internet Fax March 1998</span>
FillOrder(266) = 1 , 2. SHORT
RequiredByTIFFBaseline
Profile F readers must be able to read data in both bit orders,
but the vast majority of facsimile products store data LSB
first, exactly as it appears on the telephone line.
1 = Most Significant Bit first.
2 = Least Significant Bit first
PhotometricInterpretation(262) = 2, 5, 10. SHORT
2: RGB
5: CMYK, including CMY
10: ITULAB
Image data may also be stored as palette color images, where pixel
values are represented by a single component that is an index into a
color map using the ITULAB encoding. This color map is specified by
the ColorMap field. To use palette color images, set the
PhotometricInterpretation to 10,SamplesPerPixel to 1, and Indexed to
1. The color map is stored in the ColorMap field. See <a href="#section-7.1.1">Section 7.1.1</a>
for further discussion on the color encoding.
ResolutionUnit(296) = 2, 3. SHORT
The unit of measure for resolution. 2 = inch, 3 = centimeter;
Default = 2 (field may be omitted if this is the value)
SamplesPerPixel(277) = 1, 3, 4. SHORT
1: Palette color image, or L*-only if Indexed = 0 and
PhotometricInterpretation is 10 (ITULAB).
3: RGB, or L*a*b*, or CMY if PhotometricInterpretation is 5 (CMYK).
4: CMYK.
XResolution(282) = 100, 200, 300, 400. RATIONAL
YResolution(283) = 100, 200, 300, 400. RATIONAL
The resolution of the image is expressed in pixels per resolution
unit. In pixels per inch, allowed XResolution values are: 100, 200,
300, and 400. The lossless color fax mode requires the pixels to be
square, hence YResolution must equal XResolution. Base resolution is
200 pixels per inch. See <a href="#section-2.2.2">Section 2.2.2</a> for inch-metric equivalency.
<span class="h4"><a class="selflink" id="section-7.2.2" href="#section-7.2.2">7.2.2</a>. Extension Fields</span>
Indexed(364) = 0, 1. SHORT
0: not a palette-color image
1: palette-color image
This field is used to indicate that each sample value is an index
into an array of color values specified in the ColorMap field.
Lossless color fax mode supports palette-color images with the
ITULAB encoding. The SamplesPerPixel value must be 1.
<span class="grey">McIntyre, et. al. Standards Track [Page 52]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-53" ></span>
<span class="grey"><a href="./rfc2301">RFC 2301</a> File Format for Internet Fax March 1998</span>
<span class="h4"><a class="selflink" id="section-7.2.3" href="#section-7.2.3">7.2.3</a>. New Fields</span>
Decode(433) SRATIONAL
Decode is used in connection with the ITULAB encoding of image data
and color map values; see <a href="#section-6.2.3">Section 6.2.3</a>.
<span class="h3"><a class="selflink" id="section-7.3" href="#section-7.3">7.3</a>. Recommended TIFF Fields</span>
See Sections <a href="#section-2.2.3">2.2.3</a>. and 2.2.4.
<span class="h3"><a class="selflink" id="section-7.4" href="#section-7.4">7.4</a>. Lossless Color Fax Mode Summary</span>
Recommended fields are shown with an asterisk *.
+--------------------+--------------------------------------+
| Baseline Fields | Values |
+--------------------+--------------------------------------+
| BitsPerSample | 1: Binary RGB, CMY(K) |
| | 8: 8 bits per color sample |
| | 9-16: optional |
+--------------------+--------------------------------------+
| ColorMap | n: LAB color map |
+--------------------+--------------------------------------+
| Compression | 10: JBIG, per T.43 |
+--------------------+--------------------------------------+
| DateTime* | {ASCII}: date/time in the 24-hour |
| | format "YYYY:MM:DD HH:MM:SS" |
+--------------------+--------------------------------------+
| FillOrder** | 1: Most significant bit first |
| | 2: Least significant bit first |
+--------------------+--------------------------------------+
| ImageDescription* | {ASCII}: A string describing the |
| | contents of the image. |
+--------------------+--------------------------------------+
| ImageWidth | 864, 1024, 1216, 1728**, 2048, 2432, |
| | 2592, 3072, 3456, 3648, 4096, 4864 |
+--------------------+--------------------------------------+
| ImageLength** | n: total number of scanlines in image|
+--------------------+--------------------------------------+
| NewSubFileType | 2: Bit 1 identifies single page of a |
| | multi-page document |
+--------------------+--------------------------------------+
| Orientation | 1**-8, Default 1 |
+--------------------+--------------------------------------+
| PhotometricInter- | 2: RGB |
| pretation | 5: CMYK |
| | 10: ITULAB |
+--------------------+--------------------------------------+
<span class="grey">McIntyre, et. al. Standards Track [Page 53]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-54" ></span>
<span class="grey"><a href="./rfc2301">RFC 2301</a> File Format for Internet Fax March 1998</span>
+--------------------+--------------------------------------+
| ResolutionUnit | 2: inch |
| | 3: centimeter |
+--------------------+--------------------------------------+
| RowsPerStrip | n: number of scanlines per TIFF strip|
+--------------------+--------------------------------------+
| SamplesPerPixel | 1: L* (lightness) |
| | 3: LAB, RGB, CMY |
| | 4: CMYK |
+--------------------+--------------------------------------+
| Software* | {ASCII}: name & release number of |
| | creator software |
+--------------------+--------------------------------------+
| StripByteCounts | <n>: number or bytes in TIFF strip |
+--------------------+--------------------------------------+
| StripOffsets | <n>: offset from beginning of file to|
| | each TIFF strip |
+--------------------+--------------------------------------+
| XResolution | 100, 200, 300, 400 (written in |
| | pixels/inch) |
+--------------------+--------------------------------------+
| YResolution | equal to XResolution (pixels must be |
| | square) |
+--------------------+--------------------------------------+
| Extension Fields |
+--------------------+--------------------------------------+
| DocumentName* | {ASCII}: name of scanned document |
+--------------------+--------------------------------------+
| PageNumber | n,m: page number followed by total |
| | page count |
+--------------------+--------------------------------------+
| Indexed | 0: not a palette-color image |
| | 1: palette-color image |
+--------------------+--------------------------------------+
| New Fields |
+--------------------+--------------------------------------|
| Decode | minL, maxL, mina, maxa, minb, maxb: |
| |minimum and maximum values for L*a*b* |
+--------------------+--------------------------------------+
| GlobalParameters | IFD: global parameters IFD |
| IFD* | |
+-----------------------------------------------------------+
<span class="grey">McIntyre, et. al. Standards Track [Page 54]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-55" ></span>
<span class="grey"><a href="./rfc2301">RFC 2301</a> File Format for Internet Fax March 1998</span>
+--------------------+--------------------------------------+
| ProfileType* | n: type of data stored in TIFF file |
+--------------------+--------------------------------------+
| FaxProfile* | n: ITU-compatible fax mode |
+--------------------+--------------------------------------+
| CodingMethods* | n:compression algorithms used in |
| | file |
+--------------------+--------------------------------------+
| VersionYear* | byte sequence: year of ITU fax std |
+--------------------+--------------------------------------+
<span class="h2"><a class="selflink" id="section-8" href="#section-8">8</a>. Mixed Raster Content Mode</span>
This section defines the Mixed Raster Content mode or Profile M of
TIFF for facsimile. Implementations of this profile are required to
implement Profiles S and C, and may optionally implement Profiles F,
J and L.
<span class="h3"><a class="selflink" id="section-8.1" href="#section-8.1">8.1</a>. Overview</span>
Unlike previous fax modes, which use a single coding method and
spatial resolution for an entire fax page, the Mixed Raster Content
mode [<a href="#ref-T.44" title="Mixed Raster Content (MRC)">T.44</a>] enables different coding methods and resolutions within a
single page. For example, consider a page that contains black-and-
white text, which is best coded with MMR or JBIG, a color bar chart,
best coded with JBIG, and a scanned color image, best coded with
JPEG. Similarly, while spatial resolution of 400 pixels per inch may
be best for the black-and- white text, 200 pixel per inch is usually
sufficient for a color image.
Rather than applying one coding method and resolution to all
elements, MRC allows multiple coders and resolutions within a page.
By itself, MRC does not define any new coding methods or resolutions.
Instead it defines a 3-layer image model for structuring and
combining the scanned image data. The MRC 3-layer model has been
applied here using the TIFF format to yield a data structure which
differs from [<a href="#ref-T.44" title="Mixed Raster Content (MRC)">T.44</a>] though it applies the same coding methods, uses
the same compressed image data stream and is consistent with the TIFF
principle of a single IFD per image.
<span class="h4"><a class="selflink" id="section-8.1.1" href="#section-8.1.1">8.1.1</a>. MRC 3-layer model</span>
The 3 layers of the MRC model are Foreground and Background, which
are both multi-level, and Mask, which is bi-level. Each layer may
appear only once on a page and is coded independently of the other
two. In our earlier example, the black-and-white text could be in the
Mask layer, the color chart in the Foreground layer, and the color
image in the Background layer.
<span class="grey">McIntyre, et. al. Standards Track [Page 55]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-56" ></span>
<span class="grey"><a href="./rfc2301">RFC 2301</a> File Format for Internet Fax March 1998</span>
Each layer is an image and, when present, is represented by at least
one IFD in a TIFF file. This is consistent with TIFF, which provides
fields to define the attributes, such as resolution, image size, bits
per sample, etc., of a single image or layer. The distribution of
content among layers is determined by the writer, as is the choice of
coding method, color encoding and spatial resolution for a layer.
The final image is obtained by using the Mask layer to select pixels
from the other two layers. When the Mask layer pixel value is 1, the
corresponding pixel from the Foreground layer is selected; when it is
0, the corresponding pixel from the Background layer is selected.
Details are given in the Introduction of [<a href="#ref-T.44" title="Mixed Raster Content (MRC)">T.44</a>].
Not all pages, and not all parts of a page, require 3 layers. If
there is only one layer present, then that layer is the primary image
or IFD. If there is more than one layer, then the Mask must be one of
the layers, in which case it is the primary image and it must be page
size.
MRC allows a page to be split into strips, with a variable number of
scanlines in a strip. A strip can have 1, 2 or 3 layers. A single,
stripped layer may be stored as a single, stripped image in an IFD,
e.g., all strips associated with the Background layer may be treated
as a single image. Alternatively, each strip associated with a layer
may be stored as a separate image or IFD, e.g., the Background layer
can be composed of several images that are offset vertically with
respect to the page. In this case, there can be no overlap between
images associated with a single layer. According to [<a href="#ref-T.4" title="Standardization of group 3 facsimile apparatus for document transmission">T.4</a>] Annex G,
strips having more than 1 layer SHOULD NOT be more than 256 lines in
length unless the capability to receive longer strips has been
negotiated.
Furthermore, color fax also requires the spatial resolutions of
Background and Foreground images to be legal fax values that are also
integer factors of the Mask image resolution. For example, if the
Mask Layer resolution is 400 pixels per inch, then allowed
resolutions for the Foreground and Background layers are 100, 200 or
400 pixels per inch; if the Mask is at 300 pixels per inch, then
allowed values are 100 and 300. The Foreground and Background layer
resolutions can be independently set.
<span class="h4"><a class="selflink" id="section-8.1.2" href="#section-8.1.2">8.1.2</a>. A TIFF Representation for the MRC 3-layer model</span>
In the TIFF representation of the 3-layer MRC model, each page is
represented by a single IFD, called the Primary IFD, that represents
the Mask layer (unless the Foreground or Background is the single
layer present), and a set of child IFDs that are referenced through
the SubIFDs extension field [<a href="#ref-TTN1" title="1995">TTN1</a>]. To distinguish MRC-specific
<span class="grey">McIntyre, et. al. Standards Track [Page 56]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-57" ></span>
<span class="grey"><a href="./rfc2301">RFC 2301</a> File Format for Internet Fax March 1998</span>
SubIFDs from other SubIFDs, the NewSubFileType field MUST have Bit 4
ON, indicating an MRC-related IFD. A new ImageLayer field is also
introduced that consists of two values that identify the layer
(Foreground, Background, or Mask) and the order within the layer
(first, second, ... image of the layer); see <a href="#section-8.2.3">Section 8.2.3</a>.
Because MRC allows strips with variable numbers of scanlines, a
reader MUST support StripRowCounts field because a writer may use it
in place of the RowsPerStrip field in this mode. The StripRowCounts
field allows each layer, with a variable number of scanlines in each
strip, to be represented by a single IFD, when the coding parameters
are the same for all strips in the layer. The MRC standard [<a href="#ref-T.44" title="Mixed Raster Content (MRC)">T.44</a>]
allows the Foreground and Background layers to have strips with
different coding parameters. In this case, a separate IFD is required
to represent the strips which use different coding parameters; see
text in next paragraph. In all cases, the Mask layer is required to
be represented by a single IFD and a single set of coding parameters.
The use of SubIFDs to store child IFDs is described in [<a href="#ref-TTN1" title="1995">TTN1</a>]. An
example is shown graphically below. The Primary IFD associated with
page 1 (PrimaryIFD 0) points to page 2 (PrimaryIFD 1) with the
nextIFD offset. The Primary IFD, corresponding to the Mask layer
(ImageLayer=[2,1]), contains a SubIFDs field that points to a list of
child IFDs. The first child IFD represents one image of the
Background layer, i.e., ImageLayer=[1,1]. This child IFD points to
the second child IFD via the nextIFD offset. This child represents
the second Background layer image, ImageLayer=[1,2]. Finally, the
second child points to the third child, which corresponds to the
single Foreground layer image, ImageLayer=[3,1]. The next IFD offset
associated with this Foreground image is 0, indicating no more child
IFDs exist. Each primary IFD has the NewSubFileType set to 18,
indicating the IFD is MRC-specific (bit 4) and that it is a single
page of a multi-page document (bit 1). Each child IFD has the
NewSubFileType set to 16, indicating the IFD is MRC-specific. The 'V'
character should be read as a down-pointing arrow.
(nextIFD)
PRIMARY IFD 0 ------------> PRIMARY IFD 1--> ...
ImageLayer = [2,1]
NewSubFileType = 18
SubIFDs
|
V
Child IFD
ImageLayer = [1,1]
NewSubFileType = 16
|
|(nextIFD)
<span class="grey">McIntyre, et. al. Standards Track [Page 57]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-58" ></span>
<span class="grey"><a href="./rfc2301">RFC 2301</a> File Format for Internet Fax March 1998</span>
|
V
Child IFD
ImageLayer = [1,2]
NewSubFileType = 16
|
|(nextIFD)
|
V
Child IFD
ImageLayer = [3,1]
NewSubFileType = 16
|
|(nextIFD)
V
0
In the example above, the SubIFDs field of the Primary IFD points to
the first IFD in a list of child IFDs. TIFF allows the SubIFDs field
to point to an array of IFDs, each of which can be the first of a
list of IFDs. An MRC-enabled TIFF reader must scan all available
child IFDs to locate and identify IFDs associated with MRC layers.
In the case where the Background or Foreground layers are described
with multiple IFDs, the XPosition and YPosition TIFF fields specify
the offset to the upper-left corner of the IFD with respect to the
Mask layer; see <a href="#section-8.2.2">Section 8.2.2</a>. When there is only a single layer
(Mask, Foreground, or Background), it is stored as the Primary IFD.
<span class="h3"><a class="selflink" id="section-8.2" href="#section-8.2">8.2</a>. Required TIFF Fields</span>
This section describes the TIFF fields required, in addition to those
in <a href="#section-2.2.1">Section 2.2.1</a>, to represent MRC mode fax images. Since MRC mode
stores fax data as a collection of images corresponding to layers or
parts of layers, the coding methods, color encodings and spatial
resolutions used by previous modes apply to MRC. Therefore, the
descriptions here will typically reference the appropriate earlier
section. Fields and values specific to MRC mode are pointed out.
<span class="h4"><a class="selflink" id="section-8.2.1" href="#section-8.2.1">8.2.1</a>. Baseline Fields</span>
ImageWidth(256). SHORT or LONG
Same page widths as the base color mode; see <a href="#section-6.2.1">Section 6.2.1</a>.
In the MRC mode, the width of a Foreground or Background image in
the coded data stream may be less than the page width. In this case,
the image width in the coded data steam is used to interpret the
coded data, and the value of this field is used as the page width.
<span class="grey">McIntyre, et. al. Standards Track [Page 58]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-59" ></span>
<span class="grey"><a href="./rfc2301">RFC 2301</a> File Format for Internet Fax March 1998</span>
NewSubFileType(254) = 16, 18. LONG
For MRC fax mode, the NewSubFileType field has two bits that are
required.
Bit 1 indicates a single page of a multi-page document and must be
set for the Primary IFD;
Bit 4 indicates MRC imaging model as described in ITU-T
Recommendation T.44 [<a href="#ref-T.44" title="Mixed Raster Content (MRC)">T.44</a>], and must be set for Primary IFDs
and all MRC-specific child IFDs.
BitsPerSample(258) = 1, 2-8, 9-16 SHORT
Compression(259) = 3, 4, 7, 9, 10. SHORT
SamplesPerPixel(277) = 1, 3, 4. SHORT
FillOrder(266) = 1 , 2. SHORT
RequiredByTIFFBaseline
Profile F readers must be able to read data in both bit orders,
but the vast majority of facsimile products store data LSB
first, exactly as it appears on the telephone line.
1 = Most Significant Bit first.
2 = Least Significant Bit first
ResolutionUnit(296) = 2, 3. SHORT
PhotometricInterpretation(262) = 0, 1, 2, 5, 10. SHORT
For Mask layer, see Sections <a href="#section-4.2.1">4.2.1</a> and <a href="#section-5.2.1">5.2.1</a>.
For Foreground and Background layers, see Sections <a href="#section-6.2.1">6.2.1</a> and <a href="#section-7.2.1">7.2.1</a>.
ColorMap(320). SHORT
Count = 3 * (2**BitsPerSample)
Used when Foreground or Background layer is a palette-color image;
see <a href="#section-7.2.1">Section 7.2.1</a>.
XResolution(282) = 100, 200, 300, 400. RATIONAL
YResolution(283) = 100, 200, 300, 400. RATIONAL
The resolution of the image is expressed in pixels per resolution
unit. In pixels per inch, allowed XResolution values for all layers
are: 100, 200, 300, and 400. MRC color fax mode requires the pixels
to be square, hence YResolution must equal XResolution for all
layers. The resolution of Background and Foreground layers must each
be an integer factor of the Primary image, which is the Mask layer,
when it is present; see <a href="#section-8.4">Section 8.4</a>.
See <a href="#section-2.2.2">Section 2.2.2</a> for inch-metric equivalency.
<span class="h4"><a class="selflink" id="section-8.2.2" href="#section-8.2.2">8.2.2</a>. Extension Fields</span>
ChromaSubSampling(530). SHORT
ChromaPositioning(531). SHORT
For Foreground and Background layers, see <a href="#section-6.2.2">Section 6.2.2</a>.
<span class="grey">McIntyre, et. al. Standards Track [Page 59]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-60" ></span>
<span class="grey"><a href="./rfc2301">RFC 2301</a> File Format for Internet Fax March 1998</span>
Indexed(346) = 0, 1. SHORT
For Foreground and Background layers: 1 indicates a palette-color
image, see <a href="#section-7.2.2">Section 7.2.2</a>.
T4Options(292) = 0, 1, 4, 5. SHORT
T6Options(293) = 0. SHORT
For Mask layer, see <a href="#section-4.2.2">Section 4.2.2</a>.
SubIFDs(330). IFD
Count = number of child IFDs
Each value is an offset from the beginning of the TIFF file to a
child IFD [<a href="#ref-TTN1" title="1995">TTN1</a>].
XPosition(286). RATIONAL
YPosition(287). RATIONAL
Specifies the horizontal and vertical offsets of the top-left of the
IFD from the top-left of the Primary IFD in page resolution units.
For example, if the Primary IFD is at 400 pixels per inch, and a
foreground layer IFD is at 200 pixels per inch and located at pixel
coordinate (345, 678) with respect to the Primary IFD, the XPosition
value is 345/400 and the YPosition value is 678/400.
Color fax does not currently allow overlap of any component images
within a single layer.
Default values for XPosition and YPosition are 0.
<span class="h4"><a class="selflink" id="section-8.2.3" href="#section-8.2.3">8.2.3</a>. New Fields</span>
Decode(433). SRATIONAL
For Foreground and Background layers, see <a href="#section-6.2.3">Section 6.2.3</a>.
DefaultImageColor(434). SHORT
Count = SamplesPerPixel
In areas where no image data is available, a default color is needed
to specify the color value. If the StripByteCounts value for a strip
is 0, then the color for that strip must be defined by a default
image color.
The DefaultImageColor field uses the same encoding as the image
data, and its value is therefore interpreted using the
PhotometricInterpretation, SamplesPerPixel, BitsPerSample, and
Indexed fields. If the fax data stream requires a different
encoding, then transferring the default color value between a TIFF
file and fax data stream requires a color conversion.
For the Foreground layer image, the default value for the
DefaultImageColor field is black. For other cases, including the
Background layer image, the default value is white.
<span class="grey">McIntyre, et. al. Standards Track [Page 60]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-61" ></span>
<span class="grey"><a href="./rfc2301">RFC 2301</a> File Format for Internet Fax March 1998</span>
StripRowCounts(559). LONG
Count = number of strips
The number of scanlines stored in a strip. MRC allows each fax strip
to store a different number of scanlines. For strips with more than
one layer there is a maximum strip size of 256 scanlines or full
page size. The 256 maximum SHOULD be used unless the capability to
receive longer strips has been negotiated. This field replaces
RowsPerStrip for IFDs with variable-sized strips. Only one of the
two fields, StripRowCounts and RowsPerStrip, may be used in an IFD.
ImageLayer (34732). SHORT or LONG.
Count = 2
Image layers are defined such that layer 1 is the Background layer,
layer 3 is the Foreground layer, and layer 2 is the Mask layer,
which selects pixels from the Background and Foreground layers. The
ImageLayer tag contains two values, describing the layer to which
the image belongs and the order in which it is imaged.
ImageLayer[0] = 1, 2, 3.
1: Image is a Background image, i.e., the image that will appear
whenever the Mask contains a value of 0. Background images
typically contain low-resolution, continuous-tone imagery.
2: Image is the Mask layer. In MRC, if the Mask layer is present, it
must be the Primary IFD and be full page in extent (no gaps.)
3: Image is a Foreground image, i.e., the image that will appear
whenever the Mask contains a value of 1. The Foreground image
generally defines the color of text or lines, but may also
contain high-resolution imagery.
ImageLayer[1]:
1: first image to be imaged in this layer,
2: second image to be imaged in this layer,
3: ...
Value describing the image order. In MRC, this may be considered
the strip number. Since MRC mode currently does not allow overlap
between images within a layer, the order value does not have any
visual effect.
In MRC fax mode, it is possible that only a single layer is
transmitted. For example, if a page contains only a single
continuous-tone photograph, then only the Background layer may be
transmitted. In this case, the Background layer will be stored as the
Primary IFD. ImageLayer[0] will be 1 indicating Background;
ImageLayer[1] will be 1 since there can be no other IFDs associated
with that layer. No Mask layer will exist.
<span class="grey">McIntyre, et. al. Standards Track [Page 61]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-62" ></span>
<span class="grey"><a href="./rfc2301">RFC 2301</a> File Format for Internet Fax March 1998</span>
<span class="h3"><a class="selflink" id="section-8.3" href="#section-8.3">8.3</a>. Recommended TIFF Fields</span>
See Sections <a href="#section-2.2.3">2.2.3</a>. and 2.2.4.
<span class="h3"><a class="selflink" id="section-8.4" href="#section-8.4">8.4</a>. Rules and Requirements for Images</span>
The MRC mode defines a fundamental set of rules for images in the 3-
layer representation.
1. If more than one layer exists, then the binary Mask layer SHALL be
present and be the primary image. The Mask layer SHALL support the
encoding defined in <a href="#section-3">Section 3</a> and MAY support the encodings
defined in Sections <a href="#section-4">4</a> and <a href="#section-5">5</a>. If only one layer exists, then the
image corresponding to that layer is the primary image.
2. When the binary Mask layer is the Primary IFD, the Primary IFD
defines and extends to the entire page boundary; all attached
model images cannot extend beyond the Primary image. Resolution
differences may cause some pixels to "hang over" the page
boundary, but no new pixels should exist completely beyond the
page extent. When the Foreground or Background layer is the
Primary IFD, the Primary IFD may not be page width.
3. The Background and Foreground images SHALL support the color
encoding defined in <a href="#section-6">Section 6</a> and MAY support the color encoding
defined in <a href="#section-7">Section 7</a>. These images MAY optionally cover only a
portion of the strip or page.
4. Each Primary IFD and each MRC-specific SubIFD must have an
ImageLayer field to specify which layer the IFD belongs to, and
the imaging order of that IFD within the layer.
5. Each Primary IFD must have a NewSubFileType field value set to 18,
indicating a single page of a multi-page document (bit 1) and MRC
mode (bit 4).
6. Each MRC-specific child IFD must have a NewSubFileType field value
set to 16, indicating MRC mode (bit 4).
7. In MRC mode, each layer is transmitted as a sequence of strips. It
is possible that each strip of each layer can be stored as a
separate IFD. In this case, the SubIFDs structure pointed to by
the Primary IFD will contain several IFDs that have an ImageLayer
field with the layer identified as either Background (layer 1) or
Foreground (layer 3). There may be no overlap in the vertical
direction between IFDs associated with a single layer, although
<span class="grey">McIntyre, et. al. Standards Track [Page 62]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-63" ></span>
<span class="grey"><a href="./rfc2301">RFC 2301</a> File Format for Internet Fax March 1998</span>
there may be a gap from one of these images to the next. The TIFF
XPosition and YPosition fields are used to indicate the placement
of these images with respect to the primary image.
8. When the Mask image is present, the resolution of Background and
Foreground images must each be an integer factor of the Mask
image. For example, if the Mask image is 400 pixels/inch, then the
Background or Foreground image may be at 400 pixels/inch (400/1),
200 pixels/inch (400/2) or 100 pixels/inch (400/4).
<span class="h3"><a class="selflink" id="section-8.5" href="#section-8.5">8.5</a>. MRC Fax Mode Summary</span>
Recommended fields are shown with an asterisk *
+------------------+-----------------------------------------+
| Baseline Fields | Values |
|------------------|-----------------------------------------|
| BitsPerSample | 1: binary mask |
| | 8: 8 bits per color sample |
| | 9-16: optional 12 bits/sample |
+------------------+-----------------------------------------+
| ColorMap | n: LAB color map |
+------------------+-----------------------------------------+
| Compression | 3: Modified Huffman and Modified Read |
| | 4: Modified Modified Read |
| | 7: JPEG |
| | 9: JBIG, per T.85 |
| | 10: JBIG, per T.43 |
+------------------+-----------------------------------------+
| DateTime* | {ASCII): date/time in the 24-hour format|
| | "YYYY:MM:DD HH:MM:SS" |
+------------------+-----------------------------------------|
| FillOrder** | 1: Most significant bit first |
| | 2: Least significant bit first |
+------------------+-----------------------------------------|
| ImageDescription*| {ASCII}: A string describing the |
| | contents of the image. |
+------------------+-----------------------------------------+
| ImageWidth | 864, 1024, 1216, 1728**, 2048, 2432, |
| | 2592, 3072, 3456, 3648, 4096, 4864 |
+------------------+-----------------------------------------+
| ImageLength** | n: total number of scanlines in image |
+------------------+-----------------------------------------+
| NewSubFileType | 16, 18: |
| | Bit 1 indicates single page of a multi- |
| | page document on Primary IFD |
| | Bit 4 indicates MRC model |
+------------------+-----------------------------------------+
<span class="grey">McIntyre, et. al. Standards Track [Page 63]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-64" ></span>
<span class="grey"><a href="./rfc2301">RFC 2301</a> File Format for Internet Fax March 1998</span>
+------------------+-----------------------------------------+
| Orientation | 1**-8, Default 1 |
+------------------+-----------------------------------------+
| PhotometricInter | 0: WhiteIsZero |
| pretation | 1: BlackIsZero |
| | 2: RGB |
| | 5: CMYK |
| | 10: ITULAB |
+------------------+-----------------------------------------+
| ResolutionUnit | 2: inch |
| | 3: centimeter |
+------------------+-----------------------------------------+
| RowsPerStrip | n: number or scanlines per strip |
+------------------+-----------------------------------------+
| SamplesPerPixel | 1: L* (lightness) |
| | 3: RGB, LAB, CMY |
| | 4: CMYK |
+------------------+-----------------------------------------+
| Software* | {ASCII}: name & release number of |
| | creator software |
+------------------+-----------------------------------------+
| StripByteCounts | <n>: number or bytes in each strip |
+------------------+-----------------------------------------+
| StripOffsets | <n>: offset from beginning of file to |
| | each TIFF strip |
+------------------+-----------------------------------------|
| XResolution | 100, 200, 300, 400 (written in |
| | pixels/inch) |
+------------------+-----------------------------------------|
| YResolution | equal to XResolution (pixels must be |
| | square) |
+------------------+-----------------------------------------+
| Extension Fields |
+------------------+-----------------------------------------+
| T4Options | 0: required if Compression is Modified |
| | Huffman, EOLs not byte aligned |
| | 1: required if Compression 2D Modified |
| | Read, EOLs are not byte aligned |
| | 4: required if Compression Modified |
| | Huffman, EOLs byte aligned |
| | 5: required if Compression 2D Modified |
| | Read, EOLs are byte aligned |
+------------------+-----------------------------------------+
| T6Options | 0: required if Compression is 2D |
| | Modified Modified Read |
+------------------+-----------------------------------------+
<span class="grey">McIntyre, et. al. Standards Track [Page 64]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-65" ></span>
<span class="grey"><a href="./rfc2301">RFC 2301</a> File Format for Internet Fax March 1998</span>
+------------------+-----------------------------------------+
| DocumentName* | {ASCII}: name of scanned document |
+------------------+-----------------------------------------+
| PageNumber | n,m: page number followed by total page |
| | count |
+------------------+-----------------------------------------+
| ChromaSubSampling| (1,1), (2, 2)** |
| | (1, 1): equal numbers of lightness and |
| | chroma samples horizontally & vertically|
| | (2, 2): twice as many lightness samples |
| | as chroma horizontally and vertically |
+------------------+-----------------------------------------+
| ChromaPositioning| 1: centered |
+------------------+-----------------------------------------+
| Indexed | 0: not a palette-color image |
| | 1: palette-color image |
+------------------+-----------------------------------------+
| SubIFDs | <IFD>: byte offset to fg/bg IFDs |
+------------------+-----------------------------------------+
| XPosition | horizontal offset in primary IFD |
| | resolution units |
+------------------+-----------------------------------------+
| YPosition | vertical offset in primary IFD |
| | resolution units |
+------------------+-----------------------------------------+
| New Fields |
+------------------+-----------------------------------------+
| Decode | minL, maxL, mina, maxa, minb, maxb: |
| | minimum and maximum values for L*a*b* |
+------------------+-----------------------------------------+
| DefaultImageColor| <n>: background color |
+------------------+-----------------------------------------+
| StripRowCounts | <n>: number of scanlines in each strip |
+------------------+-----------------------------------------+
| ImageLayer | n, m: layer number, imaging sequence |
| | (e.g., strip number) |
+------------------+-----------------------------------------+
| GlobalParameters | IFD: global parameters IFD |
| IFD* | |
+------------------+-----------------------------------------+
| ProfileType* | n: type of data stored in TIFF file |
+------------------+-----------------------------------------+
| FaxProfile* | n: ITU-compatible fax mode |
+------------------+-----------------------------------------+
| CodingMethods* | n: compression algorithms used in file |
+------------------+-----------------------------------------+
| ModeNumber* | n: version of ITU fax standard |
+------------------+-----------------------------------------+
<span class="grey">McIntyre, et. al. Standards Track [Page 65]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-66" ></span>
<span class="grey"><a href="./rfc2301">RFC 2301</a> File Format for Internet Fax March 1998</span>
+------------------------------------------------------------+
| VersionYear* | byte sequence: year of ITU fax standard |
+------------------+-----------------------------------------+
<span class="h2"><a class="selflink" id="section-9" href="#section-9">9</a>. MIME content-type image/tiff</span>
[<a id="ref-TIFF-REG">TIFF-REG</a>] describes the registration of the MIME content-type
image/tiff to refer to TIFF encoded image data. When transported by
MIME, the TIFF content defined by this document must be encoded
within an image/tiff content type. In addition, an optional
"application" parameter is defined for image/tiff to identify a
particular application's subset of TIFF and TIFF extensions for the
encoded image data, if it is known. Typically, this would be used to
assist the recipient in dispatching a suitable rendering package to
handle the display or processing of the image file.
<span class="h3"><a class="selflink" id="section-9.1" href="#section-9.1">9.1</a> Refinement of MIME content-type image/tiff for Facsimile</span>
<span class="h3"> Applications</span>
Since this document defines facsimile specific profiles of TIFF, it
is useful to note an appropriate application parameter for the
image/tiff MIME content-type.
The two values of the image/tiff application parameter as defined for
facsimile are shown below, separated by a comma:
faxbw, faxcolor
The "faxbw" application parameter is suitable for use by applications
that can process one or more TIFF for facsimile profiles or subsets
used for the encoding of black and white facsimile data.
The "faxcolor" application parameter is suitable for use by
applications that can process one or more TIFF for facsimile profiles
or subsets that can be used for the encoding of black and white, AND
color facsimile data.
Since this document defines several profiles of TIFF for facsimile,
the following rules should be followed when setting the application
parameter value. For TIFF image data which is encoded for the
profiles of TIFF for Facsimile that support black-and-white image
data (Profiles S, F or J), applications which use one of these
profiles or a subset should set the value of the application
parameter to "faxbw". For TIFF image data which is encoded for the
defined profiles of TIFF for Facsimile that support color image data
(Profiles C, L or M), as well as black-and-white image data,
applications which use one of these profiles or a subset should set
the value of the application parameter to "faxcolor".
<span class="grey">McIntyre, et. al. Standards Track [Page 66]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-67" ></span>
<span class="grey"><a href="./rfc2301">RFC 2301</a> File Format for Internet Fax March 1998</span>
An example of the use of the image/tiff MIME Content-type with the
application parameter set with the value 'faxbw' follows:
Content-type: image/tiff; application=faxbw
In this example, use of this parameter value will enable applications
to identify the content as being within a profile or subset of TIFF
for Facsimile that is suitable for encoding black and white image
data, Before attempting to process the image data.
In a similar respect, an example of the image/tiff MIME Content-type
with the application parameter setting suitable for handling a color
subset or profile of TIFF for facsimile is shown below:
Content-type: image/tiff; application=faxcolor
<span class="h2"><a class="selflink" id="section-10" href="#section-10">10</a>. Security Considerations</span>
This document describes a file format for Internet fax, which is a
series of profiles of TIFF for facsimile. As such, it does not create
any security issues not already identified in [<a href="#ref-TIFF-REG" title=""Tag Image File Format (TIFF) - image/tiff MIME Sub-type Registration"">TIFF-REG</a>], in its use
of fields as defined in [<a href="#ref-TIFF" title="Revision 6.0">TIFF</a>]. There are also new TIFF fields
defined within this specification, but they are of a purely
descriptive nature, so that no new security risks are incurred.
Further, the encoding specified in this document does not in any way
preclude the use of any Internet security protocol to encrypt,
authenticate, or non-repudiate TIFF-encoded facsimile messages.
<span class="h2"><a class="selflink" id="section-11" href="#section-11">11</a>. References</span>
[<a id="ref-REQ">REQ</a>] Bradner, S, "Key words for use in RFCs to Indicate Requirement
Levels", <a href="./rfc2119">RFC 2119</a>, March 1997.
[<a id="ref-T.4">T.4</a>] ITU-T Recommendation T.4, Standardization of group 3 facsimile
apparatus for document transmission, October 1997
[<a id="ref-T.6">T.6</a>] ITU-T Recommendation T.6, Facsimile coding schemes and coding
control functions for group 4 facsimile apparatus, November 1988
[<a id="ref-T.30">T.30</a>] ITU-T Recommendation T.30 - Procedures for Document Facsimile
Transmission in the General Switched Telephone Network, June 1996
[<a id="ref-T.42">T.42</a>] ITU-T Recommendation T.42, Continuous-tone colour
representation method for facsimile, February 1996
<span class="grey">McIntyre, et. al. Standards Track [Page 67]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-68" ></span>
<span class="grey"><a href="./rfc2301">RFC 2301</a> File Format for Internet Fax March 1998</span>
[<a id="ref-T.43">T.43</a>] ITU-T Recommendation T.43, Colour and gray-scale image
representations using lossless coding scheme for facsimile, February
1997
[<a id="ref-T.44">T.44</a>] ITU-T Recommendation T.44, Mixed Raster Content (MRC), October
1997.
[<a id="ref-T.81">T.81</a>] ITU-T Recommendation T.81, Information technology - Digital
compression and coding of continuous-tone still images - Requirements
and guidelines, September 1992
[<a id="ref-T.82">T.82</a>] ITU-T Recommendation T.82, Information technology - Coded
representation of picture and audio information - Progressive bi-
level image compression, March 1995
[<a id="ref-T.85">T.85</a>] ITU-T Recommendation T.85, Application profile for
Recommendation T.82 - Progressive bi-level image compression (JBIG
coding scheme) for facsimile apparatus, August 1995
[<a id="ref-TIFF">TIFF</a>] Tag Image File Format, Revision 6.0, Adobe Developers
Association, June 3, 1992,
<a href="ftp://ftp.adobe.com/pub/adobe/devrelations/devtechnotes/pdffiles/tiff6.pdf">ftp://ftp.adobe.com/pub/adobe/devrelations/</a>
<a href="ftp://ftp.adobe.com/pub/adobe/devrelations/devtechnotes/pdffiles/tiff6.pdf">devtechnotes/pdffiles/tiff6.pdf</a>
The TIFF 6.0 specification dated June 3, 1992 specification (c)
1986-1988, 1992 Adobe Systems Incorporated. All Rights Reserved.
[<a id="ref-TIFF-FY">TIFF-FY</a>] Parsons, G. and J. Rafferty, "Tag Image File Format (TIFF)
- F Profile for Facsimile", <a href="./rfc2306">RFC 2306</a>, March 1998.
[<a id="ref-TIFF-F0">TIFF-F0</a>] TIFF Class F specification, Apr 28, 1990,
<a href="ftp://ftp.faximum.com/pub/documents/tiff_f.txt">ftp://ftp.faximum.com/pub/documents/tiff_f.txt</a>
[<a id="ref-TIFF-REG">TIFF-REG</a>] Parsons, G., Rafferty J. and S. Zilles, "Tag Image File
Format (TIFF) - image/tiff MIME Sub-type Registration", <a href="./rfc2302">RFC 2302</a>,
March 1998.
[<a id="ref-TTN1">TTN1</a>] Adobe PageMaker 6.0 TIFF Technical Notes, Sept. 14, 1995,
<a href="http://www.adobe.com/supportservice/devrelations/PDFS/TN/TIFFPM6.pdf">http://www.adobe.com/supportservice/devrelations/PDFS/TN/TIFFPM6.pdf</a>
[<a id="ref-TTN2">TTN2</a>] Draft TIFF Technical Note 2, Replacement TIFF/JPEG
specification, March 17, 1995,
<a href="ftp://ftp.sgi.com/graphics/tiff/TTN2.draft.txt">ftp://ftp.sgi.com/graphics/tiff/TTN2.draft.txt</a>
[<a id="ref-VPIM2">VPIM2</a>] Vaudreui,l G. and G. Parsons, "Voice Profile for Internet
Mail - version 2", work in progress, <<a href="./draft-ema-vpim-06.txt">draft-ema-vpim-06.txt</a>>
The ITU-T Recommendations are available at <a href="http://www.itu.ch">http://www.itu.ch</a>.
<span class="grey">McIntyre, et. al. Standards Track [Page 68]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-69" ></span>
<span class="grey"><a href="./rfc2301">RFC 2301</a> File Format for Internet Fax March 1998</span>
<span class="h2"><a class="selflink" id="section-12" href="#section-12">12</a>. Authors' Addresses</span>
Lloyd McIntyre Stephen Zilles
Xerox Corporation Adobe Systems Inc.
Mailstop PAHV-305 Mailstop W14
3400 Hillview Ave. 345 Park Avenue
Palo Alto, CA 94304 USA San Jose, CA 95110-2704, USA
Voice: +1-650-813-6762 Voice: +1-408-536-4766
Fax: +1-650-845-2340 Fax: +1-408-536-4042
Email: lmcintyre@adoc.xerox.com Email: szilles@adobe.com
Robert Buckley Dennis Venable
Xerox Corporation Xerox Corporation
Mailstop 0128-30E Mailstop 0128-27E
800 Phillips Road 800 Phillips Road
Webster, NY 14580, USA Webster, NY 14580, USA
Voice: +1-716-422-1282 Voice: +1-716-422-8009
Fax: +1-716-422-6117 Fax: +1-716-422-6117
Email: Rob_Buckley@wb.xerox.com Email: venable@wrc.xerox.com
Glenn S. Parsons James Rafferty
Northern Telecom Human Communications
P.O. Box 3511, Station C 12 Kevin Drive
Ottawa, ON K1Y 4H7, Canada Danbury, CT 06811-2901, USA
Phone: +1-613-763-7582 Phone: +1-203-746-4367
Fax: +1-613-763-2697 Fax: +1-203-746-4367
Email: Glenn.Parsons@Nortel.ca Email: Jrafferty@worldnet.att.net
<span class="grey">McIntyre, et. al. Standards Track [Page 69]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-70" ></span>
<span class="grey"><a href="./rfc2301">RFC 2301</a> File Format for Internet Fax March 1998</span>
Annex A: Summary of TIFF Fields for Internet Fax
This annex includes tables which list by mode the TIFF fields used in
the proposed fax file format. The fields are organized into 3
categories:
1) TIFF Baseline Fields
2) TIFF Extension Fields
3) New Fields.
The tables include the allowed values for each fax mode. Entries
other than explicit numbers are described by:
n - single number
n, m - 2 numbers
a, b, c - 3 numbers
r - rational number
<n> - array of numbers
<b> - byte sequence
{ASCII} - string
IFD - IFD byte offset
<IFD> - array of IFD byte offsets
A blank entry in the table indicates that the field is not used by
that particular fax mode.
Table A.1 TIFF Baseline Fields
+---------------------------------------------------------+
| Fax Mode/Profile |
+---------------------------------------------------------|
| Minimal | Extended | JBIG | Lossy |Lossless| Mixed |
+----------| B&W | B&W | B&W | Color | Color | Raster |
| TIFF | | | | | | Content|
| Field | S | F | J | C | L | M |
+----------+---------+----------+--------+---------+--------+--------+
| BitsPer | 1 | 1 | 1 | 8, 12 | 1, 2-8 | 1, 2-8 |
| Sample | | | | | 9-16 | 9-16 |
+----------+---------+----------+--------+---------+--------+--------+
| ColorMap | | | | | <n> | <n> |
+----------+---------+----------+--------+---------+--------+--------+
| Compres- | 3 | 3, 4 | 9 | 7 | 10 | 3, 4, 7|
| sion | | | | | | 9,10 |
+----------+---------+----------+--------+---------+--------+--------+
| DateTime | | {ASCII} | {ASCII}| {ASCII} | {ASCII}| {ASCII}|
+----------+---------+----------+--------+---------+--------+--------+
| FillOrder| 2 | 1, 2 | 1, 2 | 1, 2 | 1, 2 | 1,2 |
+----------+---------+----------+--------+---------+--------+--------+
<span class="grey">McIntyre, et. al. Standards Track [Page 70]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-71" ></span>
<span class="grey"><a href="./rfc2301">RFC 2301</a> File Format for Internet Fax March 1998</span>
+----------+---------+----------+--------+---------+--------+--------+
| ImageDes-| | {ASCII} | {ASCII}| {ASCII} | {ASCII}| {ASCII}|
| cription | | | | | | |
+----------+---------+----------+--------+---------+--------+--------+
| Image- | n | n | n | n | n | n |
| Length | | | | | | |
+----------+---------+----------+--------+---------+--------+--------+
| Image- | 1728 | 1728, 2048, 2432 | 864, 1024, 1216, 1728, |
| Width | | 2592, 3072, 3456 | 2048, 2432, 2592, 3072, |
| | | 3648, 4096, 4864 | 3456, 3648, 4096, 4864 |
+----------+---------+----------+--------+---------+--------+--------+
| NewSub- | 2 | 2 | 2 | 2 | 2 | 16, 18 |
| FileType | | | | | | |
+----------+---------+----------+--------+---------+--------+--------+
| Orien- | 1 | 1-8 | 1-8 | 1-8 | 1-8 | 1-8 |
| tation | | | | | | |
+----------+---------+----------+--------+---------+--------+--------+
| Photo- | 0 | 0, 1 | 0, 1 | 10 | 2, 5, | 0, 1, |
| metric- | | | | | 10 | 2, 5, |
| Interp- | | | | | | 10 |
| retation | | | | | | |
+----------+---------+----------+--------+---------+--------+--------+
| Resolu- | 2 | 2, 3 | 2, 3 | 2, 3 | 2, 3 | 2, 3 |
| tionUnit | | | | | | |
+----------+---------+----------+--------+---------+--------+--------+
| RowsPer- | n | n | n | n | n | n |
| Strip | | | | | | |
+----------+---------+----------+--------+---------+--------+--------+
| Samples- | 1 | 1 | 1 | 1, 3 | 1, 3, 4| 1, 3, 4|
| PerPixel | | | | | | |
+----------+---------+----------+--------+---------+--------+--------+
| Software | | {ASCII} | {ASCII}| {ASCII} | {ASCII}| {ASCII}|
+----------+---------+----------+--------+---------+--------+--------+
| Strip- | n | <n> | <n> | <n> | <n> | <n> |
| Byte- | | | | | | |
| Counts | | | | | | |
+----------+---------+----------+--------+---------+--------+--------+
| Strip- | n | <n> | <n> | <n> | <n> | <n> |
| Offsets | | | | | | |
+----------+---------+----------+--------+---------+--------+--------+
| XResolu- | 204 | 200, 204, 300 | 100, 200, 300, 400 |
| tion | 200 | 400, 408 | |
+----------+---------+----------+--------+---------+--------+--------+
| YResolu- | 98, 196 | 98, 196, 100, 200 | 100, 200, 300, 400 |
| tion | 100,200 | 300, 391, 400 | |
+----------+---------+----------+--------+---------+--------+--------+
<span class="grey">McIntyre, et. al. Standards Track [Page 71]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-72" ></span>
<span class="grey"><a href="./rfc2301">RFC 2301</a> File Format for Internet Fax March 1998</span>
Table A.2 TIFF Extension Fields
+---------------------------------------------------------+
| Fax Mode/Profile |
+---------------------------------------------------------|
| Minimal | Extended | JBIG | Lossy |Lossless| Mixed |
+----------| B&W | B&W | B&W | Color | Color | Raster |
| TIFF | | | | | | Content|
| Field | S | F | J | C | L | M |
+----------+---------+----------+--------+---------+--------+--------+
| Chroma- | | | | 1 | | 1 |
| Position-| | | | | | |
| ing | | | | | | |
+----------+---------+----------+--------+---------+--------+--------+
| Chroma- | | | | <1, 1> | | <1, 1> |
| SubSampl-| | | | <2, 2> | | <2, 2> |
| ing | | | | | | |
+----------+---------+----------+--------+---------+--------+--------+
| Document-| | {ASCII} | {ASCII}| {ASCII} | {ASCII}| {ASCII}|
| Name | | | | | | |
+----------+---------+----------+--------+---------+--------+--------+
| Indexed | | | | | 0,1 | 0,1 |
+----------+---------+----------+--------+---------+--------+--------+
| Page- | n, m | n, m | n, m | n, m | n, m | n, m |
| Number | | | | | | |
+----------+---------+----------+--------+---------+--------+--------+
| SubIFDs | | | | | | <IFD> |
+----------+---------+----------+--------+---------+--------+--------+
| T4Options| 0, 4 | 0, 1, | | | | 0, 1, |
| | | 4, 5 | | | | 4, 5 |
+----------+---------+----------+--------+---------+--------+--------+
| T6Options| | 0 | | | | 0 |
+----------+---------+----------+--------+---------+--------+--------+
| XPosition| | | | | | r |
+----------+---------+----------+--------+---------+--------+--------+
| YPosition| | | | | | r |
+----------+---------+----------+--------+---------+--------+--------+
<span class="grey">McIntyre, et. al. Standards Track [Page 72]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-73" ></span>
<span class="grey"><a href="./rfc2301">RFC 2301</a> File Format for Internet Fax March 1998</span>
Table A.3 New Fields
+---------------------------------------------------------+
| Fax Mode/Profile |
+---------------------------------------------------------|
| Minimal | Extended | JBIG | Lossy |Lossless| Mixed |
+----------| B&W | B&W | B&W | Color | Color | Raster |
| TIFF | | | | | | Content|
| Field | S | F | J | C | L | M |
+----------+---------+----------+--------+---------+--------+--------+
| BadFax- | | n | | | | |
| Lines | | | | | | |
+----------+---------+----------+--------+---------+--------+--------+
| CleanFax-| | 0, 1, 2 | | | | |
| Data | | | | | | |
+----------+---------+----------+--------+---------+--------+--------+
| Coding- | | | n | n | n | n |
| Method | | | | | | |
+----------+---------+----------+--------+---------+--------+--------+
| Consecu- | | n | | | | |
| tiveBad- | | | | | | |
| FaxLines | | | | | | |
+----------+---------+----------+--------+---------+--------+--------+
| Decode | | | | <r> | <r> | <r> |
+----------+---------+----------+--------+---------+--------+--------+
| Default- | | | | | | <n> |
|ImageColor| | | | | | |
+----------+---------+----------+--------+---------+--------+--------+
| Fax- | | | n | n | n | n |
| Profile | | | | | | |
+----------+---------+----------+--------+---------+--------+--------+
| Global- | | IFD | IFD | IFD | IFD | IFD |
| Parame- | | | | | | |
| tersIFD | | | | | | |
+----------+---------+----------+--------+---------+--------+--------+
| Image- | | | | | | n, m |
| Layer | | | | | | |
+----------+---------+----------+--------+---------+--------+--------+
| Mode- | | | | | | n |
| Number | | | | | | |
+----------+---------+----------+--------+---------+--------+--------|
| Profile- | | | n | n | n | n |
| Type | | | | | | |
+--------------------------------------------------------------------+
<span class="grey">McIntyre, et. al. Standards Track [Page 73]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-74" ></span>
<span class="grey"><a href="./rfc2301">RFC 2301</a> File Format for Internet Fax March 1998</span>
+----------+---------+----------+--------+---------+--------+--------+
| Strip- | | | | | | <n> |
| RowCounts| | | | | | |
+----------+---------+----------+--------+---------+--------+--------+
| Version- | | | | <b> |<b> | |
| Year | | | | | | |
+----------+---------+----------+--------+---------+--------+--------+
<span class="grey">McIntyre, et. al. Standards Track [Page 74]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-75" ></span>
<span class="grey"><a href="./rfc2301">RFC 2301</a> File Format for Internet Fax March 1998</span>
Annex B. IANA Registration for image/tiff Application Parameter
Values used for facsimile
To: IANA@isi.edu
Subject: Registration of new Application parameter values for
image/tiff
MIME media type name: image/tiff
Optional parameters: Application
New Value(s): faxbw, faxcolor
Description of Use:
faxbw - The "faxbw" application parameter is suitable for use by
applications that can process one or more TIFF for facsimile profiles
or subsets used for the encoding of black-and-white facsimile data.
The definition of the use of this value is contained in <a href="#section-9">Section 9</a> of
this document (TIFFPLUS).
Faxcolor - The "faxcolor" application parameter is suitable for use
by applications that can process one or more TIFF for facsimile
profiles or subsets that can be used for the encoding of black and
white, AND color facsimile data. The definition of the use of this
value is contained in <a href="#section-9">Section 9</a> of this document (TIFFPLUS).
<span class="grey">McIntyre, et. al. Standards Track [Page 75]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-76" ></span>
<span class="grey"><a href="./rfc2301">RFC 2301</a> File Format for Internet Fax March 1998</span>
Security Considerations:
Security considerations related to use of the TIFF subsets described
by the "faxbw" and "faxcolor" values of the Application parameter are
identified in <a href="#section-10">Section 10</a> of this document (TIFFPLUS).
Persons & email addresses to contact for further information:
Glenn W. Parsons (Glenn.Parsons@Nortel.ca)
James Rafferty (Jrafferty@worldnet.att.net)
Stephen Zilles (szilles@adobe.com)
Change Controller: Stephen Zilles
INFORMATION TO THE SUBMITTER:
The accepted registrations will be listed in the "Assigned Numbers"
series of RFCs. The information in the registration form is freely
distributable.
<span class="grey">McIntyre, et. al. Standards Track [Page 76]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-77" ></span>
<span class="grey"><a href="./rfc2301">RFC 2301</a> File Format for Internet Fax March 1998</span>
Full Copyright Statement
Copyright (C) The Internet Society (1998). All Rights Reserved.
This document and translations of it may be copied and furnished to
others, and derivative works that comment on or otherwise explain it
or assist in its implementation may be prepared, copied, published
and distributed, in whole or in part, without restriction of any
kind, provided that the above copyright notice and this paragraph are
included on all such copies and derivative works. However, this
document itself may not be modified in any way, such as by removing
the copyright notice or references to the Internet Society or other
Internet organizations, except as needed for the purpose of
developing Internet standards in which case the procedures for
copyrights defined in the Internet Standards process must be
followed, or as required to translate it into languages other than
English.
The limited permissions granted above are perpetual and will not be
revoked by the Internet Society or its successors or assigns.
This document and the information contained herein is provided on an
"AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
McIntyre, et. al. Standards Track [Page 77]
</pre>
|