Hash :
df9dbff8
Author :
Date :
2023-11-11T12:25:03
TurboJPEG: New param to limit virt array mem usage This corresponds to max_memory_to_use in the jpeg_memory_mgr struct in the libjpeg API, except that the TurboJPEG parameter is specified in megabytes. Because this is 2023 and computers with less than 1 MB of memory are not a thing (at least not within the scope of libjpeg-turbo support), it isn't useful to allow a limit less than 1 MB to be specified. Furthermore, because TurboJPEG parameters are signed integers, if we allowed the memory limit to be specified in bytes, then it would be impossible to specify a limit larger than 2 GB on 64-bit machines. Because max_memory_to_use is a long signed integer, effectively we can specify a limit of up to 2 petabytes on 64-bit machines if the TurboJPEG parameter is specified in megabytes. (2 PB should be enough for anybody, right?) This commit also bumps the TurboJPEG API version to 3.0.1. Since the TurboJPEG API version no longer tracks the libjpeg-turbo version, it makes sense to increment the API revision number when adding constants, to increment the minor version number when adding functions, and to increment the major version number for a complete overhaul. This commit also removes the vestigial TJ_NUMPARAM macro, which was never defined because it proved unnecessary. Partially implements #735
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
<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc -->
<title>TJ</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../jquery/jquery-ui.min.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../jquery-ui.overrides.css" title="Style">
<script type="text/javascript" src="../../../script.js"></script>
<script type="text/javascript" src="../../../jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../jquery/jquery-3.6.1.min.js"></script>
<script type="text/javascript" src="../../../jquery/jquery-ui.min.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="TJ";
}
}
catch(err) {
}
//-->
var data = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9,"i8":9,"i9":9,"i10":9,"i11":9,"i12":9};
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var pathtoroot = "../../../";
var useModuleDirectories = true;
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<div class="fixedNav">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a id="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../allclasses.html">All Classes</a></li>
</ul>
<ul class="navListSearch">
<li><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li><a href="#field.summary">Field</a> | </li>
<li>Constr | </li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li><a href="#field.detail">Field</a> | </li>
<li>Constr | </li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding"> </div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
</nav>
</header>
<!-- ======== START OF CLASS DATA ======== -->
<main role="main">
<div class="header">
<div class="subTitle"><span class="packageLabelInType">Package</span> <a href="package-summary.html">org.libjpegturbo.turbojpeg</a></div>
<h2 title="Class TJ" class="title">Class TJ</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>org.libjpegturbo.turbojpeg.TJ</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<pre>public final class <span class="typeNameLabel">TJ</span>
extends java.lang.Object</pre>
<div class="block">TurboJPEG utility class (cannot be instantiated)</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<section>
<ul class="blockList">
<li class="blockList"><a id="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary">
<caption><span>Fields</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Field</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#CS_CMYK">CS_CMYK</a></span></code></th>
<td class="colLast">
<div class="block">CMYK colorspace.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#CS_GRAY">CS_GRAY</a></span></code></th>
<td class="colLast">
<div class="block">Grayscale colorspace.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#CS_RGB">CS_RGB</a></span></code></th>
<td class="colLast">
<div class="block">RGB colorspace.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#CS_YCbCr">CS_YCbCr</a></span></code></th>
<td class="colLast">
<div class="block">YCbCr colorspace.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#CS_YCCK">CS_YCCK</a></span></code></th>
<td class="colLast">
<div class="block">YCCK colorspace.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ERR_FATAL">ERR_FATAL</a></span></code></th>
<td class="colLast">
<div class="block">The error was fatal and non-recoverable.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ERR_WARNING">ERR_WARNING</a></span></code></th>
<td class="colLast">
<div class="block">The error was non-fatal and recoverable, but the destination image may
still be corrupt.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#FLAG_ACCURATEDCT">FLAG_ACCURATEDCT</a></span></code></th>
<td class="colLast">
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">Use <a href="#PARAM_FASTDCT"><code>PARAM_FASTDCT</code></a> instead.</div>
</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#FLAG_BOTTOMUP">FLAG_BOTTOMUP</a></span></code></th>
<td class="colLast">
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">Use <a href="#PARAM_BOTTOMUP"><code>PARAM_BOTTOMUP</code></a> instead.</div>
</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#FLAG_FASTDCT">FLAG_FASTDCT</a></span></code></th>
<td class="colLast">
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">Use <a href="#PARAM_FASTDCT"><code>PARAM_FASTDCT</code></a> instead.</div>
</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#FLAG_FASTUPSAMPLE">FLAG_FASTUPSAMPLE</a></span></code></th>
<td class="colLast">
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">Use <a href="#PARAM_FASTUPSAMPLE"><code>PARAM_FASTUPSAMPLE</code></a> instead.</div>
</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#FLAG_LIMITSCANS">FLAG_LIMITSCANS</a></span></code></th>
<td class="colLast">
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">Use <a href="#PARAM_SCANLIMIT"><code>PARAM_SCANLIMIT</code></a> instead.</div>
</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#FLAG_PROGRESSIVE">FLAG_PROGRESSIVE</a></span></code></th>
<td class="colLast">
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">Use <a href="#PARAM_PROGRESSIVE"><code>PARAM_PROGRESSIVE</code></a> instead.</div>
</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#FLAG_STOPONWARNING">FLAG_STOPONWARNING</a></span></code></th>
<td class="colLast">
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">Use <a href="#PARAM_STOPONWARNING"><code>PARAM_STOPONWARNING</code></a> instead.</div>
</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#NUMCS">NUMCS</a></span></code></th>
<td class="colLast">
<div class="block">The number of JPEG colorspaces</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#NUMERR">NUMERR</a></span></code></th>
<td class="colLast">
<div class="block">The number of error codes</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#NUMPF">NUMPF</a></span></code></th>
<td class="colLast">
<div class="block">The number of pixel formats</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#NUMSAMP">NUMSAMP</a></span></code></th>
<td class="colLast">
<div class="block">The number of chrominance subsampling options</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PARAM_ARITHMETIC">PARAM_ARITHMETIC</a></span></code></th>
<td class="colLast">
<div class="block">Arithmetic entropy coding</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PARAM_BOTTOMUP">PARAM_BOTTOMUP</a></span></code></th>
<td class="colLast">
<div class="block">Row order in packed-pixel source/destination images</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PARAM_COLORSPACE">PARAM_COLORSPACE</a></span></code></th>
<td class="colLast">
<div class="block">JPEG colorspace</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PARAM_DENSITYUNITS">PARAM_DENSITYUNITS</a></span></code></th>
<td class="colLast">
<div class="block">JPEG pixel density units</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PARAM_FASTDCT">PARAM_FASTDCT</a></span></code></th>
<td class="colLast">
<div class="block">DCT/IDCT algorithm [lossy compression and decompression]</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PARAM_FASTUPSAMPLE">PARAM_FASTUPSAMPLE</a></span></code></th>
<td class="colLast">
<div class="block">Chrominance upsampling algorithm [lossy decompression only]</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PARAM_JPEGHEIGHT">PARAM_JPEGHEIGHT</a></span></code></th>
<td class="colLast">
<div class="block">JPEG height (in pixels) [decompression only, read-only]</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PARAM_JPEGWIDTH">PARAM_JPEGWIDTH</a></span></code></th>
<td class="colLast">
<div class="block">JPEG width (in pixels) [decompression only, read-only]</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PARAM_LOSSLESS">PARAM_LOSSLESS</a></span></code></th>
<td class="colLast">
<div class="block">Lossless JPEG</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PARAM_LOSSLESSPSV">PARAM_LOSSLESSPSV</a></span></code></th>
<td class="colLast">
<div class="block">Lossless JPEG predictor selection value (PSV)</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PARAM_LOSSLESSPT">PARAM_LOSSLESSPT</a></span></code></th>
<td class="colLast">
<div class="block">Lossless JPEG point transform (Pt)</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PARAM_MAXMEMORY">PARAM_MAXMEMORY</a></span></code></th>
<td class="colLast">
<div class="block">Memory limit for intermediate buffers</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PARAM_OPTIMIZE">PARAM_OPTIMIZE</a></span></code></th>
<td class="colLast">
<div class="block">Optimized baseline entropy coding [lossy compression only]</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PARAM_PRECISION">PARAM_PRECISION</a></span></code></th>
<td class="colLast">
<div class="block">JPEG data precision (bits per sample) [decompression only, read-only]</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PARAM_PROGRESSIVE">PARAM_PROGRESSIVE</a></span></code></th>
<td class="colLast">
<div class="block">Progressive entropy coding</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PARAM_QUALITY">PARAM_QUALITY</a></span></code></th>
<td class="colLast">
<div class="block">Perceptual quality of lossy JPEG images [compression only]</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PARAM_RESTARTBLOCKS">PARAM_RESTARTBLOCKS</a></span></code></th>
<td class="colLast">
<div class="block">JPEG restart marker interval in MCU blocks (lossy) or samples (lossless)
[compression only]</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PARAM_RESTARTROWS">PARAM_RESTARTROWS</a></span></code></th>
<td class="colLast">
<div class="block">JPEG restart marker interval in MCU rows (lossy) or sample rows (lossless)
[compression only]</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PARAM_SCANLIMIT">PARAM_SCANLIMIT</a></span></code></th>
<td class="colLast">
<div class="block">Progressive JPEG scan limit for lossy JPEG images [decompression, lossless
transformation]</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PARAM_STOPONWARNING">PARAM_STOPONWARNING</a></span></code></th>
<td class="colLast">
<div class="block">Error handling behavior</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PARAM_SUBSAMP">PARAM_SUBSAMP</a></span></code></th>
<td class="colLast">
<div class="block">Chrominance subsampling level</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PARAM_XDENSITY">PARAM_XDENSITY</a></span></code></th>
<td class="colLast">
<div class="block">JPEG horizontal pixel density</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PARAM_YDENSITY">PARAM_YDENSITY</a></span></code></th>
<td class="colLast">
<div class="block">JPEG vertical pixel density</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PF_ABGR">PF_ABGR</a></span></code></th>
<td class="colLast">
<div class="block">ABGR pixel format.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PF_ARGB">PF_ARGB</a></span></code></th>
<td class="colLast">
<div class="block">ARGB pixel format.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PF_BGR">PF_BGR</a></span></code></th>
<td class="colLast">
<div class="block">BGR pixel format.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PF_BGRA">PF_BGRA</a></span></code></th>
<td class="colLast">
<div class="block">BGRA pixel format.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PF_BGRX">PF_BGRX</a></span></code></th>
<td class="colLast">
<div class="block">BGRX pixel format.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PF_CMYK">PF_CMYK</a></span></code></th>
<td class="colLast">
<div class="block">CMYK pixel format.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PF_GRAY">PF_GRAY</a></span></code></th>
<td class="colLast">
<div class="block">Grayscale pixel format.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PF_RGB">PF_RGB</a></span></code></th>
<td class="colLast">
<div class="block">RGB pixel format.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PF_RGBA">PF_RGBA</a></span></code></th>
<td class="colLast">
<div class="block">RGBA pixel format.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PF_RGBX">PF_RGBX</a></span></code></th>
<td class="colLast">
<div class="block">RGBX pixel format.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PF_XBGR">PF_XBGR</a></span></code></th>
<td class="colLast">
<div class="block">XBGR pixel format.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PF_XRGB">PF_XRGB</a></span></code></th>
<td class="colLast">
<div class="block">XRGB pixel format.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#SAMP_411">SAMP_411</a></span></code></th>
<td class="colLast">
<div class="block">4:1:1 chrominance subsampling.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#SAMP_420">SAMP_420</a></span></code></th>
<td class="colLast">
<div class="block">4:2:0 chrominance subsampling.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#SAMP_422">SAMP_422</a></span></code></th>
<td class="colLast">
<div class="block">4:2:2 chrominance subsampling.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#SAMP_440">SAMP_440</a></span></code></th>
<td class="colLast">
<div class="block">4:4:0 chrominance subsampling.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#SAMP_441">SAMP_441</a></span></code></th>
<td class="colLast">
<div class="block">4:4:1 chrominance subsampling.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#SAMP_444">SAMP_444</a></span></code></th>
<td class="colLast">
<div class="block">4:4:4 chrominance subsampling (no chrominance subsampling).</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#SAMP_GRAY">SAMP_GRAY</a></span></code></th>
<td class="colLast">
<div class="block">Grayscale.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#SAMP_UNKNOWN">SAMP_UNKNOWN</a></span></code></th>
<td class="colLast">
<div class="block">Unknown subsampling.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static java.awt.Rectangle</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#UNCROPPED">UNCROPPED</a></span></code></th>
<td class="colLast">
<div class="block">A <code>java.awt.Rectangle</code> instance that specifies no cropping</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg">TJScalingFactor</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#UNSCALED">UNSCALED</a></span></code></th>
<td class="colLast">
<div class="block">A <a href="TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg"><code>TJScalingFactor</code></a> instance that specifies a scaling factor of 1/1
(no scaling)</div>
</td>
</tr>
</table>
</li>
</ul>
</section>
<!-- ========== METHOD SUMMARY =========== -->
<section>
<ul class="blockList">
<li class="blockList"><a id="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#bufSize(int,int,int)">bufSize</a></span>​(int width,
int height,
int jpegSubsamp)</code></th>
<td class="colLast">
<div class="block">Returns the maximum size of the buffer (in bytes) required to hold a JPEG
image with the given width, height, and level of chrominance subsampling.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#bufSizeYUV(int,int,int,int)">bufSizeYUV</a></span>​(int width,
int align,
int height,
int subsamp)</code></th>
<td class="colLast">
<div class="block">Returns the size of the buffer (in bytes) required to hold a unified
planar YUV image with the given width, height, and level of chrominance
subsampling.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getAlphaOffset(int)">getAlphaOffset</a></span>​(int pixelFormat)</code></th>
<td class="colLast">
<div class="block">For the given pixel format, returns the number of samples that the alpha
component is offset from the start of the pixel.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getBlueOffset(int)">getBlueOffset</a></span>​(int pixelFormat)</code></th>
<td class="colLast">
<div class="block">For the given pixel format, returns the number of samples that the blue
component is offset from the start of the pixel.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getGreenOffset(int)">getGreenOffset</a></span>​(int pixelFormat)</code></th>
<td class="colLast">
<div class="block">For the given pixel format, returns the number of samples that the green
component is offset from the start of the pixel.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getMCUHeight(int)">getMCUHeight</a></span>​(int subsamp)</code></th>
<td class="colLast">
<div class="block">Returns the MCU block height for the given level of chrominance
subsampling.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getMCUWidth(int)">getMCUWidth</a></span>​(int subsamp)</code></th>
<td class="colLast">
<div class="block">Returns the MCU block width for the given level of chrominance
subsampling.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getPixelSize(int)">getPixelSize</a></span>​(int pixelFormat)</code></th>
<td class="colLast">
<div class="block">Returns the pixel size (in samples) for the given pixel format.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getRedOffset(int)">getRedOffset</a></span>​(int pixelFormat)</code></th>
<td class="colLast">
<div class="block">For the given pixel format, returns the number of samples that the red
component is offset from the start of the pixel.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>static <a href="TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg">TJScalingFactor</a>[]</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getScalingFactors()">getScalingFactors</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns a list of fractional scaling factors that the JPEG decompressor
supports.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#planeHeight(int,int,int)">planeHeight</a></span>​(int componentID,
int height,
int subsamp)</code></th>
<td class="colLast">
<div class="block">Returns the plane height of a YUV image plane with the given parameters.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#planeSizeYUV(int,int,int,int,int)">planeSizeYUV</a></span>​(int componentID,
int width,
int stride,
int height,
int subsamp)</code></th>
<td class="colLast">
<div class="block">Returns the size of the buffer (in bytes) required to hold a YUV image
plane with the given parameters.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#planeWidth(int,int,int)">planeWidth</a></span>​(int componentID,
int width,
int subsamp)</code></th>
<td class="colLast">
<div class="block">Returns the plane width of a YUV image plane with the given parameters.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class java.lang.Object</h3>
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<section>
<ul class="blockList">
<li class="blockList"><a id="field.detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a id="NUMSAMP">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>NUMSAMP</h4>
<pre>public static final int NUMSAMP</pre>
<div class="block">The number of chrominance subsampling options</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.NUMSAMP">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="SAMP_444">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>SAMP_444</h4>
<pre>public static final int SAMP_444</pre>
<div class="block">4:4:4 chrominance subsampling (no chrominance subsampling). The JPEG
or YUV image will contain one chrominance component for every pixel in the
source image.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.SAMP_444">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="SAMP_422">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>SAMP_422</h4>
<pre>public static final int SAMP_422</pre>
<div class="block">4:2:2 chrominance subsampling. The JPEG or YUV image will contain one
chrominance component for every 2x1 block of pixels in the source image.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.SAMP_422">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="SAMP_420">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>SAMP_420</h4>
<pre>public static final int SAMP_420</pre>
<div class="block">4:2:0 chrominance subsampling. The JPEG or YUV image will contain one
chrominance component for every 2x2 block of pixels in the source image.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.SAMP_420">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="SAMP_GRAY">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>SAMP_GRAY</h4>
<pre>public static final int SAMP_GRAY</pre>
<div class="block">Grayscale. The JPEG or YUV image will contain no chrominance components.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.SAMP_GRAY">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="SAMP_440">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>SAMP_440</h4>
<pre>public static final int SAMP_440</pre>
<div class="block">4:4:0 chrominance subsampling. The JPEG or YUV image will contain one
chrominance component for every 1x2 block of pixels in the source image.
Note that 4:4:0 subsampling is not fully accelerated in libjpeg-turbo.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.SAMP_440">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="SAMP_411">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>SAMP_411</h4>
<pre>public static final int SAMP_411</pre>
<div class="block">4:1:1 chrominance subsampling. The JPEG or YUV image will contain one
chrominance component for every 4x1 block of pixels in the source image.
JPEG images compressed with 4:1:1 subsampling will be almost exactly the
same size as those compressed with 4:2:0 subsampling, and in the
aggregate, both subsampling methods produce approximately the same
perceptual quality. However, 4:1:1 is better able to reproduce sharp
horizontal features. Note that 4:1:1 subsampling is not fully accelerated
in libjpeg-turbo.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.SAMP_411">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="SAMP_441">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>SAMP_441</h4>
<pre>public static final int SAMP_441</pre>
<div class="block">4:4:1 chrominance subsampling. The JPEG or YUV image will contain one
chrominance component for every 1x4 block of pixels in the source image.
JPEG images compressed with 4:4:1 subsampling will be almost exactly the
same size as those compressed with 4:2:0 subsampling, and in the
aggregate, both subsampling methods produce approximately the same
perceptual quality. However, 4:4:1 is better able to reproduce sharp
vertical features. Note that 4:4:1 subsampling is not fully accelerated
in libjpeg-turbo.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.SAMP_441">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="SAMP_UNKNOWN">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>SAMP_UNKNOWN</h4>
<pre>public static final int SAMP_UNKNOWN</pre>
<div class="block">Unknown subsampling. The JPEG image uses an unusual type of chrominance
subsampling. Such images can be decompressed into packed-pixel images,
but they cannot be
<ul>
<li> decompressed into planar YUV images,
<li> losslessly transformed if <a href="TJTransform.html#OPT_CROP"><code>TJTransform.OPT_CROP</code></a> is specified,
or
<li> partially decompressed using a cropping region.
</ul></div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.SAMP_UNKNOWN">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="NUMPF">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>NUMPF</h4>
<pre>public static final int NUMPF</pre>
<div class="block">The number of pixel formats</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.NUMPF">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="PF_RGB">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>PF_RGB</h4>
<pre>public static final int PF_RGB</pre>
<div class="block">RGB pixel format. The red, green, and blue components in the image are
stored in 3-sample pixels in the order R, G, B from lowest to highest
memory address within each pixel.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PF_RGB">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="PF_BGR">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>PF_BGR</h4>
<pre>public static final int PF_BGR</pre>
<div class="block">BGR pixel format. The red, green, and blue components in the image are
stored in 3-sample pixels in the order B, G, R from lowest to highest
memory address within each pixel.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PF_BGR">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="PF_RGBX">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>PF_RGBX</h4>
<pre>public static final int PF_RGBX</pre>
<div class="block">RGBX pixel format. The red, green, and blue components in the image are
stored in 4-sample pixels in the order R, G, B from lowest to highest
memory address within each pixel. The X component is ignored when
compressing and undefined when decompressing.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PF_RGBX">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="PF_BGRX">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>PF_BGRX</h4>
<pre>public static final int PF_BGRX</pre>
<div class="block">BGRX pixel format. The red, green, and blue components in the image are
stored in 4-sample pixels in the order B, G, R from lowest to highest
memory address within each pixel. The X component is ignored when
compressing and undefined when decompressing.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PF_BGRX">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="PF_XBGR">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>PF_XBGR</h4>
<pre>public static final int PF_XBGR</pre>
<div class="block">XBGR pixel format. The red, green, and blue components in the image are
stored in 4-sample pixels in the order R, G, B from highest to lowest
memory address within each pixel. The X component is ignored when
compressing and undefined when decompressing.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PF_XBGR">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="PF_XRGB">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>PF_XRGB</h4>
<pre>public static final int PF_XRGB</pre>
<div class="block">XRGB pixel format. The red, green, and blue components in the image are
stored in 4-sample pixels in the order B, G, R from highest to lowest
memory address within each pixel. The X component is ignored when
compressing and undefined when decompressing.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PF_XRGB">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="PF_GRAY">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>PF_GRAY</h4>
<pre>public static final int PF_GRAY</pre>
<div class="block">Grayscale pixel format. Each 1-sample pixel represents a luminance
(brightness) level from 0 to the maximum sample value (255 for 8-bit
samples, 4095 for 12-bit samples, and 65535 for 16-bit samples.)</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PF_GRAY">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="PF_RGBA">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>PF_RGBA</h4>
<pre>public static final int PF_RGBA</pre>
<div class="block">RGBA pixel format. This is the same as <a href="#PF_RGBX"><code>PF_RGBX</code></a>, except that when
decompressing, the X component is guaranteed to be equal to the maximum
sample value, which can be interpreted as an opaque alpha channel.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PF_RGBA">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="PF_BGRA">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>PF_BGRA</h4>
<pre>public static final int PF_BGRA</pre>
<div class="block">BGRA pixel format. This is the same as <a href="#PF_BGRX"><code>PF_BGRX</code></a>, except that when
decompressing, the X component is guaranteed to be equal to the maximum
sample value, which can be interpreted as an opaque alpha channel.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PF_BGRA">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="PF_ABGR">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>PF_ABGR</h4>
<pre>public static final int PF_ABGR</pre>
<div class="block">ABGR pixel format. This is the same as <a href="#PF_XBGR"><code>PF_XBGR</code></a>, except that when
decompressing, the X component is guaranteed to be equal to the maximum
sample value, which can be interpreted as an opaque alpha channel.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PF_ABGR">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="PF_ARGB">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>PF_ARGB</h4>
<pre>public static final int PF_ARGB</pre>
<div class="block">ARGB pixel format. This is the same as <a href="#PF_XRGB"><code>PF_XRGB</code></a>, except that when
decompressing, the X component is guaranteed to be equal to the maximum
sample value, which can be interpreted as an opaque alpha channel.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PF_ARGB">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="PF_CMYK">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>PF_CMYK</h4>
<pre>public static final int PF_CMYK</pre>
<div class="block">CMYK pixel format. Unlike RGB, which is an additive color model used
primarily for display, CMYK (Cyan/Magenta/Yellow/Key) is a subtractive
color model used primarily for printing. In the CMYK color model, the
value of each color component typically corresponds to an amount of cyan,
magenta, yellow, or black ink that is applied to a white background. In
order to convert between CMYK and RGB, it is necessary to use a color
management system (CMS.) A CMS will attempt to map colors within the
printer's gamut to perceptually similar colors in the display's gamut and
vice versa, but the mapping is typically not 1:1 or reversible, nor can it
be defined with a simple formula. Thus, such a conversion is out of scope
for a codec library. However, the TurboJPEG API allows for compressing
packed-pixel CMYK images into YCCK JPEG images (see <a href="#CS_YCCK"><code>CS_YCCK</code></a>) and
decompressing YCCK JPEG images into packed-pixel CMYK images.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PF_CMYK">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="NUMCS">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>NUMCS</h4>
<pre>public static final int NUMCS</pre>
<div class="block">The number of JPEG colorspaces</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.NUMCS">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="CS_RGB">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>CS_RGB</h4>
<pre>public static final int CS_RGB</pre>
<div class="block">RGB colorspace. When compressing the JPEG image, the R, G, and B
components in the source image are reordered into image planes, but no
colorspace conversion or subsampling is performed. RGB JPEG images can be
compressed from and decompressed to packed-pixel images with any of the
extended RGB or grayscale pixel formats, but they cannot be compressed
from or decompressed to planar YUV images.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.CS_RGB">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="CS_YCbCr">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>CS_YCbCr</h4>
<pre>public static final int CS_YCbCr</pre>
<div class="block">YCbCr colorspace. YCbCr is not an absolute colorspace but rather a
mathematical transformation of RGB designed solely for storage and
transmission. YCbCr images must be converted to RGB before they can
actually be displayed. In the YCbCr colorspace, the Y (luminance)
component represents the black & white portion of the original image,
and the Cb and Cr (chrominance) components represent the color portion of
the original image. Originally, the analog equivalent of this
transformation allowed the same signal to drive both black & white and
color televisions, but JPEG images use YCbCr primarily because it allows
the color data to be optionally subsampled for the purposes of reducing
network or disk usage. YCbCr is the most common JPEG colorspace, and
YCbCr JPEG images can be compressed from and decompressed to packed-pixel
images with any of the extended RGB or grayscale pixel formats. YCbCr
JPEG images can also be compressed from and decompressed to planar YUV
images.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.CS_YCbCr">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="CS_GRAY">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>CS_GRAY</h4>
<pre>public static final int CS_GRAY</pre>
<div class="block">Grayscale colorspace. The JPEG image retains only the luminance data (Y
component), and any color data from the source image is discarded.
Grayscale JPEG images can be compressed from and decompressed to
packed-pixel images with any of the extended RGB or grayscale pixel
formats, or they can be compressed from and decompressed to planar YUV
images.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.CS_GRAY">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="CS_CMYK">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>CS_CMYK</h4>
<pre>public static final int CS_CMYK</pre>
<div class="block">CMYK colorspace. When compressing the JPEG image, the C, M, Y, and K
components in the source image are reordered into image planes, but no
colorspace conversion or subsampling is performed. CMYK JPEG images can
only be compressed from and decompressed to packed-pixel images with the
CMYK pixel format.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.CS_CMYK">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="CS_YCCK">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>CS_YCCK</h4>
<pre>public static final int CS_YCCK</pre>
<div class="block">YCCK colorspace. YCCK (AKA "YCbCrK") is not an absolute colorspace but
rather a mathematical transformation of CMYK designed solely for storage
and transmission. It is to CMYK as YCbCr is to RGB. CMYK pixels can be
reversibly transformed into YCCK, and as with YCbCr, the chrominance
components in the YCCK pixels can be subsampled without incurring major
perceptual loss. YCCK JPEG images can only be compressed from and
decompressed to packed-pixel images with the CMYK pixel format.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.CS_YCCK">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="PARAM_STOPONWARNING">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>PARAM_STOPONWARNING</h4>
<pre>public static final int PARAM_STOPONWARNING</pre>
<div class="block">Error handling behavior
<p><b>Value</b>
<ul>
<li> <code>0</code> <i>[default]</i> Allow the current
compression/decompression/transform operation to complete unless a fatal
error is encountered.
<li> <code>1</code> Immediately discontinue the current
compression/decompression/transform operation if a warning (non-fatal
error) occurs.
</ul></div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PARAM_STOPONWARNING">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="PARAM_BOTTOMUP">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>PARAM_BOTTOMUP</h4>
<pre>public static final int PARAM_BOTTOMUP</pre>
<div class="block">Row order in packed-pixel source/destination images
<p><b>Value</b>
<ul>
<li> <code>0</code> <i>[default]</i> top-down (X11) order
<li> <code>1</code> bottom-up (Windows, OpenGL) order
</ul></div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PARAM_BOTTOMUP">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="PARAM_QUALITY">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>PARAM_QUALITY</h4>
<pre>public static final int PARAM_QUALITY</pre>
<div class="block">Perceptual quality of lossy JPEG images [compression only]
<p><b>Value</b>
<ul>
<li> <code>1</code>-<code>100</code> (<code>1</code> = worst quality but
best compression, <code>100</code> = best quality but worst compression)
<i>[no default; must be explicitly specified]</i>
</ul></div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PARAM_QUALITY">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="PARAM_SUBSAMP">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>PARAM_SUBSAMP</h4>
<pre>public static final int PARAM_SUBSAMP</pre>
<div class="block">Chrominance subsampling level
<p>The JPEG or YUV image uses (decompression, decoding) or will use (lossy
compression, encoding) the specified level of chrominance subsampling.
<p>When pixels are converted from RGB to YCbCr (see <a href="#CS_YCbCr"><code>CS_YCbCr</code></a>) or
from CMYK to YCCK (see <a href="#CS_YCCK"><code>CS_YCCK</code></a>) as part of the JPEG compression
process, some of the Cb and Cr (chrominance) components can be discarded
or averaged together to produce a smaller image with little perceptible
loss of image clarity. (The human eye is more sensitive to small changes
in brightness than to small changes in color.) This is called
"chrominance subsampling".
<p><b>Value</b>
<ul>
<li> One of <a href="#SAMP_444"><code>TJ.SAMP_*</code></a> <i>[no default; must be
explicitly specified for lossy compression, encoding, and decoding]</i>
</ul></div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PARAM_SUBSAMP">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="PARAM_JPEGWIDTH">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>PARAM_JPEGWIDTH</h4>
<pre>public static final int PARAM_JPEGWIDTH</pre>
<div class="block">JPEG width (in pixels) [decompression only, read-only]</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PARAM_JPEGWIDTH">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="PARAM_JPEGHEIGHT">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>PARAM_JPEGHEIGHT</h4>
<pre>public static final int PARAM_JPEGHEIGHT</pre>
<div class="block">JPEG height (in pixels) [decompression only, read-only]</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PARAM_JPEGHEIGHT">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="PARAM_PRECISION">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>PARAM_PRECISION</h4>
<pre>public static final int PARAM_PRECISION</pre>
<div class="block">JPEG data precision (bits per sample) [decompression only, read-only]
<p>The JPEG image uses the specified number of bits per sample.
<p><b>Value</b>
<ul>
<li> <code>8</code>, <code>12</code>, or <code>16</code>
</ul>
<p>12-bit data precision implies <a href="#PARAM_OPTIMIZE"><code>PARAM_OPTIMIZE</code></a> unless
<a href="#PARAM_ARITHMETIC"><code>PARAM_ARITHMETIC</code></a> is set.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PARAM_PRECISION">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="PARAM_COLORSPACE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>PARAM_COLORSPACE</h4>
<pre>public static final int PARAM_COLORSPACE</pre>
<div class="block">JPEG colorspace
<p>The JPEG image uses (decompression) or will use (lossy compression) the
specified colorspace.
<p><b>Value</b>
<ul>
<li> One of <a href="#CS_RGB"><code>TJ.CS_*</code></a> <i>[default for lossy compression:
automatically selected based on the subsampling level and pixel
format]</i>
</ul></div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PARAM_COLORSPACE">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="PARAM_FASTUPSAMPLE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>PARAM_FASTUPSAMPLE</h4>
<pre>public static final int PARAM_FASTUPSAMPLE</pre>
<div class="block">Chrominance upsampling algorithm [lossy decompression only]
<p><b>Value</b>
<ul>
<li> <code>0</code> <i>[default]</i> Use smooth upsampling when
decompressing a JPEG image that was compressed using chrominance
subsampling. This creates a smooth transition between neighboring
chrominance components in order to reduce upsampling artifacts in the
decompressed image.
<li> <code>1</code> Use the fastest chrominance upsampling algorithm
available, which may combine upsampling with color conversion.
</ul></div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PARAM_FASTUPSAMPLE">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="PARAM_FASTDCT">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>PARAM_FASTDCT</h4>
<pre>public static final int PARAM_FASTDCT</pre>
<div class="block">DCT/IDCT algorithm [lossy compression and decompression]
<p><b>Value</b>
<ul>
<li> <code>0</code> <i>[default]</i> Use the most accurate DCT/IDCT
algorithm available.
<li> <code>1</code> Use the fastest DCT/IDCT algorithm available.
</ul>
<p>This parameter is provided mainly for backward compatibility with
libjpeg, which historically implemented several different DCT/IDCT
algorithms because of performance limitations with 1990s CPUs. In the
libjpeg-turbo implementation of the TurboJPEG API:
<ul>
<li> The "fast" and "accurate" DCT/IDCT algorithms perform similarly on
modern x86/x86-64 CPUs that support AVX2 instructions.
<li> The "fast" algorithm is generally only about 5-15% faster than the
"accurate" algorithm on other types of CPUs.
<li> The difference in accuracy between the "fast" and "accurate"
algorithms is the most pronounced at JPEG quality levels above 90 and
tends to be more pronounced with decompression than with compression.
<li> The "fast" algorithm degrades and is not fully accelerated for JPEG
quality levels above 97, so it will be slower than the "accurate"
algorithm.
</ul></div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PARAM_FASTDCT">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="PARAM_OPTIMIZE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>PARAM_OPTIMIZE</h4>
<pre>public static final int PARAM_OPTIMIZE</pre>
<div class="block">Optimized baseline entropy coding [lossy compression only]
<p><b>Value</b>
<ul>
<li> <code>0</code> <i>[default]</i> The JPEG image will use the default
Huffman tables.
<li> <code>1</code> Optimal Huffman tables will be computed for the JPEG
image. For lossless transformation, this can also be specified using
<a href="TJTransform.html#OPT_OPTIMIZE"><code>TJTransform.OPT_OPTIMIZE</code></a>.
</ul>
<p>Optimized baseline entropy coding will improve compression slightly
(generally 5% or less), but it will reduce compression performance
considerably.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PARAM_OPTIMIZE">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="PARAM_PROGRESSIVE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>PARAM_PROGRESSIVE</h4>
<pre>public static final int PARAM_PROGRESSIVE</pre>
<div class="block">Progressive entropy coding
<p><b>Value</b>
<ul>
<li> <code>0</code> <i>[default for compression, lossless
transformation]</i> The lossy JPEG image uses (decompression) or will use
(compression, lossless transformation) baseline entropy coding.
<li> <code>1</code> The lossy JPEG image uses (decompression) or will use
(compression, lossless transformation) progressive entropy coding. For
lossless transformation, this can also be specified using
<a href="TJTransform.html#OPT_PROGRESSIVE"><code>TJTransform.OPT_PROGRESSIVE</code></a>.
</ul>
<p>Progressive entropy coding will generally improve compression relative
to baseline entropy coding, but it will reduce compression and
decompression performance considerably. Can be combined with
<a href="#PARAM_ARITHMETIC"><code>PARAM_ARITHMETIC</code></a>. Implies <a href="#PARAM_OPTIMIZE"><code>PARAM_OPTIMIZE</code></a> unless
<a href="#PARAM_ARITHMETIC"><code>PARAM_ARITHMETIC</code></a> is also set.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PARAM_PROGRESSIVE">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="PARAM_SCANLIMIT">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>PARAM_SCANLIMIT</h4>
<pre>public static final int PARAM_SCANLIMIT</pre>
<div class="block">Progressive JPEG scan limit for lossy JPEG images [decompression, lossless
transformation]
<p>Setting this parameter will cause the decompression and transform
functions to return an error if the number of scans in a progressive JPEG
image exceeds the specified limit. The primary purpose of this is to
allow security-critical applications to guard against an exploit of the
progressive JPEG format described in
<a href="https://libjpeg-turbo.org/pmwiki/uploads/About/TwoIssueswiththeJPEGStandard.pdf" target="_blank">this report</a>.
<p><b>Value</b>
<ul>
<li> maximum number of progressive JPEG scans that the decompression and
transform functions will process <i>[default: <code>0</code> (no
limit)]</i>
</ul></div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#PARAM_PROGRESSIVE"><code>PARAM_PROGRESSIVE</code></a>,
<a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PARAM_SCANLIMIT">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="PARAM_ARITHMETIC">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>PARAM_ARITHMETIC</h4>
<pre>public static final int PARAM_ARITHMETIC</pre>
<div class="block">Arithmetic entropy coding
<p><b>Value</b>
<ul>
<li> <code>0</code> <i>[default for compression, lossless
transformation]</i> The lossy JPEG image uses (decompression) or will use
(compression, lossless transformation) Huffman entropy coding.
<li> <code>1</code> The lossy JPEG image uses (decompression) or will use
(compression, lossless transformation) arithmetic entropy coding. For
lossless transformation, this can also be specified using
<a href="TJTransform.html#OPT_ARITHMETIC"><code>TJTransform.OPT_ARITHMETIC</code></a>.
</ul>
<p>Arithmetic entropy coding will generally improve compression relative
to Huffman entropy coding, but it will reduce compression and
decompression performance considerably. Can be combined with
<a href="#PARAM_PROGRESSIVE"><code>PARAM_PROGRESSIVE</code></a>.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PARAM_ARITHMETIC">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="PARAM_LOSSLESS">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>PARAM_LOSSLESS</h4>
<pre>public static final int PARAM_LOSSLESS</pre>
<div class="block">Lossless JPEG
<p><b>Value</b>
<ul>
<li> <code>0</code> <i>[default for compression]</i> The JPEG image is
(decompression) or will be (compression) lossy/DCT-based.
<li> <code>1</code> The JPEG image is (decompression) or will be
(compression) lossless/predictive.
</ul>
<p>In most cases, compressing and decompressing lossless JPEG images is
considerably slower than compressing and decompressing lossy JPEG images.
Also note that the following features are not available with lossless JPEG
images:
<ul>
<li> Colorspace conversion (lossless JPEG images always use
<a href="#CS_RGB"><code>CS_RGB</code></a>, <a href="#CS_GRAY"><code>CS_GRAY</code></a>, or <a href="#CS_CMYK"><code>CS_CMYK</code></a>, depending on the
pixel format of the source image)
<li> Chrominance subsampling (lossless JPEG images always use
<a href="#SAMP_444"><code>SAMP_444</code></a>)
<li> JPEG quality selection
<li> DCT/IDCT algorithm selection
<li> Progressive entropy coding
<li> Arithmetic entropy coding
<li> Compression from/decompression to planar YUV images
<li> Decompression scaling
<li> Lossless transformation
</ul></div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#PARAM_LOSSLESSPSV"><code>PARAM_LOSSLESSPSV</code></a>,
<a href="#PARAM_LOSSLESSPT"><code>PARAM_LOSSLESSPT</code></a>,
<a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PARAM_LOSSLESS">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="PARAM_LOSSLESSPSV">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>PARAM_LOSSLESSPSV</h4>
<pre>public static final int PARAM_LOSSLESSPSV</pre>
<div class="block">Lossless JPEG predictor selection value (PSV)
<p><b>Value</b>
<ul>
<li> <code>1</code>-<code>7</code> <i>[default for compression:
<code>1</code>]</i>
</ul></div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#PARAM_LOSSLESS"><code>PARAM_LOSSLESS</code></a>,
<a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PARAM_LOSSLESSPSV">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="PARAM_LOSSLESSPT">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>PARAM_LOSSLESSPT</h4>
<pre>public static final int PARAM_LOSSLESSPT</pre>
<div class="block">Lossless JPEG point transform (Pt)
<p><b>Value</b>
<ul>
<li> <code>0</code> through <i><b>precision</b> - 1</i>, where
<b><i>precision</i></b> is the JPEG data precision in bits <i>[default for
compression: <code>0</code>]</i>
</ul>
<p>A point transform value of <code>0</code> is necessary in order to
generate a fully lossless JPEG image. (A non-zero point transform value
right-shifts the input samples by the specified number of bits, which is
effectively a form of lossy color quantization.)</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#PARAM_LOSSLESS"><code>PARAM_LOSSLESS</code></a>,
<a href="#PARAM_PRECISION"><code>PARAM_PRECISION</code></a>,
<a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PARAM_LOSSLESSPT">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="PARAM_RESTARTBLOCKS">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>PARAM_RESTARTBLOCKS</h4>
<pre>public static final int PARAM_RESTARTBLOCKS</pre>
<div class="block">JPEG restart marker interval in MCU blocks (lossy) or samples (lossless)
[compression only]
<p>The nature of entropy coding is such that a corrupt JPEG image cannot
be decompressed beyond the point of corruption unless it contains restart
markers. A restart marker stops and restarts the entropy coding algorithm
so that, if a JPEG image is corrupted, decompression can resume at the
next marker. Thus, adding more restart markers improves the fault
tolerance of the JPEG image, but adding too many restart markers can
adversely affect the compression ratio and performance.
<p><b>Value</b>
<ul>
<li> the number of MCU blocks or samples between each restart marker
<i>[default: <code>0</code> (no restart markers)]</i>
</ul>
<p> Setting this parameter to a non-zero value sets
<a href="#PARAM_RESTARTROWS"><code>PARAM_RESTARTROWS</code></a> to 0.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PARAM_RESTARTBLOCKS">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="PARAM_RESTARTROWS">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>PARAM_RESTARTROWS</h4>
<pre>public static final int PARAM_RESTARTROWS</pre>
<div class="block">JPEG restart marker interval in MCU rows (lossy) or sample rows (lossless)
[compression only]
<p>See <a href="#PARAM_RESTARTBLOCKS"><code>PARAM_RESTARTBLOCKS</code></a> for a description of restart markers.
<p><b>Value</b>
<ul>
<li> the number of MCU rows or sample rows between each restart marker
<i>[default: <code>0</code> (no restart markers)]</i>
</ul>
<p>Setting this parameter to a non-zero value sets
<a href="#PARAM_RESTARTBLOCKS"><code>PARAM_RESTARTBLOCKS</code></a> to 0.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PARAM_RESTARTROWS">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="PARAM_XDENSITY">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>PARAM_XDENSITY</h4>
<pre>public static final int PARAM_XDENSITY</pre>
<div class="block">JPEG horizontal pixel density
<p><b>Value</b>
<ul>
<li> The JPEG image has (decompression) or will have (compression) the
specified horizontal pixel density <i>[default for compression:
<code>1</code>]</i>.
</ul>
<p>This value is stored in or read from the JPEG header. It does not
affect the contents of the JPEG image.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#PARAM_DENSITYUNITS"><code>PARAM_DENSITYUNITS</code></a>,
<a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PARAM_XDENSITY">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="PARAM_YDENSITY">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>PARAM_YDENSITY</h4>
<pre>public static final int PARAM_YDENSITY</pre>
<div class="block">JPEG vertical pixel density
<p><b>Value</b>
<ul>
<li> The JPEG image has (decompression) or will have (compression) the
specified vertical pixel density <i>[default for compression:
<code>1</code>]</i>.
</ul>
<p>This value is stored in or read from the JPEG header. It does not
affect the contents of the JPEG image.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#PARAM_DENSITYUNITS"><code>PARAM_DENSITYUNITS</code></a>,
<a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PARAM_YDENSITY">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="PARAM_DENSITYUNITS">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>PARAM_DENSITYUNITS</h4>
<pre>public static final int PARAM_DENSITYUNITS</pre>
<div class="block">JPEG pixel density units
<p><b>Value</b>
<ul>
<li> <code>0</code> <i>[default for compression]</i> The pixel density of
the JPEG image is expressed (decompression) or will be expressed
(compression) in unknown units.
<li> <code>1</code> The pixel density of the JPEG image is expressed
(decompression) or will be expressed (compression) in units of
pixels/inch.
<li> <code>2</code> The pixel density of the JPEG image is expressed
(decompression) or will be expressed (compression) in units of pixels/cm.
</ul>
<p>This value is stored in or read from the JPEG header. It does not
affect the contents of the JPEG image.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#PARAM_XDENSITY"><code>PARAM_XDENSITY</code></a>,
<a href="#PARAM_YDENSITY"><code>PARAM_YDENSITY</code></a>,
<a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PARAM_DENSITYUNITS">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="PARAM_MAXMEMORY">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>PARAM_MAXMEMORY</h4>
<pre>public static final int PARAM_MAXMEMORY</pre>
<div class="block">Memory limit for intermediate buffers
<p><b>Value</b>
<ul>
<li> the maximum amount of memory (in megabytes) that will be allocated
for intermediate buffers, which are used with progressive JPEG compression
and decompression, optimized baseline entropy coding, lossless JPEG
compression, and lossless transformation <i>[default: <code>0</code> (no
limit)]</i>
</ul></div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PARAM_MAXMEMORY">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="FLAG_BOTTOMUP">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>FLAG_BOTTOMUP</h4>
<pre>@Deprecated
public static final int FLAG_BOTTOMUP</pre>
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">Use <a href="#PARAM_BOTTOMUP"><code>PARAM_BOTTOMUP</code></a> instead.</div>
</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.FLAG_BOTTOMUP">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="FLAG_FASTUPSAMPLE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>FLAG_FASTUPSAMPLE</h4>
<pre>@Deprecated
public static final int FLAG_FASTUPSAMPLE</pre>
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">Use <a href="#PARAM_FASTUPSAMPLE"><code>PARAM_FASTUPSAMPLE</code></a> instead.</div>
</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.FLAG_FASTUPSAMPLE">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="FLAG_FASTDCT">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>FLAG_FASTDCT</h4>
<pre>@Deprecated
public static final int FLAG_FASTDCT</pre>
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">Use <a href="#PARAM_FASTDCT"><code>PARAM_FASTDCT</code></a> instead.</div>
</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.FLAG_FASTDCT">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="FLAG_ACCURATEDCT">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>FLAG_ACCURATEDCT</h4>
<pre>@Deprecated
public static final int FLAG_ACCURATEDCT</pre>
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">Use <a href="#PARAM_FASTDCT"><code>PARAM_FASTDCT</code></a> instead.</div>
</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.FLAG_ACCURATEDCT">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="FLAG_STOPONWARNING">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>FLAG_STOPONWARNING</h4>
<pre>@Deprecated
public static final int FLAG_STOPONWARNING</pre>
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">Use <a href="#PARAM_STOPONWARNING"><code>PARAM_STOPONWARNING</code></a> instead.</div>
</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.FLAG_STOPONWARNING">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="FLAG_PROGRESSIVE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>FLAG_PROGRESSIVE</h4>
<pre>@Deprecated
public static final int FLAG_PROGRESSIVE</pre>
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">Use <a href="#PARAM_PROGRESSIVE"><code>PARAM_PROGRESSIVE</code></a> instead.</div>
</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.FLAG_PROGRESSIVE">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="FLAG_LIMITSCANS">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>FLAG_LIMITSCANS</h4>
<pre>@Deprecated
public static final int FLAG_LIMITSCANS</pre>
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">Use <a href="#PARAM_SCANLIMIT"><code>PARAM_SCANLIMIT</code></a> instead.</div>
</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.FLAG_LIMITSCANS">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="NUMERR">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>NUMERR</h4>
<pre>public static final int NUMERR</pre>
<div class="block">The number of error codes</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.NUMERR">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="ERR_WARNING">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ERR_WARNING</h4>
<pre>public static final int ERR_WARNING</pre>
<div class="block">The error was non-fatal and recoverable, but the destination image may
still be corrupt.
<p>
NOTE: due to the design of the TurboJPEG Java API, only certain methods
(specifically, <a href="TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><code>TJDecompressor.decompress*()</code></a> methods
with a void return type) will complete and leave the destination image in
a fully recoverable state after a non-fatal error occurs.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.ERR_WARNING">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="ERR_FATAL">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ERR_FATAL</h4>
<pre>public static final int ERR_FATAL</pre>
<div class="block">The error was fatal and non-recoverable.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.ERR_FATAL">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="UNSCALED">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>UNSCALED</h4>
<pre>public static final <a href="TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg">TJScalingFactor</a> UNSCALED</pre>
<div class="block">A <a href="TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg"><code>TJScalingFactor</code></a> instance that specifies a scaling factor of 1/1
(no scaling)</div>
</li>
</ul>
<a id="UNCROPPED">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>UNCROPPED</h4>
<pre>public static final java.awt.Rectangle UNCROPPED</pre>
<div class="block">A <code>java.awt.Rectangle</code> instance that specifies no cropping</div>
</li>
</ul>
</li>
</ul>
</section>
<!-- ============ METHOD DETAIL ========== -->
<section>
<ul class="blockList">
<li class="blockList"><a id="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a id="getMCUWidth(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMCUWidth</h4>
<pre class="methodSignature">public static int getMCUWidth​(int subsamp)</pre>
<div class="block">Returns the MCU block width for the given level of chrominance
subsampling.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>subsamp</code> - the level of chrominance subsampling (one of
<a href="#SAMP_444"><code>SAMP_*</code></a>)</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the MCU block width for the given level of chrominance
subsampling.</dd>
</dl>
</li>
</ul>
<a id="getMCUHeight(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMCUHeight</h4>
<pre class="methodSignature">public static int getMCUHeight​(int subsamp)</pre>
<div class="block">Returns the MCU block height for the given level of chrominance
subsampling.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>subsamp</code> - the level of chrominance subsampling (one of
<a href="#SAMP_444"><code>SAMP_*</code></a>)</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the MCU block height for the given level of chrominance
subsampling.</dd>
</dl>
</li>
</ul>
<a id="getPixelSize(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPixelSize</h4>
<pre class="methodSignature">public static int getPixelSize​(int pixelFormat)</pre>
<div class="block">Returns the pixel size (in samples) for the given pixel format.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>pixelFormat</code> - the pixel format (one of <a href="#PF_RGB"><code>PF_*</code></a>)</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the pixel size (in samples) for the given pixel format.</dd>
</dl>
</li>
</ul>
<a id="getRedOffset(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRedOffset</h4>
<pre class="methodSignature">public static int getRedOffset​(int pixelFormat)</pre>
<div class="block">For the given pixel format, returns the number of samples that the red
component is offset from the start of the pixel. For instance, if an
8-bit-per-sample pixel of format <code>TJ.PF_BGRX</code> is stored in
<code>char pixel[]</code>, then the red component will be
<code>pixel[TJ.getRedOffset(TJ.PF_BGRX)]</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>pixelFormat</code> - the pixel format (one of <a href="#PF_RGB"><code>PF_*</code></a>)</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the red offset for the given pixel format, or -1 if the pixel
format does not have a red component.</dd>
</dl>
</li>
</ul>
<a id="getGreenOffset(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getGreenOffset</h4>
<pre class="methodSignature">public static int getGreenOffset​(int pixelFormat)</pre>
<div class="block">For the given pixel format, returns the number of samples that the green
component is offset from the start of the pixel. For instance, if an
8-bit-per-sample pixel of format <code>TJ.PF_BGRX</code> is stored in
<code>char pixel[]</code>, then the green component will be
<code>pixel[TJ.getGreenOffset(TJ.PF_BGRX)]</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>pixelFormat</code> - the pixel format (one of <a href="#PF_RGB"><code>PF_*</code></a>)</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the green offset for the given pixel format, or -1 if the pixel
format does not have a green component.</dd>
</dl>
</li>
</ul>
<a id="getBlueOffset(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getBlueOffset</h4>
<pre class="methodSignature">public static int getBlueOffset​(int pixelFormat)</pre>
<div class="block">For the given pixel format, returns the number of samples that the blue
component is offset from the start of the pixel. For instance, if an
8-bit-per-sample pixel of format <code>TJ.PF_BGRX</code> is stored in
<code>char pixel[]</code>, then the blue component will be
<code>pixel[TJ.getBlueOffset(TJ.PF_BGRX)]</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>pixelFormat</code> - the pixel format (one of <a href="#PF_RGB"><code>PF_*</code></a>)</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the blue offset for the given pixel format, or -1 if the pixel
format does not have a blue component.</dd>
</dl>
</li>
</ul>
<a id="getAlphaOffset(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getAlphaOffset</h4>
<pre class="methodSignature">public static int getAlphaOffset​(int pixelFormat)</pre>
<div class="block">For the given pixel format, returns the number of samples that the alpha
component is offset from the start of the pixel. For instance, if an
8-bit-per-sample pixel of format <code>TJ.PF_BGRA</code> is stored in
<code>char pixel[]</code>, then the alpha component will be
<code>pixel[TJ.getAlphaOffset(TJ.PF_BGRA)]</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>pixelFormat</code> - the pixel format (one of <a href="#PF_RGB"><code>PF_*</code></a>)</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the alpha offset for the given pixel format, or -1 if the pixel
format does not have a alpha component.</dd>
</dl>
</li>
</ul>
<a id="bufSize(int,int,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>bufSize</h4>
<pre class="methodSignature">public static int bufSize​(int width,
int height,
int jpegSubsamp)</pre>
<div class="block">Returns the maximum size of the buffer (in bytes) required to hold a JPEG
image with the given width, height, and level of chrominance subsampling.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>width</code> - the width (in pixels) of the JPEG image</dd>
<dd><code>height</code> - the height (in pixels) of the JPEG image</dd>
<dd><code>jpegSubsamp</code> - the level of chrominance subsampling to be used when
generating the JPEG image (one of <a href="#SAMP_444"><code>TJ.SAMP_*</code></a>.)
<a href="#SAMP_UNKNOWN"><code>SAMP_UNKNOWN</code></a> is treated like <a href="#SAMP_444"><code>SAMP_444</code></a>, since a buffer
large enough to hold a JPEG image with no subsampling should also be large
enough to hold a JPEG image with an arbitrary level of subsampling. Note
that lossless JPEG images always use <a href="#SAMP_444"><code>SAMP_444</code></a>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the maximum size of the buffer (in bytes) required to hold a JPEG
image with the given width, height, and level of chrominance subsampling.</dd>
</dl>
</li>
</ul>
<a id="bufSizeYUV(int,int,int,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>bufSizeYUV</h4>
<pre class="methodSignature">public static int bufSizeYUV​(int width,
int align,
int height,
int subsamp)</pre>
<div class="block">Returns the size of the buffer (in bytes) required to hold a unified
planar YUV image with the given width, height, and level of chrominance
subsampling.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>width</code> - the width (in pixels) of the YUV image</dd>
<dd><code>align</code> - row alignment (in bytes) of the YUV image (must be a power of
2.) Setting this parameter to n specifies that each row in each plane of
the YUV image will be padded to the nearest multiple of n bytes
(1 = unpadded.)</dd>
<dd><code>height</code> - the height (in pixels) of the YUV image</dd>
<dd><code>subsamp</code> - the level of chrominance subsampling used in the YUV
image (one of <a href="#SAMP_444"><code>TJ.SAMP_*</code></a>)</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the size of the buffer (in bytes) required to hold a unified
planar YUV image with the given width, height, and level of chrominance
subsampling.</dd>
</dl>
</li>
</ul>
<a id="planeSizeYUV(int,int,int,int,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>planeSizeYUV</h4>
<pre class="methodSignature">public static int planeSizeYUV​(int componentID,
int width,
int stride,
int height,
int subsamp)</pre>
<div class="block">Returns the size of the buffer (in bytes) required to hold a YUV image
plane with the given parameters.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>componentID</code> - ID number of the image plane (0 = Y, 1 = U/Cb,
2 = V/Cr)</dd>
<dd><code>width</code> - width (in pixels) of the YUV image. NOTE: this is the width
of the whole image, not the plane width.</dd>
<dd><code>stride</code> - bytes per row in the image plane.</dd>
<dd><code>height</code> - height (in pixels) of the YUV image. NOTE: this is the
height of the whole image, not the plane height.</dd>
<dd><code>subsamp</code> - the level of chrominance subsampling used in the YUV
image (one of <a href="#SAMP_444"><code>TJ.SAMP_*</code></a>)</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the size of the buffer (in bytes) required to hold a YUV image
plane with the given parameters.</dd>
</dl>
</li>
</ul>
<a id="planeWidth(int,int,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>planeWidth</h4>
<pre class="methodSignature">public static int planeWidth​(int componentID,
int width,
int subsamp)</pre>
<div class="block">Returns the plane width of a YUV image plane with the given parameters.
Refer to <a href="YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>YUVImage</code></a> for a description of plane width.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>componentID</code> - ID number of the image plane (0 = Y, 1 = U/Cb,
2 = V/Cr)</dd>
<dd><code>width</code> - width (in pixels) of the YUV image</dd>
<dd><code>subsamp</code> - the level of chrominance subsampling used in the YUV image
(one of <a href="#SAMP_444"><code>TJ.SAMP_*</code></a>)</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the plane width of a YUV image plane with the given parameters.</dd>
</dl>
</li>
</ul>
<a id="planeHeight(int,int,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>planeHeight</h4>
<pre class="methodSignature">public static int planeHeight​(int componentID,
int height,
int subsamp)</pre>
<div class="block">Returns the plane height of a YUV image plane with the given parameters.
Refer to <a href="YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>YUVImage</code></a> for a description of plane height.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>componentID</code> - ID number of the image plane (0 = Y, 1 = U/Cb,
2 = V/Cr)</dd>
<dd><code>height</code> - height (in pixels) of the YUV image</dd>
<dd><code>subsamp</code> - the level of chrominance subsampling used in the YUV image
(one of <a href="#SAMP_444"><code>TJ.SAMP_*</code></a>)</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the plane height of a YUV image plane with the given parameters.</dd>
</dl>
</li>
</ul>
<a id="getScalingFactors()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getScalingFactors</h4>
<pre class="methodSignature">public static <a href="TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg">TJScalingFactor</a>[] getScalingFactors()</pre>
<div class="block">Returns a list of fractional scaling factors that the JPEG decompressor
supports.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a list of fractional scaling factors that the JPEG decompressor
supports.</dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
</div>
</main>
<!-- ========= END OF CLASS DATA ========= -->
<footer role="contentinfo">
<nav role="navigation">
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a id="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../allclasses.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li><a href="#field.summary">Field</a> | </li>
<li>Constr | </li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li><a href="#field.detail">Field</a> | </li>
<li>Constr | </li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
</footer>
</body>
</html>