• 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>TJDecompressor</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="TJDecompressor";
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/TJCustomFilter.html" title="interface in org.libjpegturbo.turbojpeg"><span class="strong">Prev Class</span></a></li>
36<li><a href="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.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/TJDecompressor.html" target="_top">Frames</a></li>
40<li><a href="TJDecompressor.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:&nbsp;</li>
60<li>Nested&nbsp;|&nbsp;</li>
61<li><a href="#field_summary">Field</a>&nbsp;|&nbsp;</li>
62<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
63<li><a href="#method_summary">Method</a></li>
64</ul>
65<ul class="subNavList">
66<li>Detail:&nbsp;</li>
67<li><a href="#field_detail">Field</a>&nbsp;|&nbsp;</li>
68<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</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="Class TJDecompressor" class="title">Class TJDecompressor</h2>
80</div>
81<div class="contentContainer">
82<ul class="inheritance">
83<li>java.lang.Object</li>
84<li>
85<ul class="inheritance">
86<li>org.libjpegturbo.turbojpeg.TJDecompressor</li>
87</ul>
88</li>
89</ul>
90<div class="description">
91<ul class="blockList">
92<li class="blockList">
93<dl>
94<dt>Direct Known Subclasses:</dt>
95<dd><a href="../../../org/libjpegturbo/turbojpeg/TJTransformer.html" title="class in org.libjpegturbo.turbojpeg">TJTransformer</a></dd>
96</dl>
97<hr>
98<br>
99<pre>public class <span class="strong">TJDecompressor</span>
100extends java.lang.Object</pre>
101<div class="block">TurboJPEG decompressor</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>protected long</code></td>
122<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#handle">handle</a></strong></code>&nbsp;</td>
123</tr>
124<tr class="rowColor">
125<td class="colFirst"><code>protected byte[]</code></td>
126<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#jpegBuf">jpegBuf</a></strong></code>&nbsp;</td>
127</tr>
128<tr class="altColor">
129<td class="colFirst"><code>protected int</code></td>
130<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#jpegBufSize">jpegBufSize</a></strong></code>&nbsp;</td>
131</tr>
132<tr class="rowColor">
133<td class="colFirst"><code>protected int</code></td>
134<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#jpegColorspace">jpegColorspace</a></strong></code>&nbsp;</td>
135</tr>
136<tr class="altColor">
137<td class="colFirst"><code>protected int</code></td>
138<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#jpegHeight">jpegHeight</a></strong></code>&nbsp;</td>
139</tr>
140<tr class="rowColor">
141<td class="colFirst"><code>protected int</code></td>
142<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#jpegSubsamp">jpegSubsamp</a></strong></code>&nbsp;</td>
143</tr>
144<tr class="altColor">
145<td class="colFirst"><code>protected int</code></td>
146<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#jpegWidth">jpegWidth</a></strong></code>&nbsp;</td>
147</tr>
148<tr class="rowColor">
149<td class="colFirst"><code>protected <a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a></code></td>
150<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#yuvImage">yuvImage</a></strong></code>&nbsp;</td>
151</tr>
152</table>
153</li>
154</ul>
155<!-- ======== CONSTRUCTOR SUMMARY ======== -->
156<ul class="blockList">
157<li class="blockList"><a name="constructor_summary">
158<!--   -->
159</a>
160<h3>Constructor Summary</h3>
161<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
162<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
163<tr>
164<th class="colOne" scope="col">Constructor and Description</th>
165</tr>
166<tr class="altColor">
167<td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#TJDecompressor()">TJDecompressor</a></strong>()</code>
168<div class="block">Create a TurboJPEG decompresssor instance.</div>
169</td>
170</tr>
171<tr class="rowColor">
172<td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#TJDecompressor(byte[])">TJDecompressor</a></strong>(byte[]&nbsp;jpegImage)</code>
173<div class="block">Create a TurboJPEG decompressor instance and associate the JPEG source
174 image stored in <code>jpegImage</code> with the newly created instance.</div>
175</td>
176</tr>
177<tr class="altColor">
178<td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#TJDecompressor(byte[],%20int)">TJDecompressor</a></strong>(byte[]&nbsp;jpegImage,
179              int&nbsp;imageSize)</code>
180<div class="block">Create a TurboJPEG decompressor instance and associate the JPEG source
181 image of length <code>imageSize</code> bytes stored in
182 <code>jpegImage</code> with the newly created instance.</div>
183</td>
184</tr>
185<tr class="rowColor">
186<td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#TJDecompressor(org.libjpegturbo.turbojpeg.YUVImage)">TJDecompressor</a></strong>(<a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a>&nbsp;yuvImage)</code>
187<div class="block">Create a TurboJPEG decompressor instance and associate the YUV planar
188 source image stored in <code>yuvImage</code> with the newly created
189 instance.</div>
190</td>
191</tr>
192</table>
193</li>
194</ul>
195<!-- ========== METHOD SUMMARY =========== -->
196<ul class="blockList">
197<li class="blockList"><a name="method_summary">
198<!--   -->
199</a>
200<h3>Method Summary</h3>
201<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
202<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
203<tr>
204<th class="colFirst" scope="col">Modifier and Type</th>
205<th class="colLast" scope="col">Method and Description</th>
206</tr>
207<tr class="altColor">
208<td class="colFirst"><code>void</code></td>
209<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#close()">close</a></strong>()</code>
210<div class="block">Free the native structures associated with this decompressor instance.</div>
211</td>
212</tr>
213<tr class="rowColor">
214<td class="colFirst"><code>void</code></td>
215<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(java.awt.image.BufferedImage,%20int)">decompress</a></strong>(java.awt.image.BufferedImage&nbsp;dstImage,
216          int&nbsp;flags)</code>
217<div class="block">Decompress the JPEG source image or decode the YUV source image associated
218 with this decompressor instance and output a decompressed/decoded image to
219 the given <code>BufferedImage</code> instance.</div>
220</td>
221</tr>
222<tr class="altColor">
223<td class="colFirst"><code>void</code></td>
224<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(byte[],%20int,%20int,%20int,%20int,%20int)">decompress</a></strong>(byte[]&nbsp;dstBuf,
225          int&nbsp;desiredWidth,
226          int&nbsp;pitch,
227          int&nbsp;desiredHeight,
228          int&nbsp;pixelFormat,
229          int&nbsp;flags)</code>
230<div class="block"><strong>Deprecated.</strong>&nbsp;
231<div class="block"><i>Use
232 <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(byte[],%20int,%20int,%20int,%20int,%20int,%20int,%20int)"><code>decompress(byte[], int, int, int, int, int, int, int)</code></a> instead.</i></div>
233</div>
234</td>
235</tr>
236<tr class="rowColor">
237<td class="colFirst"><code>void</code></td>
238<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(byte[],%20int,%20int,%20int,%20int,%20int,%20int,%20int)">decompress</a></strong>(byte[]&nbsp;dstBuf,
239          int&nbsp;x,
240          int&nbsp;y,
241          int&nbsp;desiredWidth,
242          int&nbsp;pitch,
243          int&nbsp;desiredHeight,
244          int&nbsp;pixelFormat,
245          int&nbsp;flags)</code>
246<div class="block">Decompress the JPEG source image or decode the YUV source image associated
247 with this decompressor instance and output a grayscale, RGB, or CMYK image
248 to the given destination buffer.</div>
249</td>
250</tr>
251<tr class="altColor">
252<td class="colFirst"><code>void</code></td>
253<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(int[],%20int,%20int,%20int,%20int,%20int,%20int,%20int)">decompress</a></strong>(int[]&nbsp;dstBuf,
254          int&nbsp;x,
255          int&nbsp;y,
256          int&nbsp;desiredWidth,
257          int&nbsp;stride,
258          int&nbsp;desiredHeight,
259          int&nbsp;pixelFormat,
260          int&nbsp;flags)</code>
261<div class="block">Decompress the JPEG source image or decode the YUV source image associated
262 with this decompressor instance and output a grayscale, RGB, or CMYK image
263 to the given destination buffer.</div>
264</td>
265</tr>
266<tr class="rowColor">
267<td class="colFirst"><code>java.awt.image.BufferedImage</code></td>
268<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(int,%20int,%20int,%20int)">decompress</a></strong>(int&nbsp;desiredWidth,
269          int&nbsp;desiredHeight,
270          int&nbsp;bufferedImageType,
271          int&nbsp;flags)</code>
272<div class="block">Decompress the JPEG source image or decode the YUV source image associated
273 with this decompressor instance and return a <code>BufferedImage</code>
274 instance containing the decompressed/decoded image.</div>
275</td>
276</tr>
277<tr class="altColor">
278<td class="colFirst"><code>byte[]</code></td>
279<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(int,%20int,%20int,%20int,%20int)">decompress</a></strong>(int&nbsp;desiredWidth,
280          int&nbsp;pitch,
281          int&nbsp;desiredHeight,
282          int&nbsp;pixelFormat,
283          int&nbsp;flags)</code>
284<div class="block">Decompress the JPEG source image associated with this decompressor
285 instance and return a buffer containing the decompressed image.</div>
286</td>
287</tr>
288<tr class="rowColor">
289<td class="colFirst"><code>void</code></td>
290<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(byte[],%20int)">decompressToYUV</a></strong>(byte[]&nbsp;dstBuf,
291               int&nbsp;flags)</code>
292<div class="block"><strong>Deprecated.</strong>&nbsp;
293<div class="block"><i>Use <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(org.libjpegturbo.turbojpeg.YUVImage,%20int)"><code>decompressToYUV(YUVImage, int)</code></a> instead.</i></div>
294</div>
295</td>
296</tr>
297<tr class="altColor">
298<td class="colFirst"><code>byte[]</code></td>
299<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(int)">decompressToYUV</a></strong>(int&nbsp;flags)</code>
300<div class="block"><strong>Deprecated.</strong>&nbsp;
301<div class="block"><i>Use <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(int,%20int,%20int,%20int)"><code>decompressToYUV(int, int, int, int)</code></a> instead.</i></div>
302</div>
303</td>
304</tr>
305<tr class="rowColor">
306<td class="colFirst"><code><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a></code></td>
307<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(int,%20int[],%20int,%20int)">decompressToYUV</a></strong>(int&nbsp;desiredWidth,
308               int[]&nbsp;strides,
309               int&nbsp;desiredHeight,
310               int&nbsp;flags)</code>
311<div class="block">Decompress the JPEG source image associated with this decompressor
312 instance into a set of Y, U (Cb), and V (Cr) image planes and return a
313 <code>YUVImage</code> instance containing the decompressed image planes.</div>
314</td>
315</tr>
316<tr class="altColor">
317<td class="colFirst"><code><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a></code></td>
318<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(int,%20int,%20int,%20int)">decompressToYUV</a></strong>(int&nbsp;desiredWidth,
319               int&nbsp;pad,
320               int&nbsp;desiredHeight,
321               int&nbsp;flags)</code>
322<div class="block">Decompress the JPEG source image associated with this decompressor
323 instance into a unified YUV planar image buffer and return a
324 <code>YUVImage</code> instance containing the decompressed image.</div>
325</td>
326</tr>
327<tr class="rowColor">
328<td class="colFirst"><code>void</code></td>
329<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(org.libjpegturbo.turbojpeg.YUVImage,%20int)">decompressToYUV</a></strong>(<a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a>&nbsp;dstImage,
330               int&nbsp;flags)</code>
331<div class="block">Decompress the JPEG source image associated with this decompressor
332 instance into a YUV planar image and store it in the given
333 <code>YUVImage</code> instance.</div>
334</td>
335</tr>
336<tr class="altColor">
337<td class="colFirst"><code>protected void</code></td>
338<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#finalize()">finalize</a></strong>()</code>&nbsp;</td>
339</tr>
340<tr class="rowColor">
341<td class="colFirst"><code>int</code></td>
342<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getColorspace()">getColorspace</a></strong>()</code>
343<div class="block">Returns the colorspace used in the source image (JPEG or YUV) associated
344 with this decompressor instance.</div>
345</td>
346</tr>
347<tr class="altColor">
348<td class="colFirst"><code>int</code></td>
349<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getHeight()">getHeight</a></strong>()</code>
350<div class="block">Returns the height of the source image (JPEG or YUV) associated with this
351 decompressor instance.</div>
352</td>
353</tr>
354<tr class="rowColor">
355<td class="colFirst"><code>byte[]</code></td>
356<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getJPEGBuf()">getJPEGBuf</a></strong>()</code>
357<div class="block">Returns the JPEG image buffer associated with this decompressor instance.</div>
358</td>
359</tr>
360<tr class="altColor">
361<td class="colFirst"><code>int</code></td>
362<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getJPEGSize()">getJPEGSize</a></strong>()</code>
363<div class="block">Returns the size of the JPEG image (in bytes) associated with this
364 decompressor instance.</div>
365</td>
366</tr>
367<tr class="rowColor">
368<td class="colFirst"><code>int</code></td>
369<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getScaledHeight(int,%20int)">getScaledHeight</a></strong>(int&nbsp;desiredWidth,
370               int&nbsp;desiredHeight)</code>
371<div class="block">Returns the height of the largest scaled-down image that the TurboJPEG
372 decompressor can generate without exceeding the desired image width and
373 height.</div>
374</td>
375</tr>
376<tr class="altColor">
377<td class="colFirst"><code>int</code></td>
378<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getScaledWidth(int,%20int)">getScaledWidth</a></strong>(int&nbsp;desiredWidth,
379              int&nbsp;desiredHeight)</code>
380<div class="block">Returns the width of the largest scaled-down image that the TurboJPEG
381 decompressor can generate without exceeding the desired image width and
382 height.</div>
383</td>
384</tr>
385<tr class="rowColor">
386<td class="colFirst"><code>int</code></td>
387<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getSubsamp()">getSubsamp</a></strong>()</code>
388<div class="block">Returns the level of chrominance subsampling used in the source image
389 (JPEG or YUV) associated with this decompressor instance.</div>
390</td>
391</tr>
392<tr class="altColor">
393<td class="colFirst"><code>int</code></td>
394<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getWidth()">getWidth</a></strong>()</code>
395<div class="block">Returns the width of the source image (JPEG or YUV) associated with this
396 decompressor instance.</div>
397</td>
398</tr>
399<tr class="rowColor">
400<td class="colFirst"><code>void</code></td>
401<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#setJPEGImage(byte[],%20int)">setJPEGImage</a></strong>(byte[]&nbsp;jpegImage,
402            int&nbsp;imageSize)</code>
403<div class="block"><strong>Deprecated.</strong>&nbsp;
404<div class="block"><i>Use <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#setSourceImage(byte[],%20int)"><code>setSourceImage(byte[], int)</code></a> instead.</i></div>
405</div>
406</td>
407</tr>
408<tr class="altColor">
409<td class="colFirst"><code>void</code></td>
410<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#setSourceImage(byte[],%20int)">setSourceImage</a></strong>(byte[]&nbsp;jpegImage,
411              int&nbsp;imageSize)</code>
412<div class="block">Associate the JPEG image of length <code>imageSize</code> bytes stored in
413 <code>jpegImage</code> with this decompressor instance.</div>
414</td>
415</tr>
416<tr class="rowColor">
417<td class="colFirst"><code>void</code></td>
418<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#setSourceImage(org.libjpegturbo.turbojpeg.YUVImage)">setSourceImage</a></strong>(<a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a>&nbsp;srcImage)</code>
419<div class="block">Associate the specified YUV planar source image with this decompressor
420 instance.</div>
421</td>
422</tr>
423</table>
424<ul class="blockList">
425<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
426<!--   -->
427</a>
428<h3>Methods inherited from class&nbsp;java.lang.Object</h3>
429<code>clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
430</ul>
431</li>
432</ul>
433</li>
434</ul>
435</div>
436<div class="details">
437<ul class="blockList">
438<li class="blockList">
439<!-- ============ FIELD DETAIL =========== -->
440<ul class="blockList">
441<li class="blockList"><a name="field_detail">
442<!--   -->
443</a>
444<h3>Field Detail</h3>
445<a name="handle">
446<!--   -->
447</a>
448<ul class="blockList">
449<li class="blockList">
450<h4>handle</h4>
451<pre>protected&nbsp;long handle</pre>
452</li>
453</ul>
454<a name="jpegBuf">
455<!--   -->
456</a>
457<ul class="blockList">
458<li class="blockList">
459<h4>jpegBuf</h4>
460<pre>protected&nbsp;byte[] jpegBuf</pre>
461</li>
462</ul>
463<a name="jpegBufSize">
464<!--   -->
465</a>
466<ul class="blockList">
467<li class="blockList">
468<h4>jpegBufSize</h4>
469<pre>protected&nbsp;int jpegBufSize</pre>
470</li>
471</ul>
472<a name="yuvImage">
473<!--   -->
474</a>
475<ul class="blockList">
476<li class="blockList">
477<h4>yuvImage</h4>
478<pre>protected&nbsp;<a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a> yuvImage</pre>
479</li>
480</ul>
481<a name="jpegWidth">
482<!--   -->
483</a>
484<ul class="blockList">
485<li class="blockList">
486<h4>jpegWidth</h4>
487<pre>protected&nbsp;int jpegWidth</pre>
488</li>
489</ul>
490<a name="jpegHeight">
491<!--   -->
492</a>
493<ul class="blockList">
494<li class="blockList">
495<h4>jpegHeight</h4>
496<pre>protected&nbsp;int jpegHeight</pre>
497</li>
498</ul>
499<a name="jpegSubsamp">
500<!--   -->
501</a>
502<ul class="blockList">
503<li class="blockList">
504<h4>jpegSubsamp</h4>
505<pre>protected&nbsp;int jpegSubsamp</pre>
506</li>
507</ul>
508<a name="jpegColorspace">
509<!--   -->
510</a>
511<ul class="blockListLast">
512<li class="blockList">
513<h4>jpegColorspace</h4>
514<pre>protected&nbsp;int jpegColorspace</pre>
515</li>
516</ul>
517</li>
518</ul>
519<!-- ========= CONSTRUCTOR DETAIL ======== -->
520<ul class="blockList">
521<li class="blockList"><a name="constructor_detail">
522<!--   -->
523</a>
524<h3>Constructor Detail</h3>
525<a name="TJDecompressor()">
526<!--   -->
527</a>
528<ul class="blockList">
529<li class="blockList">
530<h4>TJDecompressor</h4>
531<pre>public&nbsp;TJDecompressor()
532               throws java.lang.Exception</pre>
533<div class="block">Create a TurboJPEG decompresssor instance.</div>
534<dl><dt><span class="strong">Throws:</span></dt>
535<dd><code>java.lang.Exception</code></dd></dl>
536</li>
537</ul>
538<a name="TJDecompressor(byte[])">
539<!--   -->
540</a>
541<ul class="blockList">
542<li class="blockList">
543<h4>TJDecompressor</h4>
544<pre>public&nbsp;TJDecompressor(byte[]&nbsp;jpegImage)
545               throws java.lang.Exception</pre>
546<div class="block">Create a TurboJPEG decompressor instance and associate the JPEG source
547 image stored in <code>jpegImage</code> with the newly created instance.</div>
548<dl><dt><span class="strong">Parameters:</span></dt><dd><code>jpegImage</code> - JPEG image buffer (size of the JPEG image is assumed to
549 be the length of the array.)  This buffer is not modified.</dd>
550<dt><span class="strong">Throws:</span></dt>
551<dd><code>java.lang.Exception</code></dd></dl>
552</li>
553</ul>
554<a name="TJDecompressor(byte[], int)">
555<!--   -->
556</a>
557<ul class="blockList">
558<li class="blockList">
559<h4>TJDecompressor</h4>
560<pre>public&nbsp;TJDecompressor(byte[]&nbsp;jpegImage,
561              int&nbsp;imageSize)
562               throws java.lang.Exception</pre>
563<div class="block">Create a TurboJPEG decompressor instance and associate the JPEG source
564 image of length <code>imageSize</code> bytes stored in
565 <code>jpegImage</code> with the newly created instance.</div>
566<dl><dt><span class="strong">Parameters:</span></dt><dd><code>jpegImage</code> - JPEG image buffer.  This buffer is not modified.</dd><dd><code>imageSize</code> - size of the JPEG image (in bytes)</dd>
567<dt><span class="strong">Throws:</span></dt>
568<dd><code>java.lang.Exception</code></dd></dl>
569</li>
570</ul>
571<a name="TJDecompressor(org.libjpegturbo.turbojpeg.YUVImage)">
572<!--   -->
573</a>
574<ul class="blockListLast">
575<li class="blockList">
576<h4>TJDecompressor</h4>
577<pre>public&nbsp;TJDecompressor(<a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a>&nbsp;yuvImage)
578               throws java.lang.Exception</pre>
579<div class="block">Create a TurboJPEG decompressor instance and associate the YUV planar
580 source image stored in <code>yuvImage</code> with the newly created
581 instance.</div>
582<dl><dt><span class="strong">Parameters:</span></dt><dd><code>yuvImage</code> - <a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>YUVImage</code></a> instance containing a YUV planar
583 image to be decoded.  This image is not modified.</dd>
584<dt><span class="strong">Throws:</span></dt>
585<dd><code>java.lang.Exception</code></dd></dl>
586</li>
587</ul>
588</li>
589</ul>
590<!-- ============ METHOD DETAIL ========== -->
591<ul class="blockList">
592<li class="blockList"><a name="method_detail">
593<!--   -->
594</a>
595<h3>Method Detail</h3>
596<a name="setSourceImage(byte[], int)">
597<!--   -->
598</a>
599<ul class="blockList">
600<li class="blockList">
601<h4>setSourceImage</h4>
602<pre>public&nbsp;void&nbsp;setSourceImage(byte[]&nbsp;jpegImage,
603                  int&nbsp;imageSize)
604                    throws java.lang.Exception</pre>
605<div class="block">Associate the JPEG image of length <code>imageSize</code> bytes stored in
606 <code>jpegImage</code> with this decompressor instance.  This image will
607 be used as the source image for subsequent decompress operations.</div>
608<dl><dt><span class="strong">Parameters:</span></dt><dd><code>jpegImage</code> - JPEG image buffer.  This buffer is not modified.</dd><dd><code>imageSize</code> - size of the JPEG image (in bytes)</dd>
609<dt><span class="strong">Throws:</span></dt>
610<dd><code>java.lang.Exception</code></dd></dl>
611</li>
612</ul>
613<a name="setJPEGImage(byte[], int)">
614<!--   -->
615</a>
616<ul class="blockList">
617<li class="blockList">
618<h4>setJPEGImage</h4>
619<pre>@Deprecated
620public&nbsp;void&nbsp;setJPEGImage(byte[]&nbsp;jpegImage,
621                           int&nbsp;imageSize)
622                  throws java.lang.Exception</pre>
623<div class="block"><span class="strong">Deprecated.</span>&nbsp;<i>Use <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#setSourceImage(byte[],%20int)"><code>setSourceImage(byte[], int)</code></a> instead.</i></div>
624<dl><dt><span class="strong">Throws:</span></dt>
625<dd><code>java.lang.Exception</code></dd></dl>
626</li>
627</ul>
628<a name="setSourceImage(org.libjpegturbo.turbojpeg.YUVImage)">
629<!--   -->
630</a>
631<ul class="blockList">
632<li class="blockList">
633<h4>setSourceImage</h4>
634<pre>public&nbsp;void&nbsp;setSourceImage(<a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a>&nbsp;srcImage)
635                    throws java.lang.Exception</pre>
636<div class="block">Associate the specified YUV planar source image with this decompressor
637 instance.  Subsequent decompress operations will decode this image into an
638 RGB or grayscale destination image.</div>
639<dl><dt><span class="strong">Parameters:</span></dt><dd><code>srcImage</code> - <a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>YUVImage</code></a> instance containing a YUV planar image to
640 be decoded.  This image is not modified.</dd>
641<dt><span class="strong">Throws:</span></dt>
642<dd><code>java.lang.Exception</code></dd></dl>
643</li>
644</ul>
645<a name="getWidth()">
646<!--   -->
647</a>
648<ul class="blockList">
649<li class="blockList">
650<h4>getWidth</h4>
651<pre>public&nbsp;int&nbsp;getWidth()
652             throws java.lang.Exception</pre>
653<div class="block">Returns the width of the source image (JPEG or YUV) associated with this
654 decompressor instance.</div>
655<dl><dt><span class="strong">Returns:</span></dt><dd>the width of the source image (JPEG or YUV) associated with this
656 decompressor instance.</dd>
657<dt><span class="strong">Throws:</span></dt>
658<dd><code>java.lang.Exception</code></dd></dl>
659</li>
660</ul>
661<a name="getHeight()">
662<!--   -->
663</a>
664<ul class="blockList">
665<li class="blockList">
666<h4>getHeight</h4>
667<pre>public&nbsp;int&nbsp;getHeight()
668              throws java.lang.Exception</pre>
669<div class="block">Returns the height of the source image (JPEG or YUV) associated with this
670 decompressor instance.</div>
671<dl><dt><span class="strong">Returns:</span></dt><dd>the height of the source image (JPEG or YUV) associated with this
672 decompressor instance.</dd>
673<dt><span class="strong">Throws:</span></dt>
674<dd><code>java.lang.Exception</code></dd></dl>
675</li>
676</ul>
677<a name="getSubsamp()">
678<!--   -->
679</a>
680<ul class="blockList">
681<li class="blockList">
682<h4>getSubsamp</h4>
683<pre>public&nbsp;int&nbsp;getSubsamp()
684               throws java.lang.Exception</pre>
685<div class="block">Returns the level of chrominance subsampling used in the source image
686 (JPEG or YUV) associated with this decompressor instance.  See
687 <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_444"><code>TJ.SAMP_*</code></a>.</div>
688<dl><dt><span class="strong">Returns:</span></dt><dd>the level of chrominance subsampling used in the source image
689 (JPEG or YUV) associated with this decompressor instance.</dd>
690<dt><span class="strong">Throws:</span></dt>
691<dd><code>java.lang.Exception</code></dd></dl>
692</li>
693</ul>
694<a name="getColorspace()">
695<!--   -->
696</a>
697<ul class="blockList">
698<li class="blockList">
699<h4>getColorspace</h4>
700<pre>public&nbsp;int&nbsp;getColorspace()
701                  throws java.lang.Exception</pre>
702<div class="block">Returns the colorspace used in the source image (JPEG or YUV) associated
703 with this decompressor instance.  See <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#CS_RGB"><code>TJ.CS_*</code></a>.  If the
704 source image is YUV, then this always returns <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#CS_YCbCr"><code>TJ.CS_YCbCr</code></a>.</div>
705<dl><dt><span class="strong">Returns:</span></dt><dd>the colorspace used in the source image (JPEG or YUV) associated
706 with this decompressor instance.</dd>
707<dt><span class="strong">Throws:</span></dt>
708<dd><code>java.lang.Exception</code></dd></dl>
709</li>
710</ul>
711<a name="getJPEGBuf()">
712<!--   -->
713</a>
714<ul class="blockList">
715<li class="blockList">
716<h4>getJPEGBuf</h4>
717<pre>public&nbsp;byte[]&nbsp;getJPEGBuf()
718                  throws java.lang.Exception</pre>
719<div class="block">Returns the JPEG image buffer associated with this decompressor instance.</div>
720<dl><dt><span class="strong">Returns:</span></dt><dd>the JPEG image buffer associated with this decompressor instance.</dd>
721<dt><span class="strong">Throws:</span></dt>
722<dd><code>java.lang.Exception</code></dd></dl>
723</li>
724</ul>
725<a name="getJPEGSize()">
726<!--   -->
727</a>
728<ul class="blockList">
729<li class="blockList">
730<h4>getJPEGSize</h4>
731<pre>public&nbsp;int&nbsp;getJPEGSize()
732                throws java.lang.Exception</pre>
733<div class="block">Returns the size of the JPEG image (in bytes) associated with this
734 decompressor instance.</div>
735<dl><dt><span class="strong">Returns:</span></dt><dd>the size of the JPEG image (in bytes) associated with this
736 decompressor instance.</dd>
737<dt><span class="strong">Throws:</span></dt>
738<dd><code>java.lang.Exception</code></dd></dl>
739</li>
740</ul>
741<a name="getScaledWidth(int, int)">
742<!--   -->
743</a>
744<ul class="blockList">
745<li class="blockList">
746<h4>getScaledWidth</h4>
747<pre>public&nbsp;int&nbsp;getScaledWidth(int&nbsp;desiredWidth,
748                 int&nbsp;desiredHeight)
749                   throws java.lang.Exception</pre>
750<div class="block">Returns the width of the largest scaled-down image that the TurboJPEG
751 decompressor can generate without exceeding the desired image width and
752 height.</div>
753<dl><dt><span class="strong">Parameters:</span></dt><dd><code>desiredWidth</code> - desired width (in pixels) of the decompressed image.
754 Setting this to 0 is the same as setting it to the width of the JPEG image
755 (in other words, the width will not be considered when determining the
756 scaled image size.)</dd><dd><code>desiredHeight</code> - desired height (in pixels) of the decompressed image.
757 Setting this to 0 is the same as setting it to the height of the JPEG
758 image (in other words, the height will not be considered when determining
759 the scaled image size.)</dd>
760<dt><span class="strong">Returns:</span></dt><dd>the width of the largest scaled-down image that the TurboJPEG
761 decompressor can generate without exceeding the desired image width and
762 height.</dd>
763<dt><span class="strong">Throws:</span></dt>
764<dd><code>java.lang.Exception</code></dd></dl>
765</li>
766</ul>
767<a name="getScaledHeight(int, int)">
768<!--   -->
769</a>
770<ul class="blockList">
771<li class="blockList">
772<h4>getScaledHeight</h4>
773<pre>public&nbsp;int&nbsp;getScaledHeight(int&nbsp;desiredWidth,
774                  int&nbsp;desiredHeight)
775                    throws java.lang.Exception</pre>
776<div class="block">Returns the height of the largest scaled-down image that the TurboJPEG
777 decompressor can generate without exceeding the desired image width and
778 height.</div>
779<dl><dt><span class="strong">Parameters:</span></dt><dd><code>desiredWidth</code> - desired width (in pixels) of the decompressed image.
780 Setting this to 0 is the same as setting it to the width of the JPEG image
781 (in other words, the width will not be considered when determining the
782 scaled image size.)</dd><dd><code>desiredHeight</code> - desired height (in pixels) of the decompressed image.
783 Setting this to 0 is the same as setting it to the height of the JPEG
784 image (in other words, the height will not be considered when determining
785 the scaled image size.)</dd>
786<dt><span class="strong">Returns:</span></dt><dd>the height of the largest scaled-down image that the TurboJPEG
787 decompressor can generate without exceeding the desired image width and
788 height.</dd>
789<dt><span class="strong">Throws:</span></dt>
790<dd><code>java.lang.Exception</code></dd></dl>
791</li>
792</ul>
793<a name="decompress(byte[], int, int, int, int, int, int, int)">
794<!--   -->
795</a>
796<ul class="blockList">
797<li class="blockList">
798<h4>decompress</h4>
799<pre>public&nbsp;void&nbsp;decompress(byte[]&nbsp;dstBuf,
800              int&nbsp;x,
801              int&nbsp;y,
802              int&nbsp;desiredWidth,
803              int&nbsp;pitch,
804              int&nbsp;desiredHeight,
805              int&nbsp;pixelFormat,
806              int&nbsp;flags)
807                throws java.lang.Exception</pre>
808<div class="block">Decompress the JPEG source image or decode the YUV source image associated
809 with this decompressor instance and output a grayscale, RGB, or CMYK image
810 to the given destination buffer.</div>
811<dl><dt><span class="strong">Parameters:</span></dt><dd><code>dstBuf</code> - buffer that will receive the decompressed/decoded image.
812 If the source image is a JPEG image, then this buffer should normally be
813 <code>pitch * scaledHeight</code> bytes in size, where
814 <code>scaledHeight</code> can be determined by calling <code>
815 scalingFactor.<a href="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html#getScaled(int)"><code>getScaled</code></a>(jpegHeight)
816 </code> with one of the scaling factors returned from <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#getScalingFactors()"><code>TJ.getScalingFactors()</code></a> or by calling <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getScaledHeight(int,%20int)"><code>getScaledHeight(int, int)</code></a>.  If the
817 source image is a YUV image, then this buffer should normally be
818 <code>pitch * height</code> bytes in size, where <code>height</code> is
819 the height of the YUV image.  However, the buffer may also be larger than
820 the dimensions of the source image, in which case the <code>x</code>,
821 <code>y</code>, and <code>pitch</code> parameters can be used to specify
822 the region into which the source image should be decompressed/decoded.</dd><dd><code>x</code> - x offset (in pixels) of the region in the destination image into
823 which the source image should be decompressed/decoded</dd><dd><code>y</code> - y offset (in pixels) of the region in the destination image into
824 which the source image should be decompressed/decoded</dd><dd><code>desiredWidth</code> - If the source image is a JPEG image, then this
825 specifies the desired width (in pixels) of the decompressed image (or
826 image region.)  If the desired destination image dimensions are different
827 than the source image dimensions, then TurboJPEG will use scaling in the
828 JPEG decompressor to generate the largest possible image that will fit
829 within the desired dimensions.  Setting this to 0 is the same as setting
830 it to the width of the JPEG image (in other words, the width will not be
831 considered when determining the scaled image size.)  This parameter is
832 ignored if the source image is a YUV image.</dd><dd><code>pitch</code> - bytes per line of the destination image.  Normally, this
833 should be set to <code>scaledWidth * TJ.pixelSize(pixelFormat)</code> if
834 the destination image is unpadded, but you can use this to, for instance,
835 pad each line of the destination image to a 4-byte boundary or to
836 decompress/decode the source image into a region of a larger image.  NOTE:
837 if the source image is a JPEG image, then <code>scaledWidth</code> can be
838 determined by calling <code>
839 scalingFactor.<a href="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html#getScaled(int)"><code>getScaled</code></a>(jpegWidth)
840 </code> or by calling <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getScaledWidth(int,%20int)"><code>getScaledWidth(int, int)</code></a>.  If the source image is a
841 YUV image, then <code>scaledWidth</code> is the width of the YUV image.
842 Setting this parameter to 0 is the equivalent of setting it to
843 <code>scaledWidth * TJ.pixelSize(pixelFormat)</code>.</dd><dd><code>desiredHeight</code> - If the source image is a JPEG image, then this
844 specifies the desired height (in pixels) of the decompressed image (or
845 image region.)  If the desired destination image dimensions are different
846 than the source image dimensions, then TurboJPEG will use scaling in the
847 JPEG decompressor to generate the largest possible image that will fit
848 within the desired dimensions.  Setting this to 0 is the same as setting
849 it to the height of the JPEG image (in other words, the height will not be
850 considered when determining the scaled image size.)  This parameter is
851 ignored if the source image is a YUV image.</dd><dd><code>pixelFormat</code> - pixel format of the decompressed/decoded image (one of
852 <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_RGB"><code>TJ.PF_*</code></a>)</dd><dd><code>flags</code> - the bitwise OR of one or more of
853 <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP"><code>TJ.FLAG_*</code></a></dd>
854<dt><span class="strong">Throws:</span></dt>
855<dd><code>java.lang.Exception</code></dd></dl>
856</li>
857</ul>
858<a name="decompress(byte[], int, int, int, int, int)">
859<!--   -->
860</a>
861<ul class="blockList">
862<li class="blockList">
863<h4>decompress</h4>
864<pre>@Deprecated
865public&nbsp;void&nbsp;decompress(byte[]&nbsp;dstBuf,
866                         int&nbsp;desiredWidth,
867                         int&nbsp;pitch,
868                         int&nbsp;desiredHeight,
869                         int&nbsp;pixelFormat,
870                         int&nbsp;flags)
871                throws java.lang.Exception</pre>
872<div class="block"><span class="strong">Deprecated.</span>&nbsp;<i>Use
873 <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(byte[],%20int,%20int,%20int,%20int,%20int,%20int,%20int)"><code>decompress(byte[], int, int, int, int, int, int, int)</code></a> instead.</i></div>
874<dl><dt><span class="strong">Throws:</span></dt>
875<dd><code>java.lang.Exception</code></dd></dl>
876</li>
877</ul>
878<a name="decompress(int, int, int, int, int)">
879<!--   -->
880</a>
881<ul class="blockList">
882<li class="blockList">
883<h4>decompress</h4>
884<pre>public&nbsp;byte[]&nbsp;decompress(int&nbsp;desiredWidth,
885                int&nbsp;pitch,
886                int&nbsp;desiredHeight,
887                int&nbsp;pixelFormat,
888                int&nbsp;flags)
889                  throws java.lang.Exception</pre>
890<div class="block">Decompress the JPEG source image associated with this decompressor
891 instance and return a buffer containing the decompressed image.</div>
892<dl><dt><span class="strong">Parameters:</span></dt><dd><code>desiredWidth</code> - see
893 <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(byte[],%20int,%20int,%20int,%20int,%20int,%20int,%20int)"><code>decompress(byte[], int, int, int, int, int, int, int)</code></a>
894 for description</dd><dd><code>pitch</code> - see
895 <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(byte[],%20int,%20int,%20int,%20int,%20int,%20int,%20int)"><code>decompress(byte[], int, int, int, int, int, int, int)</code></a>
896 for description</dd><dd><code>desiredHeight</code> - see
897 <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(byte[],%20int,%20int,%20int,%20int,%20int,%20int,%20int)"><code>decompress(byte[], int, int, int, int, int, int, int)</code></a>
898 for description</dd><dd><code>pixelFormat</code> - pixel format of the decompressed image (one of
899 <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_RGB"><code>TJ.PF_*</code></a>)</dd><dd><code>flags</code> - the bitwise OR of one or more of
900 <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP"><code>TJ.FLAG_*</code></a></dd>
901<dt><span class="strong">Returns:</span></dt><dd>a buffer containing the decompressed image.</dd>
902<dt><span class="strong">Throws:</span></dt>
903<dd><code>java.lang.Exception</code></dd></dl>
904</li>
905</ul>
906<a name="decompressToYUV(org.libjpegturbo.turbojpeg.YUVImage, int)">
907<!--   -->
908</a>
909<ul class="blockList">
910<li class="blockList">
911<h4>decompressToYUV</h4>
912<pre>public&nbsp;void&nbsp;decompressToYUV(<a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a>&nbsp;dstImage,
913                   int&nbsp;flags)
914                     throws java.lang.Exception</pre>
915<div class="block">Decompress the JPEG source image associated with this decompressor
916 instance into a YUV planar image and store it in the given
917 <code>YUVImage</code> instance.  This method performs JPEG decompression
918 but leaves out the color conversion step, so a planar YUV image is
919 generated instead of an RGB or grayscale image.  This method cannot be
920 used to decompress JPEG source images with the CMYK or YCCK colorspace.</div>
921<dl><dt><span class="strong">Parameters:</span></dt><dd><code>dstImage</code> - <a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>YUVImage</code></a> instance that will receive the YUV planar
922 image.  The level of subsampling specified in this <code>YUVImage</code>
923 instance must match that of the JPEG image, and the width and height
924 specified in the <code>YUVImage</code> instance must match one of the
925 scaled image sizes that TurboJPEG is capable of generating from the JPEG
926 source image.</dd><dd><code>flags</code> - the bitwise OR of one or more of
927 <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP"><code>TJ.FLAG_*</code></a></dd>
928<dt><span class="strong">Throws:</span></dt>
929<dd><code>java.lang.Exception</code></dd></dl>
930</li>
931</ul>
932<a name="decompressToYUV(byte[], int)">
933<!--   -->
934</a>
935<ul class="blockList">
936<li class="blockList">
937<h4>decompressToYUV</h4>
938<pre>@Deprecated
939public&nbsp;void&nbsp;decompressToYUV(byte[]&nbsp;dstBuf,
940                              int&nbsp;flags)
941                     throws java.lang.Exception</pre>
942<div class="block"><span class="strong">Deprecated.</span>&nbsp;<i>Use <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(org.libjpegturbo.turbojpeg.YUVImage,%20int)"><code>decompressToYUV(YUVImage, int)</code></a> instead.</i></div>
943<dl><dt><span class="strong">Throws:</span></dt>
944<dd><code>java.lang.Exception</code></dd></dl>
945</li>
946</ul>
947<a name="decompressToYUV(int, int[], int, int)">
948<!--   -->
949</a>
950<ul class="blockList">
951<li class="blockList">
952<h4>decompressToYUV</h4>
953<pre>public&nbsp;<a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a>&nbsp;decompressToYUV(int&nbsp;desiredWidth,
954                       int[]&nbsp;strides,
955                       int&nbsp;desiredHeight,
956                       int&nbsp;flags)
957                         throws java.lang.Exception</pre>
958<div class="block">Decompress the JPEG source image associated with this decompressor
959 instance into a set of Y, U (Cb), and V (Cr) image planes and return a
960 <code>YUVImage</code> instance containing the decompressed image planes.
961 This method performs JPEG decompression but leaves out the color
962 conversion step, so a planar YUV image is generated instead of an RGB or
963 grayscale image.  This method cannot be used to decompress JPEG source
964 images with the CMYK or YCCK colorspace.</div>
965<dl><dt><span class="strong">Parameters:</span></dt><dd><code>desiredWidth</code> - desired width (in pixels) of the YUV image.  If the
966 desired image dimensions are different than the dimensions of the JPEG
967 image being decompressed, then TurboJPEG will use scaling in the JPEG
968 decompressor to generate the largest possible image that will fit within
969 the desired dimensions.  Setting this to 0 is the same as setting it to
970 the width of the JPEG image (in other words, the width will not be
971 considered when determining the scaled image size.)</dd><dd><code>strides</code> - an array of integers, each specifying the number of bytes
972 per line in the corresponding plane of the output image.  Setting the
973 stride for any plane to 0 is the same as setting it to the scaled
974 component width of the plane.  If <tt>strides</tt> is NULL, then the
975 strides for all planes will be set to their respective scaled component
976 widths.  You can adjust the strides in order to add an arbitrary amount of
977 line padding to each plane.</dd><dd><code>desiredHeight</code> - desired height (in pixels) of the YUV image.  If the
978 desired image dimensions are different than the dimensions of the JPEG
979 image being decompressed, then TurboJPEG will use scaling in the JPEG
980 decompressor to generate the largest possible image that will fit within
981 the desired dimensions.  Setting this to 0 is the same as setting it to
982 the height of the JPEG image (in other words, the height will not be
983 considered when determining the scaled image size.)</dd><dd><code>flags</code> - the bitwise OR of one or more of
984 <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP"><code>TJ.FLAG_*</code></a></dd>
985<dt><span class="strong">Returns:</span></dt><dd>a YUV planar image.</dd>
986<dt><span class="strong">Throws:</span></dt>
987<dd><code>java.lang.Exception</code></dd></dl>
988</li>
989</ul>
990<a name="decompressToYUV(int, int, int, int)">
991<!--   -->
992</a>
993<ul class="blockList">
994<li class="blockList">
995<h4>decompressToYUV</h4>
996<pre>public&nbsp;<a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a>&nbsp;decompressToYUV(int&nbsp;desiredWidth,
997                       int&nbsp;pad,
998                       int&nbsp;desiredHeight,
999                       int&nbsp;flags)
1000                         throws java.lang.Exception</pre>
1001<div class="block">Decompress the JPEG source image associated with this decompressor
1002 instance into a unified YUV planar image buffer and return a
1003 <code>YUVImage</code> instance containing the decompressed image.  This
1004 method performs JPEG decompression but leaves out the color conversion
1005 step, so a planar YUV image is generated instead of an RGB or grayscale
1006 image.  This method cannot be used to decompress JPEG source images with
1007 the CMYK or YCCK colorspace.</div>
1008<dl><dt><span class="strong">Parameters:</span></dt><dd><code>desiredWidth</code> - desired width (in pixels) of the YUV image.  If the
1009 desired image dimensions are different than the dimensions of the JPEG
1010 image being decompressed, then TurboJPEG will use scaling in the JPEG
1011 decompressor to generate the largest possible image that will fit within
1012 the desired dimensions.  Setting this to 0 is the same as setting it to
1013 the width of the JPEG image (in other words, the width will not be
1014 considered when determining the scaled image size.)</dd><dd><code>pad</code> - the width of each line in each plane of the YUV image will be
1015 padded to the nearest multiple of this number of bytes (must be a power of
1016 2.)</dd><dd><code>desiredHeight</code> - desired height (in pixels) of the YUV image.  If the
1017 desired image dimensions are different than the dimensions of the JPEG
1018 image being decompressed, then TurboJPEG will use scaling in the JPEG
1019 decompressor to generate the largest possible image that will fit within
1020 the desired dimensions.  Setting this to 0 is the same as setting it to
1021 the height of the JPEG image (in other words, the height will not be
1022 considered when determining the scaled image size.)</dd><dd><code>flags</code> - the bitwise OR of one or more of
1023 <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP"><code>TJ.FLAG_*</code></a></dd>
1024<dt><span class="strong">Returns:</span></dt><dd>a YUV planar image.</dd>
1025<dt><span class="strong">Throws:</span></dt>
1026<dd><code>java.lang.Exception</code></dd></dl>
1027</li>
1028</ul>
1029<a name="decompressToYUV(int)">
1030<!--   -->
1031</a>
1032<ul class="blockList">
1033<li class="blockList">
1034<h4>decompressToYUV</h4>
1035<pre>@Deprecated
1036public&nbsp;byte[]&nbsp;decompressToYUV(int&nbsp;flags)
1037                       throws java.lang.Exception</pre>
1038<div class="block"><span class="strong">Deprecated.</span>&nbsp;<i>Use <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(int,%20int,%20int,%20int)"><code>decompressToYUV(int, int, int, int)</code></a> instead.</i></div>
1039<dl><dt><span class="strong">Throws:</span></dt>
1040<dd><code>java.lang.Exception</code></dd></dl>
1041</li>
1042</ul>
1043<a name="decompress(int[], int, int, int, int, int, int, int)">
1044<!--   -->
1045</a>
1046<ul class="blockList">
1047<li class="blockList">
1048<h4>decompress</h4>
1049<pre>public&nbsp;void&nbsp;decompress(int[]&nbsp;dstBuf,
1050              int&nbsp;x,
1051              int&nbsp;y,
1052              int&nbsp;desiredWidth,
1053              int&nbsp;stride,
1054              int&nbsp;desiredHeight,
1055              int&nbsp;pixelFormat,
1056              int&nbsp;flags)
1057                throws java.lang.Exception</pre>
1058<div class="block">Decompress the JPEG source image or decode the YUV source image associated
1059 with this decompressor instance and output a grayscale, RGB, or CMYK image
1060 to the given destination buffer.</div>
1061<dl><dt><span class="strong">Parameters:</span></dt><dd><code>dstBuf</code> - buffer that will receive the decompressed/decoded image.
1062 If the source image is a JPEG image, then this buffer should normally be
1063 <code>stride * scaledHeight</code> pixels in size, where
1064 <code>scaledHeight</code> can be determined by calling <code>
1065 scalingFactor.<a href="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html#getScaled(int)"><code>getScaled</code></a>(jpegHeight)
1066 </code> with one of the scaling factors returned from <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#getScalingFactors()"><code>TJ.getScalingFactors()</code></a> or by calling <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getScaledHeight(int,%20int)"><code>getScaledHeight(int, int)</code></a>.  If the
1067 source image is a YUV image, then this buffer should normally be
1068 <code>stride * height</code> pixels in size, where <code>height</code> is
1069 the height of the YUV image.  However, the buffer may also be larger than
1070 the dimensions of the JPEG image, in which case the <code>x</code>,
1071 <code>y</code>, and <code>stride</code> parameters can be used to specify
1072 the region into which the source image should be decompressed.</dd><dd><code>x</code> - x offset (in pixels) of the region in the destination image into
1073 which the source image should be decompressed/decoded</dd><dd><code>y</code> - y offset (in pixels) of the region in the destination image into
1074 which the source image should be decompressed/decoded</dd><dd><code>desiredWidth</code> - If the source image is a JPEG image, then this
1075 specifies the desired width (in pixels) of the decompressed image (or
1076 image region.)  If the desired destination image dimensions are different
1077 than the source image dimensions, then TurboJPEG will use scaling in the
1078 JPEG decompressor to generate the largest possible image that will fit
1079 within the desired dimensions.  Setting this to 0 is the same as setting
1080 it to the width of the JPEG image (in other words, the width will not be
1081 considered when determining the scaled image size.)  This parameter is
1082 ignored if the source image is a YUV image.</dd><dd><code>stride</code> - pixels per line of the destination image.  Normally, this
1083 should be set to <code>scaledWidth</code>, but you can use this to, for
1084 instance, decompress the JPEG image into a region of a larger image.
1085 NOTE: if the source image is a JPEG image, then <code>scaledWidth</code>
1086 can be determined by calling <code>
1087 scalingFactor.<a href="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html#getScaled(int)"><code>getScaled</code></a>(jpegWidth)
1088 </code> or by calling <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getScaledWidth(int,%20int)"><code>getScaledWidth(int, int)</code></a>.  If the source image is a
1089 YUV image, then <code>scaledWidth</code> is the width of the YUV image.
1090 Setting this parameter to 0 is the equivalent of setting it to
1091 <code>scaledWidth</code>.</dd><dd><code>desiredHeight</code> - If the source image is a JPEG image, then this
1092 specifies the desired height (in pixels) of the decompressed image (or
1093 image region.)  If the desired destination image dimensions are different
1094 than the source image dimensions, then TurboJPEG will use scaling in the
1095 JPEG decompressor to generate the largest possible image that will fit
1096 within the desired dimensions.  Setting this to 0 is the same as setting
1097 it to the height of the JPEG image (in other words, the height will not be
1098 considered when determining the scaled image size.)  This parameter is
1099 ignored if the source image is a YUV image.</dd><dd><code>pixelFormat</code> - pixel format of the decompressed image (one of
1100 <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_RGB"><code>TJ.PF_*</code></a>)</dd><dd><code>flags</code> - the bitwise OR of one or more of
1101 <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP"><code>TJ.FLAG_*</code></a></dd>
1102<dt><span class="strong">Throws:</span></dt>
1103<dd><code>java.lang.Exception</code></dd></dl>
1104</li>
1105</ul>
1106<a name="decompress(java.awt.image.BufferedImage, int)">
1107<!--   -->
1108</a>
1109<ul class="blockList">
1110<li class="blockList">
1111<h4>decompress</h4>
1112<pre>public&nbsp;void&nbsp;decompress(java.awt.image.BufferedImage&nbsp;dstImage,
1113              int&nbsp;flags)
1114                throws java.lang.Exception</pre>
1115<div class="block">Decompress the JPEG source image or decode the YUV source image associated
1116 with this decompressor instance and output a decompressed/decoded image to
1117 the given <code>BufferedImage</code> instance.</div>
1118<dl><dt><span class="strong">Parameters:</span></dt><dd><code>dstImage</code> - a <code>BufferedImage</code> instance that will receive
1119 the decompressed/decoded image.  If the source image is a JPEG image, then
1120 the width and height of the <code>BufferedImage</code> instance must match
1121 one of the scaled image sizes that TurboJPEG is capable of generating from
1122 the JPEG image.  If the source image is a YUV image, then the width and
1123 height of the <code>BufferedImage</code> instance must match the width and
1124 height of the YUV image.</dd><dd><code>flags</code> - the bitwise OR of one or more of
1125 <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP"><code>TJ.FLAG_*</code></a></dd>
1126<dt><span class="strong">Throws:</span></dt>
1127<dd><code>java.lang.Exception</code></dd></dl>
1128</li>
1129</ul>
1130<a name="decompress(int, int, int, int)">
1131<!--   -->
1132</a>
1133<ul class="blockList">
1134<li class="blockList">
1135<h4>decompress</h4>
1136<pre>public&nbsp;java.awt.image.BufferedImage&nbsp;decompress(int&nbsp;desiredWidth,
1137                                      int&nbsp;desiredHeight,
1138                                      int&nbsp;bufferedImageType,
1139                                      int&nbsp;flags)
1140                                        throws java.lang.Exception</pre>
1141<div class="block">Decompress the JPEG source image or decode the YUV source image associated
1142 with this decompressor instance and return a <code>BufferedImage</code>
1143 instance containing the decompressed/decoded image.</div>
1144<dl><dt><span class="strong">Parameters:</span></dt><dd><code>desiredWidth</code> - see
1145 <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(byte[],%20int,%20int,%20int,%20int,%20int,%20int,%20int)"><code>decompress(byte[], int, int, int, int, int, int, int)</code></a> for
1146 description</dd><dd><code>desiredHeight</code> - see
1147 <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(byte[],%20int,%20int,%20int,%20int,%20int,%20int,%20int)"><code>decompress(byte[], int, int, int, int, int, int, int)</code></a> for
1148 description</dd><dd><code>bufferedImageType</code> - the image type of the <code>BufferedImage</code>
1149 instance that will be created (for instance,
1150 <code>BufferedImage.TYPE_INT_RGB</code>)</dd><dd><code>flags</code> - the bitwise OR of one or more of
1151 <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP"><code>TJ.FLAG_*</code></a></dd>
1152<dt><span class="strong">Returns:</span></dt><dd>a <code>BufferedImage</code> instance containing the
1153 decompressed/decoded image.</dd>
1154<dt><span class="strong">Throws:</span></dt>
1155<dd><code>java.lang.Exception</code></dd></dl>
1156</li>
1157</ul>
1158<a name="close()">
1159<!--   -->
1160</a>
1161<ul class="blockList">
1162<li class="blockList">
1163<h4>close</h4>
1164<pre>public&nbsp;void&nbsp;close()
1165           throws java.lang.Exception</pre>
1166<div class="block">Free the native structures associated with this decompressor instance.</div>
1167<dl><dt><span class="strong">Throws:</span></dt>
1168<dd><code>java.lang.Exception</code></dd></dl>
1169</li>
1170</ul>
1171<a name="finalize()">
1172<!--   -->
1173</a>
1174<ul class="blockListLast">
1175<li class="blockList">
1176<h4>finalize</h4>
1177<pre>protected&nbsp;void&nbsp;finalize()
1178                 throws java.lang.Throwable</pre>
1179<dl>
1180<dt><strong>Overrides:</strong></dt>
1181<dd><code>finalize</code>&nbsp;in class&nbsp;<code>java.lang.Object</code></dd>
1182<dt><span class="strong">Throws:</span></dt>
1183<dd><code>java.lang.Throwable</code></dd></dl>
1184</li>
1185</ul>
1186</li>
1187</ul>
1188</li>
1189</ul>
1190</div>
1191</div>
1192<!-- ========= END OF CLASS DATA ========= -->
1193<!-- ======= START OF BOTTOM NAVBAR ====== -->
1194<div class="bottomNav"><a name="navbar_bottom">
1195<!--   -->
1196</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
1197<!--   -->
1198</a>
1199<ul class="navList" title="Navigation">
1200<li><a href="../../../org/libjpegturbo/turbojpeg/package-summary.html">Package</a></li>
1201<li class="navBarCell1Rev">Class</li>
1202<li><a href="package-tree.html">Tree</a></li>
1203<li><a href="../../../deprecated-list.html">Deprecated</a></li>
1204<li><a href="../../../index-all.html">Index</a></li>
1205<li><a href="../../../help-doc.html">Help</a></li>
1206</ul>
1207</div>
1208<div class="subNav">
1209<ul class="navList">
1210<li><a href="../../../org/libjpegturbo/turbojpeg/TJCustomFilter.html" title="interface in org.libjpegturbo.turbojpeg"><span class="strong">Prev Class</span></a></li>
1211<li><a href="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">Next Class</span></a></li>
1212</ul>
1213<ul class="navList">
1214<li><a href="../../../index.html?org/libjpegturbo/turbojpeg/TJDecompressor.html" target="_top">Frames</a></li>
1215<li><a href="TJDecompressor.html" target="_top">No Frames</a></li>
1216</ul>
1217<ul class="navList" id="allclasses_navbar_bottom">
1218<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
1219</ul>
1220<div>
1221<script type="text/javascript"><!--
1222  allClassesLink = document.getElementById("allclasses_navbar_bottom");
1223  if(window==top) {
1224    allClassesLink.style.display = "block";
1225  }
1226  else {
1227    allClassesLink.style.display = "none";
1228  }
1229  //-->
1230</script>
1231</div>
1232<div>
1233<ul class="subNavList">
1234<li>Summary:&nbsp;</li>
1235<li>Nested&nbsp;|&nbsp;</li>
1236<li><a href="#field_summary">Field</a>&nbsp;|&nbsp;</li>
1237<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
1238<li><a href="#method_summary">Method</a></li>
1239</ul>
1240<ul class="subNavList">
1241<li>Detail:&nbsp;</li>
1242<li><a href="#field_detail">Field</a>&nbsp;|&nbsp;</li>
1243<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
1244<li><a href="#method_detail">Method</a></li>
1245</ul>
1246</div>
1247<a name="skip-navbar_bottom">
1248<!--   -->
1249</a></div>
1250<!-- ======== END OF BOTTOM NAVBAR ======= -->
1251</body>
1252</html>
1253