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 try { 11 if (location.href.indexOf('is-external=true') == -1) { 12 parent.document.title="TJCustomFilter"; 13 } 14 } 15 catch(err) { 16 } 17//--> 18</script> 19<noscript> 20<div>JavaScript is disabled on your browser.</div> 21</noscript> 22<!-- ========= START OF TOP NAVBAR ======= --> 23<div class="topNav"><a name="navbar_top"> 24<!-- --> 25</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow"> 26<!-- --> 27</a> 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> 35</ul> 36</div> 37<div class="subNav"> 38<ul class="navList"> 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> 41</ul> 42<ul class="navList"> 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> 45</ul> 46<ul class="navList" id="allclasses_navbar_top"> 47<li><a href="../../../allclasses-noframe.html">All Classes</a></li> 48</ul> 49<div> 50<script type="text/javascript"><!-- 51 allClassesLink = document.getElementById("allclasses_navbar_top"); 52 if(window==top) { 53 allClassesLink.style.display = "block"; 54 } 55 else { 56 allClassesLink.style.display = "none"; 57 } 58 //--> 59</script> 60</div> 61<div> 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> 68</ul> 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> 74</ul> 75</div> 76<a name="skip-navbar_top"> 77<!-- --> 78</a></div> 79<!-- ========= END OF TOP NAVBAR ========= --> 80<!-- ======== START OF CLASS DATA ======== --> 81<div class="header"> 82<div class="subTitle">org.libjpegturbo.turbojpeg</div> 83<h2 title="Interface TJCustomFilter" class="title">Interface TJCustomFilter</h2> 84</div> 85<div class="contentContainer"> 86<div class="description"> 87<ul class="blockList"> 88<li class="blockList"> 89<hr> 90<br> 91<pre>public interface <span class="strong">TJCustomFilter</span></pre> 92<div class="block">Custom filter callback interface</div> 93</li> 94</ul> 95</div> 96<div class="summary"> 97<ul class="blockList"> 98<li class="blockList"> 99<!-- ========== METHOD SUMMARY =========== --> 100<ul class="blockList"> 101<li class="blockList"><a name="method_summary"> 102<!-- --> 103</a> 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> 107<tr> 108<th class="colFirst" scope="col">Modifier and Type</th> 109<th class="colLast" scope="col">Method and Description</th> 110</tr> 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 121 JPEG image.</div> 122</td> 123</tr> 124</table> 125</li> 126</ul> 127</li> 128</ul> 129</div> 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"> 136<!-- --> 137</a> 138<h3>Method Detail</h3> 139<a name="customFilter(java.nio.ShortBuffer, java.awt.Rectangle, java.awt.Rectangle, int, int, org.libjpegturbo.turbojpeg.TJTransform)"> 140<!-- --> 141</a> 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> 173</li> 174</ul> 175</li> 176</ul> 177</li> 178</ul> 179</div> 180</div> 181<!-- ========= END OF CLASS DATA ========= --> 182<!-- ======= START OF BOTTOM NAVBAR ====== --> 183<div class="bottomNav"><a name="navbar_bottom"> 184<!-- --> 185</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow"> 186<!-- --> 187</a> 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> 195</ul> 196</div> 197<div class="subNav"> 198<ul class="navList"> 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> 201</ul> 202<ul class="navList"> 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> 205</ul> 206<ul class="navList" id="allclasses_navbar_bottom"> 207<li><a href="../../../allclasses-noframe.html">All Classes</a></li> 208</ul> 209<div> 210<script type="text/javascript"><!-- 211 allClassesLink = document.getElementById("allclasses_navbar_bottom"); 212 if(window==top) { 213 allClassesLink.style.display = "block"; 214 } 215 else { 216 allClassesLink.style.display = "none"; 217 } 218 //--> 219</script> 220</div> 221<div> 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> 228</ul> 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> 234</ul> 235</div> 236<a name="skip-navbar_bottom"> 237<!-- --> 238</a></div> 239<!-- ======== END OF BOTTOM NAVBAR ======= --> 240</body> 241</html> 242