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"><!--
10 if (location.href.indexOf('is-external=true') == -1) {
11 parent.document.title="TJCustomFilter";
16 <div>JavaScript is disabled on your browser.</div>
18 <!-- ========= START OF TOP NAVBAR ======= -->
19 <div class="topNav"><a name="navbar_top">
21 </a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
24 <ul class="navList" title="Navigation">
25 <li><a href="../../../org/libjpegturbo/turbojpeg/package-summary.html">Package</a></li>
26 <li class="navBarCell1Rev">Class</li>
27 <li><a href="package-tree.html">Tree</a></li>
28 <li><a href="../../../deprecated-list.html">Deprecated</a></li>
29 <li><a href="../../../index-all.html">Index</a></li>
30 <li><a href="../../../help-doc.html">Help</a></li>
35 <li><a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">Prev Class</span></a></li>
36 <li><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">Next Class</span></a></li>
39 <li><a href="../../../index.html?org/libjpegturbo/turbojpeg/TJCustomFilter.html" target="_top">Frames</a></li>
40 <li><a href="TJCustomFilter.html" target="_top">No Frames</a></li>
42 <ul class="navList" id="allclasses_navbar_top">
43 <li><a href="../../../allclasses-noframe.html">All Classes</a></li>
46 <script type="text/javascript"><!--
47 allClassesLink = document.getElementById("allclasses_navbar_top");
49 allClassesLink.style.display = "block";
52 allClassesLink.style.display = "none";
58 <ul class="subNavList">
59 <li>Summary: </li>
60 <li>Nested | </li>
61 <li>Field | </li>
62 <li>Constr | </li>
63 <li><a href="#method_summary">Method</a></li>
65 <ul class="subNavList">
66 <li>Detail: </li>
67 <li>Field | </li>
68 <li>Constr | </li>
69 <li><a href="#method_detail">Method</a></li>
72 <a name="skip-navbar_top">
75 <!-- ========= END OF TOP NAVBAR ========= -->
76 <!-- ======== START OF CLASS DATA ======== -->
78 <div class="subTitle">org.libjpegturbo.turbojpeg</div>
79 <h2 title="Interface TJCustomFilter" class="title">Interface TJCustomFilter</h2>
81 <div class="contentContainer">
82 <div class="description">
83 <ul class="blockList">
84 <li class="blockList">
87 <pre>public interface <span class="strong">TJCustomFilter</span></pre>
88 <div class="block">Custom filter callback interface</div>
93 <ul class="blockList">
94 <li class="blockList">
95 <!-- ========== METHOD SUMMARY =========== -->
96 <ul class="blockList">
97 <li class="blockList"><a name="method_summary">
100 <h3>Method Summary</h3>
101 <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
102 <caption><span>Methods</span><span class="tabEnd"> </span></caption>
104 <th class="colFirst" scope="col">Modifier and Type</th>
105 <th class="colLast" scope="col">Method and Description</th>
107 <tr class="altColor">
108 <td class="colFirst"><code>void</code></td>
109 <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,
110 java.awt.Rectangle bufferRegion,
111 java.awt.Rectangle planeRegion,
112 int componentID,
113 int transformID,
114 <a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</a> transform)</code>
115 <div class="block">A callback function that can be used to modify the DCT coefficients after
116 they are losslessly transformed but before they are transcoded to a new
126 <div class="details">
127 <ul class="blockList">
128 <li class="blockList">
129 <!-- ============ METHOD DETAIL ========== -->
130 <ul class="blockList">
131 <li class="blockList"><a name="method_detail">
134 <h3>Method Detail</h3>
135 <a name="customFilter(java.nio.ShortBuffer, java.awt.Rectangle, java.awt.Rectangle, int, int, org.libjpegturbo.turbojpeg.TJTransform)">
138 <ul class="blockListLast">
139 <li class="blockList">
140 <h4>customFilter</h4>
141 <pre>void customFilter(java.nio.ShortBuffer coeffBuffer,
142 java.awt.Rectangle bufferRegion,
143 java.awt.Rectangle planeRegion,
144 int componentID,
145 int transformID,
146 <a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</a> transform)
147 throws java.lang.Exception</pre>
148 <div class="block">A callback function that can be used to modify the DCT coefficients after
149 they are losslessly transformed but before they are transcoded to a new
150 JPEG image. This allows for custom filters or other transformations to be
151 applied in the frequency domain.</div>
152 <dl><dt><span class="strong">Parameters:</span></dt><dd><code>coeffBuffer</code> - a buffer containing transformed DCT coefficients.
153 (NOTE: this buffer is not guaranteed to be valid once the callback
154 returns, so applications wishing to hand off the DCT coefficients to
155 another function or library should make a copy of them within the body of
156 the callback.)</dd><dd><code>bufferRegion</code> - rectangle containing the width and height of
157 <code>coeffBuffer</code> as well as its offset relative to the component
158 plane. TurboJPEG implementations may choose to split each component plane
159 into multiple DCT coefficient buffers and call the callback function once
160 for each buffer.</dd><dd><code>planeRegion</code> - rectangle containing the width and height of the
161 component plane to which <code>coeffBuffer</code> belongs</dd><dd><code>componentID</code> - ID number of the component plane to which
162 <code>coeffBuffer</code> belongs (Y, Cb, and Cr have, respectively, ID's
163 of 0, 1, and 2 in typical JPEG images.)</dd><dd><code>transformID</code> - ID number of the transformed image to which
164 <code>coeffBuffer</code> belongs. This is the same as the index of the
165 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
166 parameters and/or cropping region for this transform</dd>
167 <dt><span class="strong">Throws:</span></dt>
168 <dd><code>java.lang.Exception</code></dd></dl>
177 <!-- ========= END OF CLASS DATA ========= -->
178 <!-- ======= START OF BOTTOM NAVBAR ====== -->
179 <div class="bottomNav"><a name="navbar_bottom">
181 </a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
184 <ul class="navList" title="Navigation">
185 <li><a href="../../../org/libjpegturbo/turbojpeg/package-summary.html">Package</a></li>
186 <li class="navBarCell1Rev">Class</li>
187 <li><a href="package-tree.html">Tree</a></li>
188 <li><a href="../../../deprecated-list.html">Deprecated</a></li>
189 <li><a href="../../../index-all.html">Index</a></li>
190 <li><a href="../../../help-doc.html">Help</a></li>
195 <li><a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">Prev Class</span></a></li>
196 <li><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">Next Class</span></a></li>
199 <li><a href="../../../index.html?org/libjpegturbo/turbojpeg/TJCustomFilter.html" target="_top">Frames</a></li>
200 <li><a href="TJCustomFilter.html" target="_top">No Frames</a></li>
202 <ul class="navList" id="allclasses_navbar_bottom">
203 <li><a href="../../../allclasses-noframe.html">All Classes</a></li>
206 <script type="text/javascript"><!--
207 allClassesLink = document.getElementById("allclasses_navbar_bottom");
209 allClassesLink.style.display = "block";
212 allClassesLink.style.display = "none";
218 <ul class="subNavList">
219 <li>Summary: </li>
220 <li>Nested | </li>
221 <li>Field | </li>
222 <li>Constr | </li>
223 <li><a href="#method_summary">Method</a></li>
225 <ul class="subNavList">
226 <li>Detail: </li>
227 <li>Field | </li>
228 <li>Constr | </li>
229 <li><a href="#method_detail">Method</a></li>
232 <a name="skip-navbar_bottom">
235 <!-- ======== END OF BOTTOM NAVBAR ======= -->