1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 2<!-- NewPage --> 3<html lang="en"> 4<head> 5<title>TJCustomFilter</title> 6<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style"> 7</head> 8<body> 9<script type="text/javascript"><!-- 10 if (location.href.indexOf('is-external=true') == -1) { 11 parent.document.title="TJCustomFilter"; 12 } 13//--> 14</script> 15<noscript> 16<div>JavaScript is disabled on your browser.</div> 17</noscript> 18<!-- ========= START OF TOP NAVBAR ======= --> 19<div class="topNav"><a name="navbar_top"> 20<!-- --> 21</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow"> 22<!-- --> 23</a> 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> 31</ul> 32</div> 33<div class="subNav"> 34<ul class="navList"> 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> 37</ul> 38<ul class="navList"> 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> 41</ul> 42<ul class="navList" id="allclasses_navbar_top"> 43<li><a href="../../../allclasses-noframe.html">All Classes</a></li> 44</ul> 45<div> 46<script type="text/javascript"><!-- 47 allClassesLink = document.getElementById("allclasses_navbar_top"); 48 if(window==top) { 49 allClassesLink.style.display = "block"; 50 } 51 else { 52 allClassesLink.style.display = "none"; 53 } 54 //--> 55</script> 56</div> 57<div> 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> 64</ul> 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> 70</ul> 71</div> 72<a name="skip-navbar_top"> 73<!-- --> 74</a></div> 75<!-- ========= END OF TOP NAVBAR ========= --> 76<!-- ======== START OF CLASS DATA ======== --> 77<div class="header"> 78<div class="subTitle">org.libjpegturbo.turbojpeg</div> 79<h2 title="Interface TJCustomFilter" class="title">Interface TJCustomFilter</h2> 80</div> 81<div class="contentContainer"> 82<div class="description"> 83<ul class="blockList"> 84<li class="blockList"> 85<hr> 86<br> 87<pre>public interface <span class="strong">TJCustomFilter</span></pre> 88<div class="block">Custom filter callback interface</div> 89</li> 90</ul> 91</div> 92<div class="summary"> 93<ul class="blockList"> 94<li class="blockList"> 95<!-- ========== METHOD SUMMARY =========== --> 96<ul class="blockList"> 97<li class="blockList"><a name="method_summary"> 98<!-- --> 99</a> 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> 103<tr> 104<th class="colFirst" scope="col">Modifier and Type</th> 105<th class="colLast" scope="col">Method and Description</th> 106</tr> 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 117 JPEG image.</div> 118</td> 119</tr> 120</table> 121</li> 122</ul> 123</li> 124</ul> 125</div> 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"> 132<!-- --> 133</a> 134<h3>Method Detail</h3> 135<a name="customFilter(java.nio.ShortBuffer, java.awt.Rectangle, java.awt.Rectangle, int, int, org.libjpegturbo.turbojpeg.TJTransform)"> 136<!-- --> 137</a> 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 <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></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><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl> 169</li> 170</ul> 171</li> 172</ul> 173</li> 174</ul> 175</div> 176</div> 177<!-- ========= END OF CLASS DATA ========= --> 178<!-- ======= START OF BOTTOM NAVBAR ====== --> 179<div class="bottomNav"><a name="navbar_bottom"> 180<!-- --> 181</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow"> 182<!-- --> 183</a> 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> 191</ul> 192</div> 193<div class="subNav"> 194<ul class="navList"> 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> 197</ul> 198<ul class="navList"> 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> 201</ul> 202<ul class="navList" id="allclasses_navbar_bottom"> 203<li><a href="../../../allclasses-noframe.html">All Classes</a></li> 204</ul> 205<div> 206<script type="text/javascript"><!-- 207 allClassesLink = document.getElementById("allclasses_navbar_bottom"); 208 if(window==top) { 209 allClassesLink.style.display = "block"; 210 } 211 else { 212 allClassesLink.style.display = "none"; 213 } 214 //--> 215</script> 216</div> 217<div> 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> 224</ul> 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> 230</ul> 231</div> 232<a name="skip-navbar_bottom"> 233<!-- --> 234</a></div> 235<!-- ======== END OF BOTTOM NAVBAR ======= --> 236</body> 237</html> 238