1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
5 <title>TJCustomFilter</title>
6 <link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
9 <script type="text/javascript"><!--
11 if (location.href.indexOf('is-external=true') == -1) {
12 parent.document.title="TJCustomFilter";
20 <div>JavaScript is disabled on your browser.</div>
22 <!-- ========= START OF TOP NAVBAR ======= -->
23 <div class="topNav"><a name="navbar_top">
25 </a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
28 <ul class="navList" title="Navigation">
29 <li><a href="../../../org/libjpegturbo/turbojpeg/package-summary.html">Package</a></li>
30 <li class="navBarCell1Rev">Class</li>
31 <li><a href="package-tree.html">Tree</a></li>
32 <li><a href="../../../deprecated-list.html">Deprecated</a></li>
33 <li><a href="../../../index-all.html">Index</a></li>
34 <li><a href="../../../help-doc.html">Help</a></li>
39 <li><a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">Prev Class</span></a></li>
40 <li><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">Next Class</span></a></li>
43 <li><a href="../../../index.html?org/libjpegturbo/turbojpeg/TJCustomFilter.html" target="_top">Frames</a></li>
44 <li><a href="TJCustomFilter.html" target="_top">No Frames</a></li>
46 <ul class="navList" id="allclasses_navbar_top">
47 <li><a href="../../../allclasses-noframe.html">All Classes</a></li>
50 <script type="text/javascript"><!--
51 allClassesLink = document.getElementById("allclasses_navbar_top");
53 allClassesLink.style.display = "block";
56 allClassesLink.style.display = "none";
62 <ul class="subNavList">
63 <li>Summary: </li>
64 <li>Nested | </li>
65 <li>Field | </li>
66 <li>Constr | </li>
67 <li><a href="#method_summary">Method</a></li>
69 <ul class="subNavList">
70 <li>Detail: </li>
71 <li>Field | </li>
72 <li>Constr | </li>
73 <li><a href="#method_detail">Method</a></li>
76 <a name="skip-navbar_top">
79 <!-- ========= END OF TOP NAVBAR ========= -->
80 <!-- ======== START OF CLASS DATA ======== -->
82 <div class="subTitle">org.libjpegturbo.turbojpeg</div>
83 <h2 title="Interface TJCustomFilter" class="title">Interface TJCustomFilter</h2>
85 <div class="contentContainer">
86 <div class="description">
87 <ul class="blockList">
88 <li class="blockList">
91 <pre>public interface <span class="strong">TJCustomFilter</span></pre>
92 <div class="block">Custom filter callback interface</div>
97 <ul class="blockList">
98 <li class="blockList">
99 <!-- ========== METHOD SUMMARY =========== -->
100 <ul class="blockList">
101 <li class="blockList"><a name="method_summary">
104 <h3>Method Summary</h3>
105 <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
106 <caption><span>Methods</span><span class="tabEnd"> </span></caption>
108 <th class="colFirst" scope="col">Modifier and Type</th>
109 <th class="colLast" scope="col">Method and Description</th>
111 <tr class="altColor">
112 <td class="colFirst"><code>void</code></td>
113 <td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJCustomFilter.html#customFilter(java.nio.ShortBuffer,%20java.awt.Rectangle,%20java.awt.Rectangle,%20int,%20int,%20org.libjpegturbo.turbojpeg.TJTransform)">customFilter</a></strong>(java.nio.ShortBuffer coeffBuffer,
114 java.awt.Rectangle bufferRegion,
115 java.awt.Rectangle planeRegion,
116 int componentID,
117 int transformID,
118 <a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</a> transform)</code>
119 <div class="block">A callback function that can be used to modify the DCT coefficients after
120 they are losslessly transformed but before they are transcoded to a new
130 <div class="details">
131 <ul class="blockList">
132 <li class="blockList">
133 <!-- ============ METHOD DETAIL ========== -->
134 <ul class="blockList">
135 <li class="blockList"><a name="method_detail">
138 <h3>Method Detail</h3>
139 <a name="customFilter(java.nio.ShortBuffer, java.awt.Rectangle, java.awt.Rectangle, int, int, org.libjpegturbo.turbojpeg.TJTransform)">
142 <ul class="blockListLast">
143 <li class="blockList">
144 <h4>customFilter</h4>
145 <pre>void customFilter(java.nio.ShortBuffer coeffBuffer,
146 java.awt.Rectangle bufferRegion,
147 java.awt.Rectangle planeRegion,
148 int componentID,
149 int transformID,
150 <a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</a> transform)
151 throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
152 <div class="block">A callback function that can be used to modify the DCT coefficients after
153 they are losslessly transformed but before they are transcoded to a new
154 JPEG image. This allows for custom filters or other transformations to be
155 applied in the frequency domain.</div>
156 <dl><dt><span class="strong">Parameters:</span></dt><dd><code>coeffBuffer</code> - a buffer containing transformed DCT coefficients.
157 (NOTE: this buffer is not guaranteed to be valid once the callback
158 returns, so applications wishing to hand off the DCT coefficients to
159 another function or library should make a copy of them within the body of
160 the callback.)</dd><dd><code>bufferRegion</code> - rectangle containing the width and height of
161 <code>coeffBuffer</code> as well as its offset relative to the component
162 plane. TurboJPEG implementations may choose to split each component plane
163 into multiple DCT coefficient buffers and call the callback function once
164 for each buffer.</dd><dd><code>planeRegion</code> - rectangle containing the width and height of the
165 component plane to which <code>coeffBuffer</code> belongs</dd><dd><code>componentID</code> - ID number of the component plane to which
166 <code>coeffBuffer</code> belongs (Y, Cb, and Cr have, respectively, ID's
167 of 0, 1, and 2 in typical JPEG images.)</dd><dd><code>transformID</code> - ID number of the transformed image to which
168 <code>coeffBuffer</code> belongs. This is the same as the index of the
169 transform in the <code>transforms</code> array that was passed to <a href="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#transform(byte[][],%20org.libjpegturbo.turbojpeg.TJTransform[],%20int)"><code>TJTransformer.transform()</code></a>.</dd><dd><code>transform</code> - a <a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg"><code>TJTransform</code></a> instance that specifies the
170 parameters and/or cropping region for this transform</dd>
171 <dt><span class="strong">Throws:</span></dt>
172 <dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
181 <!-- ========= END OF CLASS DATA ========= -->
182 <!-- ======= START OF BOTTOM NAVBAR ====== -->
183 <div class="bottomNav"><a name="navbar_bottom">
185 </a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
188 <ul class="navList" title="Navigation">
189 <li><a href="../../../org/libjpegturbo/turbojpeg/package-summary.html">Package</a></li>
190 <li class="navBarCell1Rev">Class</li>
191 <li><a href="package-tree.html">Tree</a></li>
192 <li><a href="../../../deprecated-list.html">Deprecated</a></li>
193 <li><a href="../../../index-all.html">Index</a></li>
194 <li><a href="../../../help-doc.html">Help</a></li>
199 <li><a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">Prev Class</span></a></li>
200 <li><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">Next Class</span></a></li>
203 <li><a href="../../../index.html?org/libjpegturbo/turbojpeg/TJCustomFilter.html" target="_top">Frames</a></li>
204 <li><a href="TJCustomFilter.html" target="_top">No Frames</a></li>
206 <ul class="navList" id="allclasses_navbar_bottom">
207 <li><a href="../../../allclasses-noframe.html">All Classes</a></li>
210 <script type="text/javascript"><!--
211 allClassesLink = document.getElementById("allclasses_navbar_bottom");
213 allClassesLink.style.display = "block";
216 allClassesLink.style.display = "none";
222 <ul class="subNavList">
223 <li>Summary: </li>
224 <li>Nested | </li>
225 <li>Field | </li>
226 <li>Constr | </li>
227 <li><a href="#method_summary">Method</a></li>
229 <ul class="subNavList">
230 <li>Detail: </li>
231 <li>Field | </li>
232 <li>Constr | </li>
233 <li><a href="#method_detail">Method</a></li>
236 <a name="skip-navbar_bottom">
239 <!-- ======== END OF BOTTOM NAVBAR ======= -->