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
<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc -->
<title>TJTransform</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="TJTransform";
}
}
catch(err) {
}
//-->
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><a href="#nested.class.summary">Nested</a> | </li>
<li><a href="#field.summary">Field</a> | </li>
<li><a href="#constructor.summary">Constr</a> | </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><a href="#constructor.detail">Constr</a> | </li>
<li>Method</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 TJTransform" class="title">Class TJTransform</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>java.awt.geom.RectangularShape</li>
<li>
<ul class="inheritance">
<li>java.awt.geom.Rectangle2D</li>
<li>
<ul class="inheritance">
<li>java.awt.Rectangle</li>
<li>
<ul class="inheritance">
<li>org.libjpegturbo.turbojpeg.TJTransform</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><code>java.awt.Shape</code>, <code>java.io.Serializable</code>, <code>java.lang.Cloneable</code></dd>
</dl>
<hr>
<pre>public class <span class="typeNameLabel">TJTransform</span>
extends java.awt.Rectangle</pre>
<div class="block">Lossless transform parameters</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../serialized-form.html#org.libjpegturbo.turbojpeg.TJTransform">Serialized Form</a></dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<section>
<ul class="blockList">
<li class="blockList"><a id="nested.class.summary">
<!-- -->
</a>
<h3>Nested Class Summary</h3>
<ul class="blockList">
<li class="blockList"><a id="nested.classes.inherited.from.class.java.awt.geom.Rectangle2D">
<!-- -->
</a>
<h3>Nested classes/interfaces inherited from class java.awt.geom.Rectangle2D</h3>
<code>java.awt.geom.Rectangle2D.Double, java.awt.geom.Rectangle2D.Float</code></li>
</ul>
</li>
</ul>
</section>
<!-- =========== 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><a href="TJCustomFilter.html" title="interface in org.libjpegturbo.turbojpeg">TJCustomFilter</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#cf">cf</a></span></code></th>
<td class="colLast">
<div class="block">Custom filter instance</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="#NUMOP">NUMOP</a></span></code></th>
<td class="colLast">
<div class="block">The number of lossless transform operations</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#op">op</a></span></code></th>
<td class="colLast">
<div class="block">Transform operation (one of <a href="#OP_NONE"><code>OP_*</code></a>)</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="#OP_HFLIP">OP_HFLIP</a></span></code></th>
<td class="colLast">
<div class="block">Flip (mirror) image horizontally.</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="#OP_NONE">OP_NONE</a></span></code></th>
<td class="colLast">
<div class="block">Do not transform the position of the image pixels.</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="#OP_ROT180">OP_ROT180</a></span></code></th>
<td class="colLast">
<div class="block">Rotate image 180 degrees.</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="#OP_ROT270">OP_ROT270</a></span></code></th>
<td class="colLast">
<div class="block">Rotate image counter-clockwise by 90 degrees.</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="#OP_ROT90">OP_ROT90</a></span></code></th>
<td class="colLast">
<div class="block">Rotate image clockwise by 90 degrees.</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="#OP_TRANSPOSE">OP_TRANSPOSE</a></span></code></th>
<td class="colLast">
<div class="block">Transpose image (flip/mirror along upper left to lower right axis).</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="#OP_TRANSVERSE">OP_TRANSVERSE</a></span></code></th>
<td class="colLast">
<div class="block">Transverse transpose image (flip/mirror along upper right to lower left
axis).</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="#OP_VFLIP">OP_VFLIP</a></span></code></th>
<td class="colLast">
<div class="block">Flip (mirror) image vertically.</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="#OPT_ARITHMETIC">OPT_ARITHMETIC</a></span></code></th>
<td class="colLast">
<div class="block">This option will enable arithmetic entropy coding in the JPEG image
generated by this particular transform.</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="#OPT_COPYNONE">OPT_COPYNONE</a></span></code></th>
<td class="colLast">
<div class="block">This option will prevent <a href="TJTransformer.html#transform(byte%5B%5D%5B%5D,org.libjpegturbo.turbojpeg.TJTransform%5B%5D)"><code>TJTransformer.transform()</code></a> from copying any extra markers (including EXIF
and ICC profile data) from the source image to the destination image.</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="#OPT_CROP">OPT_CROP</a></span></code></th>
<td class="colLast">
<div class="block">This option will enable lossless cropping.</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="#OPT_GRAY">OPT_GRAY</a></span></code></th>
<td class="colLast">
<div class="block">This option will discard the color data in the source image and produce a
grayscale destination image.</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="#OPT_NOOUTPUT">OPT_NOOUTPUT</a></span></code></th>
<td class="colLast">
<div class="block">This option will prevent <a href="TJTransformer.html#transform(byte%5B%5D%5B%5D,org.libjpegturbo.turbojpeg.TJTransform%5B%5D)"><code>TJTransformer.transform()</code></a> from outputting a JPEG image for this
particular transform.</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="#OPT_OPTIMIZE">OPT_OPTIMIZE</a></span></code></th>
<td class="colLast">
<div class="block">This option will enable optimized baseline entropy coding in the JPEG
image generated by this particular transform.</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="#OPT_PERFECT">OPT_PERFECT</a></span></code></th>
<td class="colLast">
<div class="block">This option will cause <a href="TJTransformer.html#transform(byte%5B%5D%5B%5D,org.libjpegturbo.turbojpeg.TJTransform%5B%5D)"><code>TJTransformer.transform()</code></a> to throw an exception if the transform is not
perfect.</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="#OPT_PROGRESSIVE">OPT_PROGRESSIVE</a></span></code></th>
<td class="colLast">
<div class="block">This option will enable progressive entropy coding in the JPEG image
generated by this particular transform.</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="#OPT_TRIM">OPT_TRIM</a></span></code></th>
<td class="colLast">
<div class="block">This option will discard any partial MCU blocks that cannot be
transformed.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#options">options</a></span></code></th>
<td class="colLast">
<div class="block">Transform options (bitwise OR of one or more of
<a href="#OPT_PERFECT"><code>OPT_*</code></a>)</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a id="fields.inherited.from.class.java.awt.Rectangle">
<!-- -->
</a>
<h3>Fields inherited from class java.awt.Rectangle</h3>
<code>height, width, x, y</code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a id="fields.inherited.from.class.java.awt.geom.Rectangle2D">
<!-- -->
</a>
<h3>Fields inherited from class java.awt.geom.Rectangle2D</h3>
<code>OUT_BOTTOM, OUT_LEFT, OUT_RIGHT, OUT_TOP</code></li>
</ul>
</li>
</ul>
</section>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<section>
<ul class="blockList">
<li class="blockList"><a id="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary">
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Constructor</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E()">TJTransform</a></span>()</code></th>
<td class="colLast">
<div class="block">Create a new lossless transform instance.</div>
</td>
</tr>
<tr class="rowColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(int,int,int,int,int,int,org.libjpegturbo.turbojpeg.TJCustomFilter)">TJTransform</a></span>​(int x,
int y,
int w,
int h,
int op,
int options,
<a href="TJCustomFilter.html" title="interface in org.libjpegturbo.turbojpeg">TJCustomFilter</a> cf)</code></th>
<td class="colLast">
<div class="block">Create a new lossless transform instance with the given parameters.</div>
</td>
</tr>
<tr class="altColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(java.awt.Rectangle,int,int,org.libjpegturbo.turbojpeg.TJCustomFilter)">TJTransform</a></span>​(java.awt.Rectangle r,
int op,
int options,
<a href="TJCustomFilter.html" title="interface in org.libjpegturbo.turbojpeg">TJCustomFilter</a> cf)</code></th>
<td class="colLast">
<div class="block">Create a new lossless transform instance with the given parameters.</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>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.java.awt.Rectangle">
<!-- -->
</a>
<h3>Methods inherited from class java.awt.Rectangle</h3>
<code>add, add, add, contains, contains, contains, contains, createIntersection, createUnion, equals, getBounds, getBounds2D, getHeight, getLocation, getSize, getWidth, getX, getY, grow, inside, intersection, intersects, isEmpty, move, outcode, reshape, resize, setBounds, setBounds, setLocation, setLocation, setRect, setSize, setSize, toString, translate, union</code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.java.awt.geom.Rectangle2D">
<!-- -->
</a>
<h3>Methods inherited from class java.awt.geom.Rectangle2D</h3>
<code>add, add, add, contains, contains, getPathIterator, getPathIterator, hashCode, intersect, intersects, intersectsLine, intersectsLine, outcode, setFrame, setRect, union</code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.java.awt.geom.RectangularShape">
<!-- -->
</a>
<h3>Methods inherited from class java.awt.geom.RectangularShape</h3>
<code>clone, contains, contains, getCenterX, getCenterY, getFrame, getMaxX, getMaxY, getMinX, getMinY, intersects, setFrame, setFrame, setFrameFromCenter, setFrameFromCenter, setFrameFromDiagonal, setFrameFromDiagonal</code></li>
</ul>
<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>finalize, getClass, notify, notifyAll, wait, wait, wait</code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.java.awt.Shape">
<!-- -->
</a>
<h3>Methods inherited from interface java.awt.Shape</h3>
<code>contains, contains, contains, contains, getPathIterator, getPathIterator, intersects, intersects</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="NUMOP">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>NUMOP</h4>
<pre>public static final int NUMOP</pre>
<div class="block">The number of lossless transform operations</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJTransform.NUMOP">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="OP_NONE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>OP_NONE</h4>
<pre>public static final int OP_NONE</pre>
<div class="block">Do not transform the position of the image pixels.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJTransform.OP_NONE">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="OP_HFLIP">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>OP_HFLIP</h4>
<pre>public static final int OP_HFLIP</pre>
<div class="block">Flip (mirror) image horizontally. This transform is imperfect if there
are any partial MCU blocks on the right edge.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#OPT_PERFECT"><code>OPT_PERFECT</code></a>,
<a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJTransform.OP_HFLIP">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="OP_VFLIP">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>OP_VFLIP</h4>
<pre>public static final int OP_VFLIP</pre>
<div class="block">Flip (mirror) image vertically. This transform is imperfect if there are
any partial MCU blocks on the bottom edge.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#OPT_PERFECT"><code>OPT_PERFECT</code></a>,
<a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJTransform.OP_VFLIP">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="OP_TRANSPOSE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>OP_TRANSPOSE</h4>
<pre>public static final int OP_TRANSPOSE</pre>
<div class="block">Transpose image (flip/mirror along upper left to lower right axis). This
transform is always perfect.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#OPT_PERFECT"><code>OPT_PERFECT</code></a>,
<a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJTransform.OP_TRANSPOSE">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="OP_TRANSVERSE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>OP_TRANSVERSE</h4>
<pre>public static final int OP_TRANSVERSE</pre>
<div class="block">Transverse transpose image (flip/mirror along upper right to lower left
axis). This transform is imperfect if there are any partial MCU blocks in
the image.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#OPT_PERFECT"><code>OPT_PERFECT</code></a>,
<a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJTransform.OP_TRANSVERSE">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="OP_ROT90">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>OP_ROT90</h4>
<pre>public static final int OP_ROT90</pre>
<div class="block">Rotate image clockwise by 90 degrees. This transform is imperfect if
there are any partial MCU blocks on the bottom edge.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#OPT_PERFECT"><code>OPT_PERFECT</code></a>,
<a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJTransform.OP_ROT90">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="OP_ROT180">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>OP_ROT180</h4>
<pre>public static final int OP_ROT180</pre>
<div class="block">Rotate image 180 degrees. This transform is imperfect if there are any
partial MCU blocks in the image.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#OPT_PERFECT"><code>OPT_PERFECT</code></a>,
<a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJTransform.OP_ROT180">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="OP_ROT270">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>OP_ROT270</h4>
<pre>public static final int OP_ROT270</pre>
<div class="block">Rotate image counter-clockwise by 90 degrees. This transform is imperfect
if there are any partial MCU blocks on the right edge.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#OPT_PERFECT"><code>OPT_PERFECT</code></a>,
<a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJTransform.OP_ROT270">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="OPT_PERFECT">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>OPT_PERFECT</h4>
<pre>public static final int OPT_PERFECT</pre>
<div class="block">This option will cause <a href="TJTransformer.html#transform(byte%5B%5D%5B%5D,org.libjpegturbo.turbojpeg.TJTransform%5B%5D)"><code>TJTransformer.transform()</code></a> to throw an exception if the transform is not
perfect. Lossless transforms operate on MCU blocks, whose size depends on
the level of chrominance subsampling used. If the image's width or height
is not evenly divisible by the MCU block size (see <a href="TJ.html#getMCUWidth(int)"><code>TJ.getMCUWidth()</code></a> and <a href="TJ.html#getMCUHeight(int)"><code>TJ.getMCUHeight()</code></a>), then
there will be partial MCU blocks on the right and/or bottom edges. It is
not possible to move these partial MCU blocks to the top or left of the
image, so any transform that would require that is "imperfect." If this
option is not specified, then any partial MCU blocks that cannot be
transformed will be left in place, which will create odd-looking strips on
the right or bottom edge of the image.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJTransform.OPT_PERFECT">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="OPT_TRIM">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>OPT_TRIM</h4>
<pre>public static final int OPT_TRIM</pre>
<div class="block">This option will discard any partial MCU blocks that cannot be
transformed.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJTransform.OPT_TRIM">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="OPT_CROP">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>OPT_CROP</h4>
<pre>public static final int OPT_CROP</pre>
<div class="block">This option will enable lossless cropping.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJTransform.OPT_CROP">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="OPT_GRAY">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>OPT_GRAY</h4>
<pre>public static final int OPT_GRAY</pre>
<div class="block">This option will discard the color data in the source image and produce a
grayscale destination image.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJTransform.OPT_GRAY">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="OPT_NOOUTPUT">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>OPT_NOOUTPUT</h4>
<pre>public static final int OPT_NOOUTPUT</pre>
<div class="block">This option will prevent <a href="TJTransformer.html#transform(byte%5B%5D%5B%5D,org.libjpegturbo.turbojpeg.TJTransform%5B%5D)"><code>TJTransformer.transform()</code></a> from outputting a JPEG image for this
particular transform. This can be used in conjunction with a custom
filter to capture the transformed DCT coefficients without transcoding
them.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJTransform.OPT_NOOUTPUT">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="OPT_PROGRESSIVE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>OPT_PROGRESSIVE</h4>
<pre>public static final int OPT_PROGRESSIVE</pre>
<div class="block">This option will enable progressive entropy coding in the JPEG image
generated by this particular transform. Progressive entropy coding will
generally improve compression relative to baseline entropy coding (the
default), but it will reduce decompression performance considerably.
Can be combined with <a href="#OPT_ARITHMETIC"><code>OPT_ARITHMETIC</code></a>. Implies
<a href="#OPT_OPTIMIZE"><code>OPT_OPTIMIZE</code></a> unless <a href="#OPT_ARITHMETIC"><code>OPT_ARITHMETIC</code></a> is also specified.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJTransform.OPT_PROGRESSIVE">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="OPT_COPYNONE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>OPT_COPYNONE</h4>
<pre>public static final int OPT_COPYNONE</pre>
<div class="block">This option will prevent <a href="TJTransformer.html#transform(byte%5B%5D%5B%5D,org.libjpegturbo.turbojpeg.TJTransform%5B%5D)"><code>TJTransformer.transform()</code></a> from copying any extra markers (including EXIF
and ICC profile data) from the source image to the destination image.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJTransform.OPT_COPYNONE">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="OPT_ARITHMETIC">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>OPT_ARITHMETIC</h4>
<pre>public static final int OPT_ARITHMETIC</pre>
<div class="block">This option will enable arithmetic entropy coding in the JPEG image
generated by this particular transform. Arithmetic entropy coding will
generally improve compression relative to Huffman entropy coding (the
default), but it will reduce decompression performance considerably. Can
be combined with <a href="#OPT_PROGRESSIVE"><code>OPT_PROGRESSIVE</code></a>.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJTransform.OPT_ARITHMETIC">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="OPT_OPTIMIZE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>OPT_OPTIMIZE</h4>
<pre>public static final int OPT_OPTIMIZE</pre>
<div class="block">This option will enable optimized baseline entropy coding in the JPEG
image generated by this particular transform. Optimized baseline entropy
coding will improve compression slightly (generally 5% or less.)</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJTransform.OPT_OPTIMIZE">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="op">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>op</h4>
<pre>public int op</pre>
<div class="block">Transform operation (one of <a href="#OP_NONE"><code>OP_*</code></a>)</div>
</li>
</ul>
<a id="options">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>options</h4>
<pre>public int options</pre>
<div class="block">Transform options (bitwise OR of one or more of
<a href="#OPT_PERFECT"><code>OPT_*</code></a>)</div>
</li>
</ul>
<a id="cf">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>cf</h4>
<pre>public <a href="TJCustomFilter.html" title="interface in org.libjpegturbo.turbojpeg">TJCustomFilter</a> cf</pre>
<div class="block">Custom filter instance</div>
</li>
</ul>
</li>
</ul>
</section>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<section>
<ul class="blockList">
<li class="blockList"><a id="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a id="<init>()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>TJTransform</h4>
<pre>public TJTransform()</pre>
<div class="block">Create a new lossless transform instance.</div>
</li>
</ul>
<a id="<init>(int,int,int,int,int,int,org.libjpegturbo.turbojpeg.TJCustomFilter)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>TJTransform</h4>
<pre>public TJTransform​(int x,
int y,
int w,
int h,
int op,
int options,
<a href="TJCustomFilter.html" title="interface in org.libjpegturbo.turbojpeg">TJCustomFilter</a> cf)</pre>
<div class="block">Create a new lossless transform instance with the given parameters.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>x</code> - the left boundary of the cropping region. This must be evenly
divisible by the MCU block width (see <a href="TJ.html#getMCUWidth(int)"><code>TJ.getMCUWidth()</code></a>)</dd>
<dd><code>y</code> - the upper boundary of the cropping region. This must be evenly
divisible by the MCU block height (see <a href="TJ.html#getMCUHeight(int)"><code>TJ.getMCUHeight()</code></a>)</dd>
<dd><code>w</code> - the width of the cropping region. Setting this to 0 is the
equivalent of setting it to (width of the source JPEG image -
<code>x</code>).</dd>
<dd><code>h</code> - the height of the cropping region. Setting this to 0 is the
equivalent of setting it to (height of the source JPEG image -
<code>y</code>).</dd>
<dd><code>op</code> - one of the transform operations (<a href="#OP_NONE"><code>OP_*</code></a>)</dd>
<dd><code>options</code> - the bitwise OR of one or more of the transform options
(<a href="#OPT_PERFECT"><code>OPT_*</code></a>)</dd>
<dd><code>cf</code> - an instance of an object that implements the
<a href="TJCustomFilter.html" title="interface in org.libjpegturbo.turbojpeg"><code>TJCustomFilter</code></a> interface, or null if no custom filter is needed</dd>
</dl>
</li>
</ul>
<a id="<init>(java.awt.Rectangle,int,int,org.libjpegturbo.turbojpeg.TJCustomFilter)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>TJTransform</h4>
<pre>public TJTransform​(java.awt.Rectangle r,
int op,
int options,
<a href="TJCustomFilter.html" title="interface in org.libjpegturbo.turbojpeg">TJCustomFilter</a> cf)</pre>
<div class="block">Create a new lossless transform instance with the given parameters.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>r</code> - a <code>java.awt.Rectangle</code> instance that specifies the
cropping region. See
<a href="#%3Cinit%3E(int,int,int,int,int,int,org.libjpegturbo.turbojpeg.TJCustomFilter)"><code>TJTransform(int, int, int, int, int, int, TJCustomFilter)</code></a> for
more details.</dd>
<dd><code>op</code> - one of the transform operations (<a href="#OP_NONE"><code>OP_*</code></a>)</dd>
<dd><code>options</code> - the bitwise OR of one or more of the transform options
(<a href="#OPT_PERFECT"><code>OPT_*</code></a>)</dd>
<dd><code>cf</code> - an instance of an object that implements the
<a href="TJCustomFilter.html" title="interface in org.libjpegturbo.turbojpeg"><code>TJCustomFilter</code></a> interface, or null if no custom filter is needed</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><a href="#nested.class.summary">Nested</a> | </li>
<li><a href="#field.summary">Field</a> | </li>
<li><a href="#constructor.summary">Constr</a> | </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><a href="#constructor.detail">Constr</a> | </li>
<li>Method</li>
</ul>
</div>
<a id="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
</footer>
</body>
</html>