5 <!-- Generated by javadoc -->
6 <title>TJCustomFilter</title>
7 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
8 <link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
9 <link rel="stylesheet" type="text/css" href="../../../jquery/jquery-ui.min.css" title="Style">
10 <link rel="stylesheet" type="text/css" href="../../../jquery-ui.overrides.css" title="Style">
11 <script type="text/javascript" src="../../../script.js"></script>
12 <script type="text/javascript" src="../../../jquery/jszip/dist/jszip.min.js"></script>
13 <script type="text/javascript" src="../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
15 <script type="text/javascript" src="../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
17 <script type="text/javascript" src="../../../jquery/jquery-3.6.0.min.js"></script>
18 <script type="text/javascript" src="../../../jquery/jquery-ui.min.js"></script>
21 <script type="text/javascript"><!--
23 if (location.href.indexOf('is-external=true') == -1) {
24 parent.document.title="TJCustomFilter";
31 var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]};
32 var altColor = "altColor";
33 var rowColor = "rowColor";
34 var tableTab = "tableTab";
35 var activeTableTab = "activeTableTab";
36 var pathtoroot = "../../../";
37 var useModuleDirectories = true;
38 loadScripts(document, 'script');</script>
40 <div>JavaScript is disabled on your browser.</div>
42 <header role="banner">
43 <nav role="navigation">
44 <div class="fixedNav">
45 <!-- ========= START OF TOP NAVBAR ======= -->
46 <div class="topNav"><a id="navbar.top">
49 <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
50 <a id="navbar.top.firstrow">
53 <ul class="navList" title="Navigation">
54 <li><a href="package-summary.html">Package</a></li>
55 <li class="navBarCell1Rev">Class</li>
56 <li><a href="package-tree.html">Tree</a></li>
57 <li><a href="../../../deprecated-list.html">Deprecated</a></li>
58 <li><a href="../../../index-all.html">Index</a></li>
59 <li><a href="../../../help-doc.html">Help</a></li>
63 <ul class="navList" id="allclasses_navbar_top">
64 <li><a href="../../../allclasses.html">All Classes</a></li>
66 <ul class="navListSearch">
67 <li><label for="search">SEARCH:</label>
68 <input type="text" id="search" value="search" disabled="disabled">
69 <input type="reset" id="reset" value="reset" disabled="disabled">
73 <script type="text/javascript"><!--
74 allClassesLink = document.getElementById("allclasses_navbar_top");
76 allClassesLink.style.display = "block";
79 allClassesLink.style.display = "none";
84 <div>JavaScript is disabled on your browser.</div>
88 <ul class="subNavList">
89 <li>Summary: </li>
90 <li>Nested | </li>
91 <li>Field | </li>
92 <li>Constr | </li>
93 <li><a href="#method.summary">Method</a></li>
95 <ul class="subNavList">
96 <li>Detail: </li>
97 <li>Field | </li>
98 <li>Constr | </li>
99 <li><a href="#method.detail">Method</a></li>
102 <a id="skip.navbar.top">
105 <!-- ========= END OF TOP NAVBAR ========= -->
107 <div class="navPadding"> </div>
108 <script type="text/javascript"><!--
109 $('.navPadding').css('padding-top', $('.fixedNav').css("height"));
114 <!-- ======== START OF CLASS DATA ======== -->
117 <div class="subTitle"><span class="packageLabelInType">Package</span> <a href="package-summary.html">org.libjpegturbo.turbojpeg</a></div>
118 <h2 title="Interface TJCustomFilter" class="title">Interface TJCustomFilter</h2>
120 <div class="contentContainer">
121 <div class="description">
122 <ul class="blockList">
123 <li class="blockList">
125 <pre>public interface <span class="typeNameLabel">TJCustomFilter</span></pre>
126 <div class="block">Custom filter callback interface</div>
130 <div class="summary">
131 <ul class="blockList">
132 <li class="blockList">
133 <!-- ========== METHOD SUMMARY =========== -->
135 <ul class="blockList">
136 <li class="blockList"><a id="method.summary">
139 <h3>Method Summary</h3>
140 <table class="memberSummary">
141 <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd"> </span></span></caption>
143 <th class="colFirst" scope="col">Modifier and Type</th>
144 <th class="colSecond" scope="col">Method</th>
145 <th class="colLast" scope="col">Description</th>
147 <tr id="i0" class="altColor">
148 <td class="colFirst"><code>void</code></td>
149 <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#customFilter(java.nio.ShortBuffer,java.awt.Rectangle,java.awt.Rectangle,int,int,org.libjpegturbo.turbojpeg.TJTransform)">customFilter</a></span>​(java.nio.ShortBuffer coeffBuffer,
150 java.awt.Rectangle bufferRegion,
151 java.awt.Rectangle planeRegion,
152 int componentID,
153 int transformID,
154 <a href="TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</a> transform)</code></th>
156 <div class="block">A callback function that can be used to modify the DCT coefficients after
157 they are losslessly transformed but before they are transcoded to a new
168 <div class="details">
169 <ul class="blockList">
170 <li class="blockList">
171 <!-- ============ METHOD DETAIL ========== -->
173 <ul class="blockList">
174 <li class="blockList"><a id="method.detail">
177 <h3>Method Detail</h3>
178 <a id="customFilter(java.nio.ShortBuffer,java.awt.Rectangle,java.awt.Rectangle,int,int,org.libjpegturbo.turbojpeg.TJTransform)">
181 <ul class="blockListLast">
182 <li class="blockList">
183 <h4>customFilter</h4>
184 <pre class="methodSignature">void customFilter​(java.nio.ShortBuffer coeffBuffer,
185 java.awt.Rectangle bufferRegion,
186 java.awt.Rectangle planeRegion,
187 int componentID,
188 int transformID,
189 <a href="TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</a> transform)
190 throws <a href="TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
191 <div class="block">A callback function that can be used to modify the DCT coefficients after
192 they are losslessly transformed but before they are transcoded to a new
193 JPEG image. This allows for custom filters or other transformations to be
194 applied in the frequency domain.</div>
196 <dt><span class="paramLabel">Parameters:</span></dt>
197 <dd><code>coeffBuffer</code> - a buffer containing transformed DCT coefficients.
198 (NOTE: this buffer is not guaranteed to be valid once the callback
199 returns, so applications wishing to hand off the DCT coefficients to
200 another function or library should make a copy of them within the body of
202 <dd><code>bufferRegion</code> - rectangle containing the width and height of
203 <code>coeffBuffer</code> as well as its offset relative to the component
204 plane. TurboJPEG implementations may choose to split each component plane
205 into multiple DCT coefficient buffers and call the callback function once
206 for each buffer.</dd>
207 <dd><code>planeRegion</code> - rectangle containing the width and height of the
208 component plane to which <code>coeffBuffer</code> belongs</dd>
209 <dd><code>componentID</code> - ID number of the component plane to which
210 <code>coeffBuffer</code> belongs. (Y, Cb, and Cr have, respectively, ID's
211 of 0, 1, and 2 in typical JPEG images.)</dd>
212 <dd><code>transformID</code> - ID number of the transformed image to which
213 <code>coeffBuffer</code> belongs. This is the same as the index of the
214 transform in the <code>transforms</code> array that was passed to
215 <a href="TJTransformer.html#transform(byte%5B%5D%5B%5D,org.libjpegturbo.turbojpeg.TJTransform%5B%5D)"><code>TJTransformer.transform()</code></a>.</dd>
216 <dd><code>transform</code> - a <a href="TJTransform.html" title="class in org.libjpegturbo.turbojpeg"><code>TJTransform</code></a> instance that specifies the
217 parameters and/or cropping region for this transform</dd>
218 <dt><span class="throwsLabel">Throws:</span></dt>
219 <dd><code><a href="TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd>
231 <!-- ========= END OF CLASS DATA ========= -->
232 <footer role="contentinfo">
233 <nav role="navigation">
234 <!-- ======= START OF BOTTOM NAVBAR ====== -->
235 <div class="bottomNav"><a id="navbar.bottom">
238 <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
239 <a id="navbar.bottom.firstrow">
242 <ul class="navList" title="Navigation">
243 <li><a href="package-summary.html">Package</a></li>
244 <li class="navBarCell1Rev">Class</li>
245 <li><a href="package-tree.html">Tree</a></li>
246 <li><a href="../../../deprecated-list.html">Deprecated</a></li>
247 <li><a href="../../../index-all.html">Index</a></li>
248 <li><a href="../../../help-doc.html">Help</a></li>
252 <ul class="navList" id="allclasses_navbar_bottom">
253 <li><a href="../../../allclasses.html">All Classes</a></li>
256 <script type="text/javascript"><!--
257 allClassesLink = document.getElementById("allclasses_navbar_bottom");
259 allClassesLink.style.display = "block";
262 allClassesLink.style.display = "none";
267 <div>JavaScript is disabled on your browser.</div>
271 <ul class="subNavList">
272 <li>Summary: </li>
273 <li>Nested | </li>
274 <li>Field | </li>
275 <li>Constr | </li>
276 <li><a href="#method.summary">Method</a></li>
278 <ul class="subNavList">
279 <li>Detail: </li>
280 <li>Field | </li>
281 <li>Constr | </li>
282 <li><a href="#method.detail">Method</a></li>
285 <a id="skip.navbar.bottom">
288 <!-- ======== END OF BOTTOM NAVBAR ======= -->