• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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>TJ</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="TJ";
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>Prev Class</li>
40<li><a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.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/TJ.html" target="_top">Frames</a></li>
44<li><a href="TJ.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:&nbsp;</li>
64<li>Nested&nbsp;|&nbsp;</li>
65<li><a href="#field_summary">Field</a>&nbsp;|&nbsp;</li>
66<li>Constr&nbsp;|&nbsp;</li>
67<li><a href="#method_summary">Method</a></li>
68</ul>
69<ul class="subNavList">
70<li>Detail:&nbsp;</li>
71<li><a href="#field_detail">Field</a>&nbsp;|&nbsp;</li>
72<li>Constr&nbsp;|&nbsp;</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="Class TJ" class="title">Class TJ</h2>
84</div>
85<div class="contentContainer">
86<ul class="inheritance">
87<li>java.lang.Object</li>
88<li>
89<ul class="inheritance">
90<li>org.libjpegturbo.turbojpeg.TJ</li>
91</ul>
92</li>
93</ul>
94<div class="description">
95<ul class="blockList">
96<li class="blockList">
97<hr>
98<br>
99<pre>public final class <span class="strong">TJ</span>
100extends java.lang.Object</pre>
101<div class="block">TurboJPEG utility class (cannot be instantiated)</div>
102</li>
103</ul>
104</div>
105<div class="summary">
106<ul class="blockList">
107<li class="blockList">
108<!-- =========== FIELD SUMMARY =========== -->
109<ul class="blockList">
110<li class="blockList"><a name="field_summary">
111<!--   -->
112</a>
113<h3>Field Summary</h3>
114<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
115<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
116<tr>
117<th class="colFirst" scope="col">Modifier and Type</th>
118<th class="colLast" scope="col">Field and Description</th>
119</tr>
120<tr class="altColor">
121<td class="colFirst"><code>static int</code></td>
122<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#CS_CMYK">CS_CMYK</a></strong></code>
123<div class="block">CMYK colorspace.</div>
124</td>
125</tr>
126<tr class="rowColor">
127<td class="colFirst"><code>static int</code></td>
128<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#CS_GRAY">CS_GRAY</a></strong></code>
129<div class="block">Grayscale colorspace.</div>
130</td>
131</tr>
132<tr class="altColor">
133<td class="colFirst"><code>static int</code></td>
134<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#CS_RGB">CS_RGB</a></strong></code>
135<div class="block">RGB colorspace.</div>
136</td>
137</tr>
138<tr class="rowColor">
139<td class="colFirst"><code>static int</code></td>
140<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#CS_YCbCr">CS_YCbCr</a></strong></code>
141<div class="block">YCbCr colorspace.</div>
142</td>
143</tr>
144<tr class="altColor">
145<td class="colFirst"><code>static int</code></td>
146<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#CS_YCCK">CS_YCCK</a></strong></code>
147<div class="block">YCCK colorspace.</div>
148</td>
149</tr>
150<tr class="rowColor">
151<td class="colFirst"><code>static int</code></td>
152<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#ERR_FATAL">ERR_FATAL</a></strong></code>
153<div class="block">The error was fatal and non-recoverable.</div>
154</td>
155</tr>
156<tr class="altColor">
157<td class="colFirst"><code>static int</code></td>
158<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#ERR_WARNING">ERR_WARNING</a></strong></code>
159<div class="block">The error was non-fatal and recoverable, but the image may still be
160 corrupt.</div>
161</td>
162</tr>
163<tr class="rowColor">
164<td class="colFirst"><code>static int</code></td>
165<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_ACCURATEDCT">FLAG_ACCURATEDCT</a></strong></code>
166<div class="block">Use the most accurate DCT/IDCT algorithm available in the underlying
167 codec.</div>
168</td>
169</tr>
170<tr class="altColor">
171<td class="colFirst"><code>static int</code></td>
172<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP">FLAG_BOTTOMUP</a></strong></code>
173<div class="block">The uncompressed source/destination image is stored in bottom-up (Windows,
174 OpenGL) order, not top-down (X11) order.</div>
175</td>
176</tr>
177<tr class="rowColor">
178<td class="colFirst"><code>static int</code></td>
179<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_FASTDCT">FLAG_FASTDCT</a></strong></code>
180<div class="block">Use the fastest DCT/IDCT algorithm available in the underlying codec.</div>
181</td>
182</tr>
183<tr class="altColor">
184<td class="colFirst"><code>static int</code></td>
185<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_FASTUPSAMPLE">FLAG_FASTUPSAMPLE</a></strong></code>
186<div class="block">When decompressing an image that was compressed using chrominance
187 subsampling, use the fastest chrominance upsampling algorithm available in
188 the underlying codec.</div>
189</td>
190</tr>
191<tr class="rowColor">
192<td class="colFirst"><code>static int</code></td>
193<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_FORCEMMX">FLAG_FORCEMMX</a></strong></code>
194<div class="block"><strong>Deprecated.</strong>&nbsp;</div>
195</td>
196</tr>
197<tr class="altColor">
198<td class="colFirst"><code>static int</code></td>
199<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_FORCESSE">FLAG_FORCESSE</a></strong></code>
200<div class="block"><strong>Deprecated.</strong>&nbsp;</div>
201</td>
202</tr>
203<tr class="rowColor">
204<td class="colFirst"><code>static int</code></td>
205<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_FORCESSE2">FLAG_FORCESSE2</a></strong></code>
206<div class="block"><strong>Deprecated.</strong>&nbsp;</div>
207</td>
208</tr>
209<tr class="altColor">
210<td class="colFirst"><code>static int</code></td>
211<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_FORCESSE3">FLAG_FORCESSE3</a></strong></code>
212<div class="block"><strong>Deprecated.</strong>&nbsp;</div>
213</td>
214</tr>
215<tr class="rowColor">
216<td class="colFirst"><code>static int</code></td>
217<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_PROGRESSIVE">FLAG_PROGRESSIVE</a></strong></code>
218<div class="block">Use progressive entropy coding in JPEG images generated by compression and
219 transform operations.</div>
220</td>
221</tr>
222<tr class="altColor">
223<td class="colFirst"><code>static int</code></td>
224<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_STOPONWARNING">FLAG_STOPONWARNING</a></strong></code>
225<div class="block">Immediately discontinue the current compression/decompression/transform
226 operation if the underlying codec throws a warning (non-fatal error).</div>
227</td>
228</tr>
229<tr class="rowColor">
230<td class="colFirst"><code>static int</code></td>
231<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#NUMCS">NUMCS</a></strong></code>
232<div class="block">The number of JPEG colorspaces</div>
233</td>
234</tr>
235<tr class="altColor">
236<td class="colFirst"><code>static int</code></td>
237<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#NUMERR">NUMERR</a></strong></code>
238<div class="block">The number of error codes</div>
239</td>
240</tr>
241<tr class="rowColor">
242<td class="colFirst"><code>static int</code></td>
243<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#NUMPF">NUMPF</a></strong></code>
244<div class="block">The number of pixel formats</div>
245</td>
246</tr>
247<tr class="altColor">
248<td class="colFirst"><code>static int</code></td>
249<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#NUMSAMP">NUMSAMP</a></strong></code>
250<div class="block">The number of chrominance subsampling options</div>
251</td>
252</tr>
253<tr class="rowColor">
254<td class="colFirst"><code>static int</code></td>
255<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_ABGR">PF_ABGR</a></strong></code>
256<div class="block">ABGR pixel format.</div>
257</td>
258</tr>
259<tr class="altColor">
260<td class="colFirst"><code>static int</code></td>
261<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_ARGB">PF_ARGB</a></strong></code>
262<div class="block">ARGB pixel format.</div>
263</td>
264</tr>
265<tr class="rowColor">
266<td class="colFirst"><code>static int</code></td>
267<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_BGR">PF_BGR</a></strong></code>
268<div class="block">BGR pixel format.</div>
269</td>
270</tr>
271<tr class="altColor">
272<td class="colFirst"><code>static int</code></td>
273<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_BGRA">PF_BGRA</a></strong></code>
274<div class="block">BGRA pixel format.</div>
275</td>
276</tr>
277<tr class="rowColor">
278<td class="colFirst"><code>static int</code></td>
279<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_BGRX">PF_BGRX</a></strong></code>
280<div class="block">BGRX pixel format.</div>
281</td>
282</tr>
283<tr class="altColor">
284<td class="colFirst"><code>static int</code></td>
285<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_CMYK">PF_CMYK</a></strong></code>
286<div class="block">CMYK pixel format.</div>
287</td>
288</tr>
289<tr class="rowColor">
290<td class="colFirst"><code>static int</code></td>
291<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_GRAY">PF_GRAY</a></strong></code>
292<div class="block">Grayscale pixel format.</div>
293</td>
294</tr>
295<tr class="altColor">
296<td class="colFirst"><code>static int</code></td>
297<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_RGB">PF_RGB</a></strong></code>
298<div class="block">RGB pixel format.</div>
299</td>
300</tr>
301<tr class="rowColor">
302<td class="colFirst"><code>static int</code></td>
303<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_RGBA">PF_RGBA</a></strong></code>
304<div class="block">RGBA pixel format.</div>
305</td>
306</tr>
307<tr class="altColor">
308<td class="colFirst"><code>static int</code></td>
309<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_RGBX">PF_RGBX</a></strong></code>
310<div class="block">RGBX pixel format.</div>
311</td>
312</tr>
313<tr class="rowColor">
314<td class="colFirst"><code>static int</code></td>
315<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_XBGR">PF_XBGR</a></strong></code>
316<div class="block">XBGR pixel format.</div>
317</td>
318</tr>
319<tr class="altColor">
320<td class="colFirst"><code>static int</code></td>
321<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_XRGB">PF_XRGB</a></strong></code>
322<div class="block">XRGB pixel format.</div>
323</td>
324</tr>
325<tr class="rowColor">
326<td class="colFirst"><code>static int</code></td>
327<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_411">SAMP_411</a></strong></code>
328<div class="block">4:1:1 chrominance subsampling.</div>
329</td>
330</tr>
331<tr class="altColor">
332<td class="colFirst"><code>static int</code></td>
333<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_420">SAMP_420</a></strong></code>
334<div class="block">4:2:0 chrominance subsampling.</div>
335</td>
336</tr>
337<tr class="rowColor">
338<td class="colFirst"><code>static int</code></td>
339<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_422">SAMP_422</a></strong></code>
340<div class="block">4:2:2 chrominance subsampling.</div>
341</td>
342</tr>
343<tr class="altColor">
344<td class="colFirst"><code>static int</code></td>
345<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_440">SAMP_440</a></strong></code>
346<div class="block">4:4:0 chrominance subsampling.</div>
347</td>
348</tr>
349<tr class="rowColor">
350<td class="colFirst"><code>static int</code></td>
351<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_444">SAMP_444</a></strong></code>
352<div class="block">4:4:4 chrominance subsampling (no chrominance subsampling).</div>
353</td>
354</tr>
355<tr class="altColor">
356<td class="colFirst"><code>static int</code></td>
357<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_GRAY">SAMP_GRAY</a></strong></code>
358<div class="block">Grayscale.</div>
359</td>
360</tr>
361</table>
362</li>
363</ul>
364<!-- ========== METHOD SUMMARY =========== -->
365<ul class="blockList">
366<li class="blockList"><a name="method_summary">
367<!--   -->
368</a>
369<h3>Method Summary</h3>
370<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
371<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
372<tr>
373<th class="colFirst" scope="col">Modifier and Type</th>
374<th class="colLast" scope="col">Method and Description</th>
375</tr>
376<tr class="altColor">
377<td class="colFirst"><code>static int</code></td>
378<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#bufSize(int,%20int,%20int)">bufSize</a></strong>(int&nbsp;width,
379       int&nbsp;height,
380       int&nbsp;jpegSubsamp)</code>
381<div class="block">Returns the maximum size of the buffer (in bytes) required to hold a JPEG
382 image with the given width, height, and level of chrominance subsampling.</div>
383</td>
384</tr>
385<tr class="rowColor">
386<td class="colFirst"><code>static int</code></td>
387<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#bufSizeYUV(int,%20int,%20int)">bufSizeYUV</a></strong>(int&nbsp;width,
388          int&nbsp;height,
389          int&nbsp;subsamp)</code>
390<div class="block"><strong>Deprecated.</strong>&nbsp;
391<div class="block"><i>Use <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#bufSizeYUV(int,%20int,%20int,%20int)"><code>bufSizeYUV(int, int, int, int)</code></a> instead.</i></div>
392</div>
393</td>
394</tr>
395<tr class="altColor">
396<td class="colFirst"><code>static int</code></td>
397<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#bufSizeYUV(int,%20int,%20int,%20int)">bufSizeYUV</a></strong>(int&nbsp;width,
398          int&nbsp;pad,
399          int&nbsp;height,
400          int&nbsp;subsamp)</code>
401<div class="block">Returns the size of the buffer (in bytes) required to hold a YUV planar
402 image with the given width, height, and level of chrominance subsampling.</div>
403</td>
404</tr>
405<tr class="rowColor">
406<td class="colFirst"><code>static int</code></td>
407<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#getAlphaOffset(int)">getAlphaOffset</a></strong>(int&nbsp;pixelFormat)</code>
408<div class="block">For the given pixel format, returns the number of bytes that the alpha
409 component is offset from the start of the pixel.</div>
410</td>
411</tr>
412<tr class="altColor">
413<td class="colFirst"><code>static int</code></td>
414<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#getBlueOffset(int)">getBlueOffset</a></strong>(int&nbsp;pixelFormat)</code>
415<div class="block">For the given pixel format, returns the number of bytes that the blue
416 component is offset from the start of the pixel.</div>
417</td>
418</tr>
419<tr class="rowColor">
420<td class="colFirst"><code>static int</code></td>
421<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#getGreenOffset(int)">getGreenOffset</a></strong>(int&nbsp;pixelFormat)</code>
422<div class="block">For the given pixel format, returns the number of bytes that the green
423 component is offset from the start of the pixel.</div>
424</td>
425</tr>
426<tr class="altColor">
427<td class="colFirst"><code>static int</code></td>
428<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#getMCUHeight(int)">getMCUHeight</a></strong>(int&nbsp;subsamp)</code>
429<div class="block">Returns the MCU block height for the given level of chrominance
430 subsampling.</div>
431</td>
432</tr>
433<tr class="rowColor">
434<td class="colFirst"><code>static int</code></td>
435<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#getMCUWidth(int)">getMCUWidth</a></strong>(int&nbsp;subsamp)</code>
436<div class="block">Returns the MCU block width for the given level of chrominance
437 subsampling.</div>
438</td>
439</tr>
440<tr class="altColor">
441<td class="colFirst"><code>static int</code></td>
442<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#getPixelSize(int)">getPixelSize</a></strong>(int&nbsp;pixelFormat)</code>
443<div class="block">Returns the pixel size (in bytes) for the given pixel format.</div>
444</td>
445</tr>
446<tr class="rowColor">
447<td class="colFirst"><code>static int</code></td>
448<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#getRedOffset(int)">getRedOffset</a></strong>(int&nbsp;pixelFormat)</code>
449<div class="block">For the given pixel format, returns the number of bytes that the red
450 component is offset from the start of the pixel.</div>
451</td>
452</tr>
453<tr class="altColor">
454<td class="colFirst"><code>static <a href="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg">TJScalingFactor</a>[]</code></td>
455<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#getScalingFactors()">getScalingFactors</a></strong>()</code>
456<div class="block">Returns a list of fractional scaling factors that the JPEG decompressor in
457 this implementation of TurboJPEG supports.</div>
458</td>
459</tr>
460<tr class="rowColor">
461<td class="colFirst"><code>static int</code></td>
462<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#planeHeight(int,%20int,%20int)">planeHeight</a></strong>(int&nbsp;componentID,
463           int&nbsp;height,
464           int&nbsp;subsamp)</code>
465<div class="block">Returns the plane height of a YUV image plane with the given parameters.</div>
466</td>
467</tr>
468<tr class="altColor">
469<td class="colFirst"><code>static int</code></td>
470<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#planeSizeYUV(int,%20int,%20int,%20int,%20int)">planeSizeYUV</a></strong>(int&nbsp;componentID,
471            int&nbsp;width,
472            int&nbsp;stride,
473            int&nbsp;height,
474            int&nbsp;subsamp)</code>
475<div class="block">Returns the size of the buffer (in bytes) required to hold a YUV image
476 plane with the given parameters.</div>
477</td>
478</tr>
479<tr class="rowColor">
480<td class="colFirst"><code>static int</code></td>
481<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#planeWidth(int,%20int,%20int)">planeWidth</a></strong>(int&nbsp;componentID,
482          int&nbsp;width,
483          int&nbsp;subsamp)</code>
484<div class="block">Returns the plane width of a YUV image plane with the given parameters.</div>
485</td>
486</tr>
487</table>
488<ul class="blockList">
489<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
490<!--   -->
491</a>
492<h3>Methods inherited from class&nbsp;java.lang.Object</h3>
493<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
494</ul>
495</li>
496</ul>
497</li>
498</ul>
499</div>
500<div class="details">
501<ul class="blockList">
502<li class="blockList">
503<!-- ============ FIELD DETAIL =========== -->
504<ul class="blockList">
505<li class="blockList"><a name="field_detail">
506<!--   -->
507</a>
508<h3>Field Detail</h3>
509<a name="NUMSAMP">
510<!--   -->
511</a>
512<ul class="blockList">
513<li class="blockList">
514<h4>NUMSAMP</h4>
515<pre>public static final&nbsp;int NUMSAMP</pre>
516<div class="block">The number of chrominance subsampling options</div>
517<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.NUMSAMP">Constant Field Values</a></dd></dl>
518</li>
519</ul>
520<a name="SAMP_444">
521<!--   -->
522</a>
523<ul class="blockList">
524<li class="blockList">
525<h4>SAMP_444</h4>
526<pre>public static final&nbsp;int SAMP_444</pre>
527<div class="block">4:4:4 chrominance subsampling (no chrominance subsampling).  The JPEG
528 or YUV image will contain one chrominance component for every pixel in the
529 source image.</div>
530<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.SAMP_444">Constant Field Values</a></dd></dl>
531</li>
532</ul>
533<a name="SAMP_422">
534<!--   -->
535</a>
536<ul class="blockList">
537<li class="blockList">
538<h4>SAMP_422</h4>
539<pre>public static final&nbsp;int SAMP_422</pre>
540<div class="block">4:2:2 chrominance subsampling.  The JPEG or YUV image will contain one
541 chrominance component for every 2x1 block of pixels in the source image.</div>
542<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.SAMP_422">Constant Field Values</a></dd></dl>
543</li>
544</ul>
545<a name="SAMP_420">
546<!--   -->
547</a>
548<ul class="blockList">
549<li class="blockList">
550<h4>SAMP_420</h4>
551<pre>public static final&nbsp;int SAMP_420</pre>
552<div class="block">4:2:0 chrominance subsampling.  The JPEG or YUV image will contain one
553 chrominance component for every 2x2 block of pixels in the source image.</div>
554<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.SAMP_420">Constant Field Values</a></dd></dl>
555</li>
556</ul>
557<a name="SAMP_GRAY">
558<!--   -->
559</a>
560<ul class="blockList">
561<li class="blockList">
562<h4>SAMP_GRAY</h4>
563<pre>public static final&nbsp;int SAMP_GRAY</pre>
564<div class="block">Grayscale.  The JPEG or YUV image will contain no chrominance components.</div>
565<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.SAMP_GRAY">Constant Field Values</a></dd></dl>
566</li>
567</ul>
568<a name="SAMP_440">
569<!--   -->
570</a>
571<ul class="blockList">
572<li class="blockList">
573<h4>SAMP_440</h4>
574<pre>public static final&nbsp;int SAMP_440</pre>
575<div class="block">4:4:0 chrominance subsampling.  The JPEG or YUV image will contain one
576 chrominance component for every 1x2 block of pixels in the source image.
577 Note that 4:4:0 subsampling is not fully accelerated in libjpeg-turbo.</div>
578<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.SAMP_440">Constant Field Values</a></dd></dl>
579</li>
580</ul>
581<a name="SAMP_411">
582<!--   -->
583</a>
584<ul class="blockList">
585<li class="blockList">
586<h4>SAMP_411</h4>
587<pre>public static final&nbsp;int SAMP_411</pre>
588<div class="block">4:1:1 chrominance subsampling.  The JPEG or YUV image will contain one
589 chrominance component for every 4x1 block of pixels in the source image.
590 JPEG images compressed with 4:1:1 subsampling will be almost exactly the
591 same size as those compressed with 4:2:0 subsampling, and in the
592 aggregate, both subsampling methods produce approximately the same
593 perceptual quality.  However, 4:1:1 is better able to reproduce sharp
594 horizontal features.  Note that 4:1:1 subsampling is not fully accelerated
595 in libjpeg-turbo.</div>
596<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.SAMP_411">Constant Field Values</a></dd></dl>
597</li>
598</ul>
599<a name="NUMPF">
600<!--   -->
601</a>
602<ul class="blockList">
603<li class="blockList">
604<h4>NUMPF</h4>
605<pre>public static final&nbsp;int NUMPF</pre>
606<div class="block">The number of pixel formats</div>
607<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.NUMPF">Constant Field Values</a></dd></dl>
608</li>
609</ul>
610<a name="PF_RGB">
611<!--   -->
612</a>
613<ul class="blockList">
614<li class="blockList">
615<h4>PF_RGB</h4>
616<pre>public static final&nbsp;int PF_RGB</pre>
617<div class="block">RGB pixel format.  The red, green, and blue components in the image are
618 stored in 3-byte pixels in the order R, G, B from lowest to highest byte
619 address within each pixel.</div>
620<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PF_RGB">Constant Field Values</a></dd></dl>
621</li>
622</ul>
623<a name="PF_BGR">
624<!--   -->
625</a>
626<ul class="blockList">
627<li class="blockList">
628<h4>PF_BGR</h4>
629<pre>public static final&nbsp;int PF_BGR</pre>
630<div class="block">BGR pixel format.  The red, green, and blue components in the image are
631 stored in 3-byte pixels in the order B, G, R from lowest to highest byte
632 address within each pixel.</div>
633<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PF_BGR">Constant Field Values</a></dd></dl>
634</li>
635</ul>
636<a name="PF_RGBX">
637<!--   -->
638</a>
639<ul class="blockList">
640<li class="blockList">
641<h4>PF_RGBX</h4>
642<pre>public static final&nbsp;int PF_RGBX</pre>
643<div class="block">RGBX pixel format.  The red, green, and blue components in the image are
644 stored in 4-byte pixels in the order R, G, B from lowest to highest byte
645 address within each pixel.  The X component is ignored when compressing
646 and undefined when decompressing.</div>
647<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PF_RGBX">Constant Field Values</a></dd></dl>
648</li>
649</ul>
650<a name="PF_BGRX">
651<!--   -->
652</a>
653<ul class="blockList">
654<li class="blockList">
655<h4>PF_BGRX</h4>
656<pre>public static final&nbsp;int PF_BGRX</pre>
657<div class="block">BGRX pixel format.  The red, green, and blue components in the image are
658 stored in 4-byte pixels in the order B, G, R from lowest to highest byte
659 address within each pixel.  The X component is ignored when compressing
660 and undefined when decompressing.</div>
661<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PF_BGRX">Constant Field Values</a></dd></dl>
662</li>
663</ul>
664<a name="PF_XBGR">
665<!--   -->
666</a>
667<ul class="blockList">
668<li class="blockList">
669<h4>PF_XBGR</h4>
670<pre>public static final&nbsp;int PF_XBGR</pre>
671<div class="block">XBGR pixel format.  The red, green, and blue components in the image are
672 stored in 4-byte pixels in the order R, G, B from highest to lowest byte
673 address within each pixel.  The X component is ignored when compressing
674 and undefined when decompressing.</div>
675<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PF_XBGR">Constant Field Values</a></dd></dl>
676</li>
677</ul>
678<a name="PF_XRGB">
679<!--   -->
680</a>
681<ul class="blockList">
682<li class="blockList">
683<h4>PF_XRGB</h4>
684<pre>public static final&nbsp;int PF_XRGB</pre>
685<div class="block">XRGB pixel format.  The red, green, and blue components in the image are
686 stored in 4-byte pixels in the order B, G, R from highest to lowest byte
687 address within each pixel.  The X component is ignored when compressing
688 and undefined when decompressing.</div>
689<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PF_XRGB">Constant Field Values</a></dd></dl>
690</li>
691</ul>
692<a name="PF_GRAY">
693<!--   -->
694</a>
695<ul class="blockList">
696<li class="blockList">
697<h4>PF_GRAY</h4>
698<pre>public static final&nbsp;int PF_GRAY</pre>
699<div class="block">Grayscale pixel format.  Each 1-byte pixel represents a luminance
700 (brightness) level from 0 to 255.</div>
701<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PF_GRAY">Constant Field Values</a></dd></dl>
702</li>
703</ul>
704<a name="PF_RGBA">
705<!--   -->
706</a>
707<ul class="blockList">
708<li class="blockList">
709<h4>PF_RGBA</h4>
710<pre>public static final&nbsp;int PF_RGBA</pre>
711<div class="block">RGBA pixel format.  This is the same as <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_RGBX"><code>PF_RGBX</code></a>, except that when
712 decompressing, the X byte is guaranteed to be 0xFF, which can be
713 interpreted as an opaque alpha channel.</div>
714<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PF_RGBA">Constant Field Values</a></dd></dl>
715</li>
716</ul>
717<a name="PF_BGRA">
718<!--   -->
719</a>
720<ul class="blockList">
721<li class="blockList">
722<h4>PF_BGRA</h4>
723<pre>public static final&nbsp;int PF_BGRA</pre>
724<div class="block">BGRA pixel format.  This is the same as <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_BGRX"><code>PF_BGRX</code></a>, except that when
725 decompressing, the X byte is guaranteed to be 0xFF, which can be
726 interpreted as an opaque alpha channel.</div>
727<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PF_BGRA">Constant Field Values</a></dd></dl>
728</li>
729</ul>
730<a name="PF_ABGR">
731<!--   -->
732</a>
733<ul class="blockList">
734<li class="blockList">
735<h4>PF_ABGR</h4>
736<pre>public static final&nbsp;int PF_ABGR</pre>
737<div class="block">ABGR pixel format.  This is the same as <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_XBGR"><code>PF_XBGR</code></a>, except that when
738 decompressing, the X byte is guaranteed to be 0xFF, which can be
739 interpreted as an opaque alpha channel.</div>
740<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PF_ABGR">Constant Field Values</a></dd></dl>
741</li>
742</ul>
743<a name="PF_ARGB">
744<!--   -->
745</a>
746<ul class="blockList">
747<li class="blockList">
748<h4>PF_ARGB</h4>
749<pre>public static final&nbsp;int PF_ARGB</pre>
750<div class="block">ARGB pixel format.  This is the same as <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_XRGB"><code>PF_XRGB</code></a>, except that when
751 decompressing, the X byte is guaranteed to be 0xFF, which can be
752 interpreted as an opaque alpha channel.</div>
753<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PF_ARGB">Constant Field Values</a></dd></dl>
754</li>
755</ul>
756<a name="PF_CMYK">
757<!--   -->
758</a>
759<ul class="blockList">
760<li class="blockList">
761<h4>PF_CMYK</h4>
762<pre>public static final&nbsp;int PF_CMYK</pre>
763<div class="block">CMYK pixel format.  Unlike RGB, which is an additive color model used
764 primarily for display, CMYK (Cyan/Magenta/Yellow/Key) is a subtractive
765 color model used primarily for printing.  In the CMYK color model, the
766 value of each color component typically corresponds to an amount of cyan,
767 magenta, yellow, or black ink that is applied to a white background.  In
768 order to convert between CMYK and RGB, it is necessary to use a color
769 management system (CMS.)  A CMS will attempt to map colors within the
770 printer's gamut to perceptually similar colors in the display's gamut and
771 vice versa, but the mapping is typically not 1:1 or reversible, nor can it
772 be defined with a simple formula.  Thus, such a conversion is out of scope
773 for a codec library.  However, the TurboJPEG API allows for compressing
774 CMYK pixels into a YCCK JPEG image (see <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#CS_YCCK"><code>CS_YCCK</code></a>) and
775 decompressing YCCK JPEG images into CMYK pixels.</div>
776<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PF_CMYK">Constant Field Values</a></dd></dl>
777</li>
778</ul>
779<a name="NUMCS">
780<!--   -->
781</a>
782<ul class="blockList">
783<li class="blockList">
784<h4>NUMCS</h4>
785<pre>public static final&nbsp;int NUMCS</pre>
786<div class="block">The number of JPEG colorspaces</div>
787<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.NUMCS">Constant Field Values</a></dd></dl>
788</li>
789</ul>
790<a name="CS_RGB">
791<!--   -->
792</a>
793<ul class="blockList">
794<li class="blockList">
795<h4>CS_RGB</h4>
796<pre>public static final&nbsp;int CS_RGB</pre>
797<div class="block">RGB colorspace.  When compressing the JPEG image, the R, G, and B
798 components in the source image are reordered into image planes, but no
799 colorspace conversion or subsampling is performed.  RGB JPEG images can be
800 decompressed to any of the extended RGB pixel formats or grayscale, but
801 they cannot be decompressed to YUV images.</div>
802<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.CS_RGB">Constant Field Values</a></dd></dl>
803</li>
804</ul>
805<a name="CS_YCbCr">
806<!--   -->
807</a>
808<ul class="blockList">
809<li class="blockList">
810<h4>CS_YCbCr</h4>
811<pre>public static final&nbsp;int CS_YCbCr</pre>
812<div class="block">YCbCr colorspace.  YCbCr is not an absolute colorspace but rather a
813 mathematical transformation of RGB designed solely for storage and
814 transmission.  YCbCr images must be converted to RGB before they can
815 actually be displayed.  In the YCbCr colorspace, the Y (luminance)
816 component represents the black & white portion of the original image, and
817 the Cb and Cr (chrominance) components represent the color portion of the
818 original image.  Originally, the analog equivalent of this transformation
819 allowed the same signal to drive both black & white and color televisions,
820 but JPEG images use YCbCr primarily because it allows the color data to be
821 optionally subsampled for the purposes of reducing bandwidth or disk
822 space.  YCbCr is the most common JPEG colorspace, and YCbCr JPEG images
823 can be compressed from and decompressed to any of the extended RGB pixel
824 formats or grayscale, or they can be decompressed to YUV planar images.</div>
825<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.CS_YCbCr">Constant Field Values</a></dd></dl>
826</li>
827</ul>
828<a name="CS_GRAY">
829<!--   -->
830</a>
831<ul class="blockList">
832<li class="blockList">
833<h4>CS_GRAY</h4>
834<pre>public static final&nbsp;int CS_GRAY</pre>
835<div class="block">Grayscale colorspace.  The JPEG image retains only the luminance data (Y
836 component), and any color data from the source image is discarded.
837 Grayscale JPEG images can be compressed from and decompressed to any of
838 the extended RGB pixel formats or grayscale, or they can be decompressed
839 to YUV planar images.</div>
840<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.CS_GRAY">Constant Field Values</a></dd></dl>
841</li>
842</ul>
843<a name="CS_CMYK">
844<!--   -->
845</a>
846<ul class="blockList">
847<li class="blockList">
848<h4>CS_CMYK</h4>
849<pre>public static final&nbsp;int CS_CMYK</pre>
850<div class="block">CMYK colorspace.  When compressing the JPEG image, the C, M, Y, and K
851 components in the source image are reordered into image planes, but no
852 colorspace conversion or subsampling is performed.  CMYK JPEG images can
853 only be decompressed to CMYK pixels.</div>
854<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.CS_CMYK">Constant Field Values</a></dd></dl>
855</li>
856</ul>
857<a name="CS_YCCK">
858<!--   -->
859</a>
860<ul class="blockList">
861<li class="blockList">
862<h4>CS_YCCK</h4>
863<pre>public static final&nbsp;int CS_YCCK</pre>
864<div class="block">YCCK colorspace.  YCCK (AKA "YCbCrK") is not an absolute colorspace but
865 rather a mathematical transformation of CMYK designed solely for storage
866 and transmission.  It is to CMYK as YCbCr is to RGB.  CMYK pixels can be
867 reversibly transformed into YCCK, and as with YCbCr, the chrominance
868 components in the YCCK pixels can be subsampled without incurring major
869 perceptual loss.  YCCK JPEG images can only be compressed from and
870 decompressed to CMYK pixels.</div>
871<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.CS_YCCK">Constant Field Values</a></dd></dl>
872</li>
873</ul>
874<a name="FLAG_BOTTOMUP">
875<!--   -->
876</a>
877<ul class="blockList">
878<li class="blockList">
879<h4>FLAG_BOTTOMUP</h4>
880<pre>public static final&nbsp;int FLAG_BOTTOMUP</pre>
881<div class="block">The uncompressed source/destination image is stored in bottom-up (Windows,
882 OpenGL) order, not top-down (X11) order.</div>
883<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.FLAG_BOTTOMUP">Constant Field Values</a></dd></dl>
884</li>
885</ul>
886<a name="FLAG_FORCEMMX">
887<!--   -->
888</a>
889<ul class="blockList">
890<li class="blockList">
891<h4>FLAG_FORCEMMX</h4>
892<pre>@Deprecated
893public static final&nbsp;int FLAG_FORCEMMX</pre>
894<div class="block"><span class="strong">Deprecated.</span>&nbsp;</div>
895<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.FLAG_FORCEMMX">Constant Field Values</a></dd></dl>
896</li>
897</ul>
898<a name="FLAG_FORCESSE">
899<!--   -->
900</a>
901<ul class="blockList">
902<li class="blockList">
903<h4>FLAG_FORCESSE</h4>
904<pre>@Deprecated
905public static final&nbsp;int FLAG_FORCESSE</pre>
906<div class="block"><span class="strong">Deprecated.</span>&nbsp;</div>
907<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.FLAG_FORCESSE">Constant Field Values</a></dd></dl>
908</li>
909</ul>
910<a name="FLAG_FORCESSE2">
911<!--   -->
912</a>
913<ul class="blockList">
914<li class="blockList">
915<h4>FLAG_FORCESSE2</h4>
916<pre>@Deprecated
917public static final&nbsp;int FLAG_FORCESSE2</pre>
918<div class="block"><span class="strong">Deprecated.</span>&nbsp;</div>
919<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.FLAG_FORCESSE2">Constant Field Values</a></dd></dl>
920</li>
921</ul>
922<a name="FLAG_FORCESSE3">
923<!--   -->
924</a>
925<ul class="blockList">
926<li class="blockList">
927<h4>FLAG_FORCESSE3</h4>
928<pre>@Deprecated
929public static final&nbsp;int FLAG_FORCESSE3</pre>
930<div class="block"><span class="strong">Deprecated.</span>&nbsp;</div>
931<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.FLAG_FORCESSE3">Constant Field Values</a></dd></dl>
932</li>
933</ul>
934<a name="FLAG_FASTUPSAMPLE">
935<!--   -->
936</a>
937<ul class="blockList">
938<li class="blockList">
939<h4>FLAG_FASTUPSAMPLE</h4>
940<pre>public static final&nbsp;int FLAG_FASTUPSAMPLE</pre>
941<div class="block">When decompressing an image that was compressed using chrominance
942 subsampling, use the fastest chrominance upsampling algorithm available in
943 the underlying codec.  The default is to use smooth upsampling, which
944 creates a smooth transition between neighboring chrominance components in
945 order to reduce upsampling artifacts in the decompressed image.</div>
946<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.FLAG_FASTUPSAMPLE">Constant Field Values</a></dd></dl>
947</li>
948</ul>
949<a name="FLAG_FASTDCT">
950<!--   -->
951</a>
952<ul class="blockList">
953<li class="blockList">
954<h4>FLAG_FASTDCT</h4>
955<pre>public static final&nbsp;int FLAG_FASTDCT</pre>
956<div class="block">Use the fastest DCT/IDCT algorithm available in the underlying codec.  The
957 default if this flag is not specified is implementation-specific.  For
958 example, the implementation of TurboJPEG for libjpeg[-turbo] uses the fast
959 algorithm by default when compressing, because this has been shown to have
960 only a very slight effect on accuracy, but it uses the accurate algorithm
961 when decompressing, because this has been shown to have a larger effect.</div>
962<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.FLAG_FASTDCT">Constant Field Values</a></dd></dl>
963</li>
964</ul>
965<a name="FLAG_ACCURATEDCT">
966<!--   -->
967</a>
968<ul class="blockList">
969<li class="blockList">
970<h4>FLAG_ACCURATEDCT</h4>
971<pre>public static final&nbsp;int FLAG_ACCURATEDCT</pre>
972<div class="block">Use the most accurate DCT/IDCT algorithm available in the underlying
973 codec.  The default if this flag is not specified is
974 implementation-specific.  For example, the implementation of TurboJPEG for
975 libjpeg[-turbo] uses the fast algorithm by default when compressing,
976 because this has been shown to have only a very slight effect on accuracy,
977 but it uses the accurate algorithm when decompressing, because this has
978 been shown to have a larger effect.</div>
979<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.FLAG_ACCURATEDCT">Constant Field Values</a></dd></dl>
980</li>
981</ul>
982<a name="FLAG_STOPONWARNING">
983<!--   -->
984</a>
985<ul class="blockList">
986<li class="blockList">
987<h4>FLAG_STOPONWARNING</h4>
988<pre>public static final&nbsp;int FLAG_STOPONWARNING</pre>
989<div class="block">Immediately discontinue the current compression/decompression/transform
990 operation if the underlying codec throws a warning (non-fatal error).  The
991 default behavior is to allow the operation to complete unless a fatal
992 error is encountered.
993 <p>
994 NOTE: due to the design of the TurboJPEG Java API, only certain methods
995 (specifically, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><code>TJDecompressor.decompress*()</code></a> methods
996 with a void return type) will complete and leave the output image in a
997 fully recoverable state after a non-fatal error occurs.</div>
998<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.FLAG_STOPONWARNING">Constant Field Values</a></dd></dl>
999</li>
1000</ul>
1001<a name="FLAG_PROGRESSIVE">
1002<!--   -->
1003</a>
1004<ul class="blockList">
1005<li class="blockList">
1006<h4>FLAG_PROGRESSIVE</h4>
1007<pre>public static final&nbsp;int FLAG_PROGRESSIVE</pre>
1008<div class="block">Use progressive entropy coding in JPEG images generated by compression and
1009 transform operations.  Progressive entropy coding will generally improve
1010 compression relative to baseline entropy coding (the default), but it will
1011 reduce compression and decompression performance considerably.</div>
1012<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.FLAG_PROGRESSIVE">Constant Field Values</a></dd></dl>
1013</li>
1014</ul>
1015<a name="NUMERR">
1016<!--   -->
1017</a>
1018<ul class="blockList">
1019<li class="blockList">
1020<h4>NUMERR</h4>
1021<pre>public static final&nbsp;int NUMERR</pre>
1022<div class="block">The number of error codes</div>
1023<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.NUMERR">Constant Field Values</a></dd></dl>
1024</li>
1025</ul>
1026<a name="ERR_WARNING">
1027<!--   -->
1028</a>
1029<ul class="blockList">
1030<li class="blockList">
1031<h4>ERR_WARNING</h4>
1032<pre>public static final&nbsp;int ERR_WARNING</pre>
1033<div class="block">The error was non-fatal and recoverable, but the image may still be
1034 corrupt.
1035 <p>
1036 NOTE: due to the design of the TurboJPEG Java API, only certain methods
1037 (specifically, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><code>TJDecompressor.decompress*()</code></a> methods
1038 with a void return type) will complete and leave the output image in a
1039 fully recoverable state after a non-fatal error occurs.</div>
1040<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.ERR_WARNING">Constant Field Values</a></dd></dl>
1041</li>
1042</ul>
1043<a name="ERR_FATAL">
1044<!--   -->
1045</a>
1046<ul class="blockListLast">
1047<li class="blockList">
1048<h4>ERR_FATAL</h4>
1049<pre>public static final&nbsp;int ERR_FATAL</pre>
1050<div class="block">The error was fatal and non-recoverable.</div>
1051<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.ERR_FATAL">Constant Field Values</a></dd></dl>
1052</li>
1053</ul>
1054</li>
1055</ul>
1056<!-- ============ METHOD DETAIL ========== -->
1057<ul class="blockList">
1058<li class="blockList"><a name="method_detail">
1059<!--   -->
1060</a>
1061<h3>Method Detail</h3>
1062<a name="getMCUWidth(int)">
1063<!--   -->
1064</a>
1065<ul class="blockList">
1066<li class="blockList">
1067<h4>getMCUWidth</h4>
1068<pre>public static&nbsp;int&nbsp;getMCUWidth(int&nbsp;subsamp)</pre>
1069<div class="block">Returns the MCU block width for the given level of chrominance
1070 subsampling.</div>
1071<dl><dt><span class="strong">Parameters:</span></dt><dd><code>subsamp</code> - the level of chrominance subsampling (one of
1072 <code>SAMP_*</code>)</dd>
1073<dt><span class="strong">Returns:</span></dt><dd>the MCU block width for the given level of chrominance
1074 subsampling.</dd></dl>
1075</li>
1076</ul>
1077<a name="getMCUHeight(int)">
1078<!--   -->
1079</a>
1080<ul class="blockList">
1081<li class="blockList">
1082<h4>getMCUHeight</h4>
1083<pre>public static&nbsp;int&nbsp;getMCUHeight(int&nbsp;subsamp)</pre>
1084<div class="block">Returns the MCU block height for the given level of chrominance
1085 subsampling.</div>
1086<dl><dt><span class="strong">Parameters:</span></dt><dd><code>subsamp</code> - the level of chrominance subsampling (one of
1087 <code>SAMP_*</code>)</dd>
1088<dt><span class="strong">Returns:</span></dt><dd>the MCU block height for the given level of chrominance
1089 subsampling.</dd></dl>
1090</li>
1091</ul>
1092<a name="getPixelSize(int)">
1093<!--   -->
1094</a>
1095<ul class="blockList">
1096<li class="blockList">
1097<h4>getPixelSize</h4>
1098<pre>public static&nbsp;int&nbsp;getPixelSize(int&nbsp;pixelFormat)</pre>
1099<div class="block">Returns the pixel size (in bytes) for the given pixel format.</div>
1100<dl><dt><span class="strong">Parameters:</span></dt><dd><code>pixelFormat</code> - the pixel format (one of <code>PF_*</code>)</dd>
1101<dt><span class="strong">Returns:</span></dt><dd>the pixel size (in bytes) for the given pixel format.</dd></dl>
1102</li>
1103</ul>
1104<a name="getRedOffset(int)">
1105<!--   -->
1106</a>
1107<ul class="blockList">
1108<li class="blockList">
1109<h4>getRedOffset</h4>
1110<pre>public static&nbsp;int&nbsp;getRedOffset(int&nbsp;pixelFormat)</pre>
1111<div class="block">For the given pixel format, returns the number of bytes that the red
1112 component is offset from the start of the pixel.  For instance, if a pixel
1113 of format <code>TJ.PF_BGRX</code> is stored in <code>char pixel[]</code>,
1114 then the red component will be
1115 <code>pixel[TJ.getRedOffset(TJ.PF_BGRX)]</code>.</div>
1116<dl><dt><span class="strong">Parameters:</span></dt><dd><code>pixelFormat</code> - the pixel format (one of <code>PF_*</code>)</dd>
1117<dt><span class="strong">Returns:</span></dt><dd>the red offset for the given pixel format, or -1 if the pixel
1118 format does not have a red component.</dd></dl>
1119</li>
1120</ul>
1121<a name="getGreenOffset(int)">
1122<!--   -->
1123</a>
1124<ul class="blockList">
1125<li class="blockList">
1126<h4>getGreenOffset</h4>
1127<pre>public static&nbsp;int&nbsp;getGreenOffset(int&nbsp;pixelFormat)</pre>
1128<div class="block">For the given pixel format, returns the number of bytes that the green
1129 component is offset from the start of the pixel.  For instance, if a pixel
1130 of format <code>TJ.PF_BGRX</code> is stored in <code>char pixel[]</code>,
1131 then the green component will be
1132 <code>pixel[TJ.getGreenOffset(TJ.PF_BGRX)]</code>.</div>
1133<dl><dt><span class="strong">Parameters:</span></dt><dd><code>pixelFormat</code> - the pixel format (one of <code>PF_*</code>)</dd>
1134<dt><span class="strong">Returns:</span></dt><dd>the green offset for the given pixel format, or -1 if the pixel
1135 format does not have a green component.</dd></dl>
1136</li>
1137</ul>
1138<a name="getBlueOffset(int)">
1139<!--   -->
1140</a>
1141<ul class="blockList">
1142<li class="blockList">
1143<h4>getBlueOffset</h4>
1144<pre>public static&nbsp;int&nbsp;getBlueOffset(int&nbsp;pixelFormat)</pre>
1145<div class="block">For the given pixel format, returns the number of bytes that the blue
1146 component is offset from the start of the pixel.  For instance, if a pixel
1147 of format <code>TJ.PF_BGRX</code> is stored in <code>char pixel[]</code>,
1148 then the blue component will be
1149 <code>pixel[TJ.getBlueOffset(TJ.PF_BGRX)]</code>.</div>
1150<dl><dt><span class="strong">Parameters:</span></dt><dd><code>pixelFormat</code> - the pixel format (one of <code>PF_*</code>)</dd>
1151<dt><span class="strong">Returns:</span></dt><dd>the blue offset for the given pixel format, or -1 if the pixel
1152 format does not have a blue component.</dd></dl>
1153</li>
1154</ul>
1155<a name="getAlphaOffset(int)">
1156<!--   -->
1157</a>
1158<ul class="blockList">
1159<li class="blockList">
1160<h4>getAlphaOffset</h4>
1161<pre>public static&nbsp;int&nbsp;getAlphaOffset(int&nbsp;pixelFormat)</pre>
1162<div class="block">For the given pixel format, returns the number of bytes that the alpha
1163 component is offset from the start of the pixel.  For instance, if a pixel
1164 of format <code>TJ.PF_BGRA</code> is stored in <code>char pixel[]</code>,
1165 then the alpha component will be
1166 <code>pixel[TJ.getAlphaOffset(TJ.PF_BGRA)]</code>.</div>
1167<dl><dt><span class="strong">Parameters:</span></dt><dd><code>pixelFormat</code> - the pixel format (one of <code>PF_*</code>)</dd>
1168<dt><span class="strong">Returns:</span></dt><dd>the alpha offset for the given pixel format, or -1 if the pixel
1169 format does not have a alpha component.</dd></dl>
1170</li>
1171</ul>
1172<a name="bufSize(int, int, int)">
1173<!--   -->
1174</a>
1175<ul class="blockList">
1176<li class="blockList">
1177<h4>bufSize</h4>
1178<pre>public static&nbsp;int&nbsp;bufSize(int&nbsp;width,
1179          int&nbsp;height,
1180          int&nbsp;jpegSubsamp)</pre>
1181<div class="block">Returns the maximum size of the buffer (in bytes) required to hold a JPEG
1182 image with the given width, height, and level of chrominance subsampling.</div>
1183<dl><dt><span class="strong">Parameters:</span></dt><dd><code>width</code> - the width (in pixels) of the JPEG image</dd><dd><code>height</code> - the height (in pixels) of the JPEG image</dd><dd><code>jpegSubsamp</code> - the level of chrominance subsampling to be used when
1184 generating the JPEG image (one of <a href="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><code>TJ.SAMP_*</code></a>)</dd>
1185<dt><span class="strong">Returns:</span></dt><dd>the maximum size of the buffer (in bytes) required to hold a JPEG
1186 image with the given width, height, and level of chrominance subsampling.</dd></dl>
1187</li>
1188</ul>
1189<a name="bufSizeYUV(int, int, int, int)">
1190<!--   -->
1191</a>
1192<ul class="blockList">
1193<li class="blockList">
1194<h4>bufSizeYUV</h4>
1195<pre>public static&nbsp;int&nbsp;bufSizeYUV(int&nbsp;width,
1196             int&nbsp;pad,
1197             int&nbsp;height,
1198             int&nbsp;subsamp)</pre>
1199<div class="block">Returns the size of the buffer (in bytes) required to hold a YUV planar
1200 image with the given width, height, and level of chrominance subsampling.</div>
1201<dl><dt><span class="strong">Parameters:</span></dt><dd><code>width</code> - the width (in pixels) of the YUV image</dd><dd><code>pad</code> - the width of each line in each plane of the image is padded to
1202 the nearest multiple of this number of bytes (must be a power of 2.)</dd><dd><code>height</code> - the height (in pixels) of the YUV image</dd><dd><code>subsamp</code> - the level of chrominance subsampling used in the YUV
1203 image (one of <a href="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><code>TJ.SAMP_*</code></a>)</dd>
1204<dt><span class="strong">Returns:</span></dt><dd>the size of the buffer (in bytes) required to hold a YUV planar
1205 image with the given width, height, and level of chrominance subsampling.</dd></dl>
1206</li>
1207</ul>
1208<a name="bufSizeYUV(int, int, int)">
1209<!--   -->
1210</a>
1211<ul class="blockList">
1212<li class="blockList">
1213<h4>bufSizeYUV</h4>
1214<pre>@Deprecated
1215public static&nbsp;int&nbsp;bufSizeYUV(int&nbsp;width,
1216                        int&nbsp;height,
1217                        int&nbsp;subsamp)</pre>
1218<div class="block"><span class="strong">Deprecated.</span>&nbsp;<i>Use <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#bufSizeYUV(int,%20int,%20int,%20int)"><code>bufSizeYUV(int, int, int, int)</code></a> instead.</i></div>
1219</li>
1220</ul>
1221<a name="planeSizeYUV(int, int, int, int, int)">
1222<!--   -->
1223</a>
1224<ul class="blockList">
1225<li class="blockList">
1226<h4>planeSizeYUV</h4>
1227<pre>public static&nbsp;int&nbsp;planeSizeYUV(int&nbsp;componentID,
1228               int&nbsp;width,
1229               int&nbsp;stride,
1230               int&nbsp;height,
1231               int&nbsp;subsamp)</pre>
1232<div class="block">Returns the size of the buffer (in bytes) required to hold a YUV image
1233 plane with the given parameters.</div>
1234<dl><dt><span class="strong">Parameters:</span></dt><dd><code>componentID</code> - ID number of the image plane (0 = Y, 1 = U/Cb,
1235 2 = V/Cr)</dd><dd><code>width</code> - width (in pixels) of the YUV image.  NOTE: this is the width
1236 of the whole image, not the plane width.</dd><dd><code>stride</code> - bytes per line in the image plane.</dd><dd><code>height</code> - height (in pixels) of the YUV image.  NOTE: this is the
1237 height of the whole image, not the plane height.</dd><dd><code>subsamp</code> - the level of chrominance subsampling used in the YUV
1238 image (one of <a href="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><code>TJ.SAMP_*</code></a>)</dd>
1239<dt><span class="strong">Returns:</span></dt><dd>the size of the buffer (in bytes) required to hold a YUV planar
1240 image with the given parameters.</dd></dl>
1241</li>
1242</ul>
1243<a name="planeWidth(int, int, int)">
1244<!--   -->
1245</a>
1246<ul class="blockList">
1247<li class="blockList">
1248<h4>planeWidth</h4>
1249<pre>public static&nbsp;int&nbsp;planeWidth(int&nbsp;componentID,
1250             int&nbsp;width,
1251             int&nbsp;subsamp)</pre>
1252<div class="block">Returns the plane width of a YUV image plane with the given parameters.
1253 Refer to <a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>YUVImage</code></a> for a description of plane width.</div>
1254<dl><dt><span class="strong">Parameters:</span></dt><dd><code>componentID</code> - ID number of the image plane (0 = Y, 1 = U/Cb,
1255 2 = V/Cr)</dd><dd><code>width</code> - width (in pixels) of the YUV image</dd><dd><code>subsamp</code> - the level of chrominance subsampling used in the YUV image
1256 (one of <a href="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><code>TJ.SAMP_*</code></a>)</dd>
1257<dt><span class="strong">Returns:</span></dt><dd>the plane width of a YUV image plane with the given parameters.</dd></dl>
1258</li>
1259</ul>
1260<a name="planeHeight(int, int, int)">
1261<!--   -->
1262</a>
1263<ul class="blockList">
1264<li class="blockList">
1265<h4>planeHeight</h4>
1266<pre>public static&nbsp;int&nbsp;planeHeight(int&nbsp;componentID,
1267              int&nbsp;height,
1268              int&nbsp;subsamp)</pre>
1269<div class="block">Returns the plane height of a YUV image plane with the given parameters.
1270 Refer to <a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>YUVImage</code></a> for a description of plane height.</div>
1271<dl><dt><span class="strong">Parameters:</span></dt><dd><code>componentID</code> - ID number of the image plane (0 = Y, 1 = U/Cb,
1272 2 = V/Cr)</dd><dd><code>height</code> - height (in pixels) of the YUV image</dd><dd><code>subsamp</code> - the level of chrominance subsampling used in the YUV image
1273 (one of <a href="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><code>TJ.SAMP_*</code></a>)</dd>
1274<dt><span class="strong">Returns:</span></dt><dd>the plane height of a YUV image plane with the given parameters.</dd></dl>
1275</li>
1276</ul>
1277<a name="getScalingFactors()">
1278<!--   -->
1279</a>
1280<ul class="blockListLast">
1281<li class="blockList">
1282<h4>getScalingFactors</h4>
1283<pre>public static&nbsp;<a href="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg">TJScalingFactor</a>[]&nbsp;getScalingFactors()</pre>
1284<div class="block">Returns a list of fractional scaling factors that the JPEG decompressor in
1285 this implementation of TurboJPEG supports.</div>
1286<dl><dt><span class="strong">Returns:</span></dt><dd>a list of fractional scaling factors that the JPEG decompressor in
1287 this implementation of TurboJPEG supports.</dd></dl>
1288</li>
1289</ul>
1290</li>
1291</ul>
1292</li>
1293</ul>
1294</div>
1295</div>
1296<!-- ========= END OF CLASS DATA ========= -->
1297<!-- ======= START OF BOTTOM NAVBAR ====== -->
1298<div class="bottomNav"><a name="navbar_bottom">
1299<!--   -->
1300</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
1301<!--   -->
1302</a>
1303<ul class="navList" title="Navigation">
1304<li><a href="../../../org/libjpegturbo/turbojpeg/package-summary.html">Package</a></li>
1305<li class="navBarCell1Rev">Class</li>
1306<li><a href="package-tree.html">Tree</a></li>
1307<li><a href="../../../deprecated-list.html">Deprecated</a></li>
1308<li><a href="../../../index-all.html">Index</a></li>
1309<li><a href="../../../help-doc.html">Help</a></li>
1310</ul>
1311</div>
1312<div class="subNav">
1313<ul class="navList">
1314<li>Prev Class</li>
1315<li><a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">Next Class</span></a></li>
1316</ul>
1317<ul class="navList">
1318<li><a href="../../../index.html?org/libjpegturbo/turbojpeg/TJ.html" target="_top">Frames</a></li>
1319<li><a href="TJ.html" target="_top">No Frames</a></li>
1320</ul>
1321<ul class="navList" id="allclasses_navbar_bottom">
1322<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
1323</ul>
1324<div>
1325<script type="text/javascript"><!--
1326  allClassesLink = document.getElementById("allclasses_navbar_bottom");
1327  if(window==top) {
1328    allClassesLink.style.display = "block";
1329  }
1330  else {
1331    allClassesLink.style.display = "none";
1332  }
1333  //-->
1334</script>
1335</div>
1336<div>
1337<ul class="subNavList">
1338<li>Summary:&nbsp;</li>
1339<li>Nested&nbsp;|&nbsp;</li>
1340<li><a href="#field_summary">Field</a>&nbsp;|&nbsp;</li>
1341<li>Constr&nbsp;|&nbsp;</li>
1342<li><a href="#method_summary">Method</a></li>
1343</ul>
1344<ul class="subNavList">
1345<li>Detail:&nbsp;</li>
1346<li><a href="#field_detail">Field</a>&nbsp;|&nbsp;</li>
1347<li>Constr&nbsp;|&nbsp;</li>
1348<li><a href="#method_detail">Method</a></li>
1349</ul>
1350</div>
1351<a name="skip-navbar_bottom">
1352<!--   -->
1353</a></div>
1354<!-- ======== END OF BOTTOM NAVBAR ======= -->
1355</body>
1356</html>
1357