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