Debian Codegraph @

java/doc/org/libjpegturbo/turbojpeg/TJDecompressor.html

raw
1 <!DOCTYPE HTML>
2 <!-- NewPage -->
3 <html lang="en">
4 <head>
5 <!-- Generated by javadoc -->
6 <title>TJDecompressor</title>
7 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
8 <link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
9 <link rel="stylesheet" type="text/css" href="../../../jquery/jquery-ui.min.css" title="Style">
10 <link rel="stylesheet" type="text/css" href="../../../jquery-ui.overrides.css" title="Style">
11 <script type="text/javascript" src="../../../script.js"></script>
12 <script type="text/javascript" src="../../../jquery/jszip/dist/jszip.min.js"></script>
13 <script type="text/javascript" src="../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
14 <!--[if IE]>
15 <script type="text/javascript" src="../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
16 <![endif]-->
17 <script type="text/javascript" src="../../../jquery/jquery-3.7.1.min.js"></script>
18 <script type="text/javascript" src="../../../jquery/jquery-ui.min.js"></script>
19 </head>
20 <body>
21 <script type="text/javascript"><!--
22 try {
23 if (location.href.indexOf('is-external=true') == -1) {
24 parent.document.title="TJDecompressor";
25 }
26 }
27 catch(err) {
28 }
29 //-->
30 var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":10,"i26":10};
31 var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
32 var altColor = "altColor";
33 var rowColor = "rowColor";
34 var tableTab = "tableTab";
35 var activeTableTab = "activeTableTab";
36 var pathtoroot = "../../../";
37 var useModuleDirectories = true;
38 loadScripts(document, 'script');</script>
39 <noscript>
40 <div>JavaScript is disabled on your browser.</div>
41 </noscript>
42 <header role="banner">
43 <nav role="navigation">
44 <div class="fixedNav">
45 <!-- ========= START OF TOP NAVBAR ======= -->
46 <div class="topNav"><a id="navbar.top">
47 <!-- -->
48 </a>
49 <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
50 <a id="navbar.top.firstrow">
51 <!-- -->
52 </a>
53 <ul class="navList" title="Navigation">
54 <li><a href="package-summary.html">Package</a></li>
55 <li class="navBarCell1Rev">Class</li>
56 <li><a href="package-tree.html">Tree</a></li>
57 <li><a href="../../../deprecated-list.html">Deprecated</a></li>
58 <li><a href="../../../index-all.html">Index</a></li>
59 <li><a href="../../../help-doc.html">Help</a></li>
60 </ul>
61 </div>
62 <div class="subNav">
63 <ul class="navList" id="allclasses_navbar_top">
64 <li><a href="../../../allclasses.html">All&nbsp;Classes</a></li>
65 </ul>
66 <ul class="navListSearch">
67 <li><label for="search">SEARCH:</label>
68 <input type="text" id="search" value="search" disabled="disabled">
69 <input type="reset" id="reset" value="reset" disabled="disabled">
70 </li>
71 </ul>
72 <div>
73 <script type="text/javascript"><!--
74 allClassesLink = document.getElementById("allclasses_navbar_top");
75 if(window==top) {
76 allClassesLink.style.display = "block";
77 }
78 else {
79 allClassesLink.style.display = "none";
80 }
81 //-->
82 </script>
83 <noscript>
84 <div>JavaScript is disabled on your browser.</div>
85 </noscript>
86 </div>
87 <div>
88 <ul class="subNavList">
89 <li>Summary:&nbsp;</li>
90 <li>Nested&nbsp;|&nbsp;</li>
91 <li>Field&nbsp;|&nbsp;</li>
92 <li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
93 <li><a href="#method.summary">Method</a></li>
94 </ul>
95 <ul class="subNavList">
96 <li>Detail:&nbsp;</li>
97 <li>Field&nbsp;|&nbsp;</li>
98 <li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
99 <li><a href="#method.detail">Method</a></li>
100 </ul>
101 </div>
102 <a id="skip.navbar.top">
103 <!-- -->
104 </a></div>
105 <!-- ========= END OF TOP NAVBAR ========= -->
106 </div>
107 <div class="navPadding">&nbsp;</div>
108 <script type="text/javascript"><!--
109 $('.navPadding').css('padding-top', $('.fixedNav').css("height"));
110 //-->
111 </script>
112 </nav>
113 </header>
114 <!-- ======== START OF CLASS DATA ======== -->
115 <main role="main">
116 <div class="header">
117 <div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="package-summary.html">org.libjpegturbo.turbojpeg</a></div>
118 <h2 title="Class TJDecompressor" class="title">Class TJDecompressor</h2>
119 </div>
120 <div class="contentContainer">
121 <ul class="inheritance">
122 <li>java.lang.Object</li>
123 <li>
124 <ul class="inheritance">
125 <li>org.libjpegturbo.turbojpeg.TJDecompressor</li>
126 </ul>
127 </li>
128 </ul>
129 <div class="description">
130 <ul class="blockList">
131 <li class="blockList">
132 <dl>
133 <dt>All Implemented Interfaces:</dt>
134 <dd><code>java.io.Closeable</code>, <code>java.lang.AutoCloseable</code></dd>
135 </dl>
136 <dl>
137 <dt>Direct Known Subclasses:</dt>
138 <dd><code><a href="TJTransformer.html" title="class in org.libjpegturbo.turbojpeg">TJTransformer</a></code></dd>
139 </dl>
140 <hr>
141 <pre>public class <span class="typeNameLabel">TJDecompressor</span>
142 extends java.lang.Object
143 implements java.io.Closeable</pre>
144 <div class="block">TurboJPEG decompressor</div>
145 </li>
146 </ul>
147 </div>
148 <div class="summary">
149 <ul class="blockList">
150 <li class="blockList">
151 <!-- ======== CONSTRUCTOR SUMMARY ======== -->
152 <section>
153 <ul class="blockList">
154 <li class="blockList"><a id="constructor.summary">
155 <!-- -->
156 </a>
157 <h3>Constructor Summary</h3>
158 <table class="memberSummary">
159 <caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
160 <tr>
161 <th class="colFirst" scope="col">Constructor</th>
162 <th class="colLast" scope="col">Description</th>
163 </tr>
164 <tr class="altColor">
165 <th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E()">TJDecompressor</a></span>()</code></th>
166 <td class="colLast">
167 <div class="block">Create a TurboJPEG decompresssor instance.</div>
168 </td>
169 </tr>
170 <tr class="rowColor">
171 <th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(byte%5B%5D)">TJDecompressor</a></span>&#8203;(byte[]&nbsp;jpegImage)</code></th>
172 <td class="colLast">
173 <div class="block">Create a TurboJPEG decompressor instance and associate the JPEG source
174 image or "abbreviated table specification" (AKA "tables-only") datastream
175 stored in <code>jpegImage</code> with the newly created instance.</div>
176 </td>
177 </tr>
178 <tr class="altColor">
179 <th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(byte%5B%5D,int)">TJDecompressor</a></span>&#8203;(byte[]&nbsp;jpegImage,
180 int&nbsp;imageSize)</code></th>
181 <td class="colLast">
182 <div class="block">Create a TurboJPEG decompressor instance and associate the JPEG source
183 image or "abbreviated table specification" (AKA "tables-only") datastream
184 of length <code>imageSize</code> bytes stored in <code>jpegImage</code>
185 with the newly created instance.</div>
186 </td>
187 </tr>
188 <tr class="rowColor">
189 <th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(org.libjpegturbo.turbojpeg.YUVImage)">TJDecompressor</a></span>&#8203;(<a href="YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a>&nbsp;yuvImage)</code></th>
190 <td class="colLast">
191 <div class="block">Create a TurboJPEG decompressor instance and associate the
192 8-bit-per-sample planar YUV source image stored in <code>yuvImage</code>
193 with the newly created instance.</div>
194 </td>
195 </tr>
196 </table>
197 </li>
198 </ul>
199 </section>
200 <!-- ========== METHOD SUMMARY =========== -->
201 <section>
202 <ul class="blockList">
203 <li class="blockList"><a id="method.summary">
204 <!-- -->
205 </a>
206 <h3>Method Summary</h3>
207 <table class="memberSummary">
208 <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
209 <tr>
210 <th class="colFirst" scope="col">Modifier and Type</th>
211 <th class="colSecond" scope="col">Method</th>
212 <th class="colLast" scope="col">Description</th>
213 </tr>
214 <tr id="i0" class="altColor">
215 <td class="colFirst"><code>void</code></td>
216 <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#close()">close</a></span>()</code></th>
217 <td class="colLast">
218 <div class="block">Free the native structures associated with this decompressor instance.</div>
219 </td>
220 </tr>
221 <tr id="i1" class="rowColor">
222 <td class="colFirst"><code>short[]</code></td>
223 <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#decompress12(int,int)">decompress12</a></span>&#8203;(int&nbsp;pitch,
224 int&nbsp;pixelFormat)</code></th>
225 <td class="colLast">
226 <div class="block">Decompress the JPEG source image with 9 to 12 bits per sample associated
227 with this decompressor instance and return a buffer containing a
228 packed-pixel decompressed image with the same data precision.</div>
229 </td>
230 </tr>
231 <tr id="i2" class="altColor">
232 <td class="colFirst"><code>void</code></td>
233 <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#decompress12(short%5B%5D,int,int,int,int)">decompress12</a></span>&#8203;(short[]&nbsp;dstBuf,
234 int&nbsp;x,
235 int&nbsp;y,
236 int&nbsp;pitch,
237 int&nbsp;pixelFormat)</code></th>
238 <td class="colLast">
239 <div class="block">Decompress the JPEG source image with 9 to 12 bits per sample associated
240 with this decompressor instance and output a packed-pixel grayscale, RGB,
241 or CMYK image with the same data precision to the given destination
242 buffer.</div>
243 </td>
244 </tr>
245 <tr id="i3" class="rowColor">
246 <td class="colFirst"><code>short[]</code></td>
247 <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#decompress16(int,int)">decompress16</a></span>&#8203;(int&nbsp;pitch,
248 int&nbsp;pixelFormat)</code></th>
249 <td class="colLast">
250 <div class="block">Decompress the JPEG source image with 13 to 16 bits per sample associated
251 with this decompressor instance and return a buffer containing a
252 packed-pixel decompressed image with the same data precision.</div>
253 </td>
254 </tr>
255 <tr id="i4" class="altColor">
256 <td class="colFirst"><code>void</code></td>
257 <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#decompress16(short%5B%5D,int,int,int,int)">decompress16</a></span>&#8203;(short[]&nbsp;dstBuf,
258 int&nbsp;x,
259 int&nbsp;y,
260 int&nbsp;pitch,
261 int&nbsp;pixelFormat)</code></th>
262 <td class="colLast">
263 <div class="block">Decompress the JPEG source image with 13 to 16 bits per sample associated
264 with this decompressor instance and output a packed-pixel grayscale, RGB,
265 or CMYK image with the same data precision to the given destination
266 buffer.</div>
267 </td>
268 </tr>
269 <tr id="i5" class="rowColor">
270 <td class="colFirst"><code>void</code></td>
271 <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#decompress8(byte%5B%5D,int,int,int,int)">decompress8</a></span>&#8203;(byte[]&nbsp;dstBuf,
272 int&nbsp;x,
273 int&nbsp;y,
274 int&nbsp;pitch,
275 int&nbsp;pixelFormat)</code></th>
276 <td class="colLast">
277 <div class="block">Decompress the JPEG source image with 2 to 8 bits per sample, or decode
278 the 8-bit-per-sample planar YUV source image, associated with this
279 decompressor instance and output a packed-pixel grayscale, RGB, or CMYK
280 image with the same data precision to the given destination buffer.</div>
281 </td>
282 </tr>
283 <tr id="i6" class="altColor">
284 <td class="colFirst"><code>java.awt.image.BufferedImage</code></td>
285 <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#decompress8(int)">decompress8</a></span>&#8203;(int&nbsp;bufferedImageType)</code></th>
286 <td class="colLast">
287 <div class="block">Decompress the 8-bit-per-sample JPEG source image or decode the planar YUV
288 source image associated with this decompressor instance and return a
289 <code>BufferedImage</code> instance containing the 8-bit-per-sample
290 packed-pixel decompressed/decoded image.</div>
291 </td>
292 </tr>
293 <tr id="i7" class="rowColor">
294 <td class="colFirst"><code>void</code></td>
295 <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#decompress8(int%5B%5D,int,int,int,int)">decompress8</a></span>&#8203;(int[]&nbsp;dstBuf,
296 int&nbsp;x,
297 int&nbsp;y,
298 int&nbsp;stride,
299 int&nbsp;pixelFormat)</code></th>
300 <td class="colLast">
301 <div class="block">Decompress the 8-bit-per-sample JPEG source image or decode the planar YUV
302 source image associated with this decompressor instance and output an
303 8-bit-per-sample packed-pixel grayscale, RGB, or CMYK image to the given
304 destination buffer.</div>
305 </td>
306 </tr>
307 <tr id="i8" class="altColor">
308 <td class="colFirst"><code>byte[]</code></td>
309 <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#decompress8(int,int)">decompress8</a></span>&#8203;(int&nbsp;pitch,
310 int&nbsp;pixelFormat)</code></th>
311 <td class="colLast">
312 <div class="block">Decompress the JPEG source image with 2 to 8 bits per sample, or decode
313 the 8-bit-per-sample planar YUV source image, associated with this
314 decompressor instance and return a buffer containing a packed-pixel
315 decompressed image with the same data precision.</div>
316 </td>
317 </tr>
318 <tr id="i9" class="rowColor">
319 <td class="colFirst"><code>void</code></td>
320 <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#decompress8(java.awt.image.BufferedImage)">decompress8</a></span>&#8203;(java.awt.image.BufferedImage&nbsp;dstImage)</code></th>
321 <td class="colLast">
322 <div class="block">Decompress the 8-bit-per-sample JPEG source image or decode the planar YUV
323 source image associated with this decompressor instance and output an
324 8-bit-per-sample packed-pixel decompressed/decoded image to the given
325 <code>BufferedImage</code> instance.</div>
326 </td>
327 </tr>
328 <tr id="i10" class="altColor">
329 <td class="colFirst"><code><a href="YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a></code></td>
330 <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#decompressToYUV(int)">decompressToYUV</a></span>&#8203;(int&nbsp;align)</code></th>
331 <td class="colLast">
332 <div class="block">Decompress the 8-bit-per-sample JPEG source image associated with this
333 decompressor instance into an 8-bit-per-sample unified planar YUV image
334 and return a <a href="YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>YUVImage</code></a> instance containing the decompressed image.</div>
335 </td>
336 </tr>
337 <tr id="i11" class="rowColor">
338 <td class="colFirst"><code><a href="YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a></code></td>
339 <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#decompressToYUV(int%5B%5D)">decompressToYUV</a></span>&#8203;(int[]&nbsp;strides)</code></th>
340 <td class="colLast">
341 <div class="block">Decompress the 8-bit-per-sample JPEG source image associated with this
342 decompressor instance into a set of 8-bit-per-sample Y, U (Cb), and V (Cr)
343 image planes and return a <a href="YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>YUVImage</code></a> instance containing the
344 decompressed image planes.</div>
345 </td>
346 </tr>
347 <tr id="i12" class="altColor">
348 <td class="colFirst"><code>void</code></td>
349 <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#decompressToYUV(org.libjpegturbo.turbojpeg.YUVImage)">decompressToYUV</a></span>&#8203;(<a href="YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a>&nbsp;dstImage)</code></th>
350 <td class="colLast">
351 <div class="block">Decompress the 8-bit-per-sample JPEG source image associated with this
352 decompressor instance into an 8-bit-per-sample planar YUV image and store
353 it in the given <a href="YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>YUVImage</code></a> instance.</div>
354 </td>
355 </tr>
356 <tr id="i13" class="rowColor">
357 <td class="colFirst"><code>protected void</code></td>
358 <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#finalize()">finalize</a></span>()</code></th>
359 <td class="colLast">&nbsp;</td>
360 </tr>
361 <tr id="i14" class="altColor">
362 <td class="colFirst"><code>int</code></td>
363 <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#get(int)">get</a></span>&#8203;(int&nbsp;param)</code></th>
364 <td class="colLast">
365 <div class="block">Get the value of a decompression parameter.</div>
366 </td>
367 </tr>
368 <tr id="i15" class="rowColor">
369 <td class="colFirst"><code>int</code></td>
370 <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getHeight()">getHeight</a></span>()</code></th>
371 <td class="colLast">
372 <div class="block">Returns the height of the source image (JPEG or YUV) associated with this
373 decompressor instance.</div>
374 </td>
375 </tr>
376 <tr id="i16" class="altColor">
377 <td class="colFirst"><code>byte[]</code></td>
378 <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getICCProfile()">getICCProfile</a></span>()</code></th>
379 <td class="colLast">
380 <div class="block">Retrieve the ICC (International Color Consortium) color management profile
381 (if any) that was previously extracted from the JPEG image associated with
382 this decompressor instance (see <a href="#setSourceImage(byte%5B%5D,int)"><code>setSourceImage(byte[], int)</code></a>), and
383 return a buffer containing the ICC profile.</div>
384 </td>
385 </tr>
386 <tr id="i17" class="rowColor">
387 <td class="colFirst"><code>int</code></td>
388 <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getICCSize()">getICCSize</a></span>()</code></th>
389 <td class="colLast">
390 <div class="block">Returns the size of the ICC profile (if any) that was previously extracted
391 from the JPEG image associated with this decompressor instance
392 (see <a href="#setSourceImage(byte%5B%5D,int)"><code>setSourceImage(byte[], int)</code></a>), or 0 if there is no ICC
393 profile to retrieve.</div>
394 </td>
395 </tr>
396 <tr id="i18" class="altColor">
397 <td class="colFirst"><code>byte[]</code></td>
398 <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getJPEGBuf()">getJPEGBuf</a></span>()</code></th>
399 <td class="colLast">
400 <div class="block">Returns the JPEG buffer associated with this decompressor instance.</div>
401 </td>
402 </tr>
403 <tr id="i19" class="rowColor">
404 <td class="colFirst"><code>int</code></td>
405 <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getJPEGSize()">getJPEGSize</a></span>()</code></th>
406 <td class="colLast">
407 <div class="block">Returns the size of the JPEG image (in bytes) associated with this
408 decompressor instance.</div>
409 </td>
410 </tr>
411 <tr id="i20" class="altColor">
412 <td class="colFirst"><code>int</code></td>
413 <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getWidth()">getWidth</a></span>()</code></th>
414 <td class="colLast">
415 <div class="block">Returns the width of the source image (JPEG or YUV) associated with this
416 decompressor instance.</div>
417 </td>
418 </tr>
419 <tr id="i21" class="rowColor">
420 <td class="colFirst"><code>void</code></td>
421 <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#saveImage(java.lang.String,java.lang.Object,int,int,int,int,int,int)">saveImage</a></span>&#8203;(java.lang.String&nbsp;fileName,
422 java.lang.Object&nbsp;image,
423 int&nbsp;x,
424 int&nbsp;y,
425 int&nbsp;width,
426 int&nbsp;pitch,
427 int&nbsp;height,
428 int&nbsp;pixelFormat)</code></th>
429 <td class="colLast">
430 <div class="block">Save a packed-pixel image with 2 to 16 bits of data precision per sample
431 from memory to disk.</div>
432 </td>
433 </tr>
434 <tr id="i22" class="altColor">
435 <td class="colFirst"><code>void</code></td>
436 <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#set(int,int)">set</a></span>&#8203;(int&nbsp;param,
437 int&nbsp;value)</code></th>
438 <td class="colLast">
439 <div class="block">Set the value of a decompression parameter.</div>
440 </td>
441 </tr>
442 <tr id="i23" class="rowColor">
443 <td class="colFirst"><code>void</code></td>
444 <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setCroppingRegion(java.awt.Rectangle)">setCroppingRegion</a></span>&#8203;(java.awt.Rectangle&nbsp;croppingRegion)</code></th>
445 <td class="colLast">
446 <div class="block">Set the cropping region for partially decompressing a lossy JPEG image
447 into a packed-pixel image.</div>
448 </td>
449 </tr>
450 <tr id="i24" class="altColor">
451 <td class="colFirst"><code>void</code></td>
452 <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setScalingFactor(org.libjpegturbo.turbojpeg.TJScalingFactor)">setScalingFactor</a></span>&#8203;(<a href="TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg">TJScalingFactor</a>&nbsp;scalingFactor)</code></th>
453 <td class="colLast">
454 <div class="block">Set the scaling factor for subsequent lossy decompression operations.</div>
455 </td>
456 </tr>
457 <tr id="i25" class="rowColor">
458 <td class="colFirst"><code>void</code></td>
459 <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setSourceImage(byte%5B%5D,int)">setSourceImage</a></span>&#8203;(byte[]&nbsp;jpegImage,
460 int&nbsp;imageSize)</code></th>
461 <td class="colLast">
462 <div class="block">Associate the JPEG image or "abbreviated table specification" (AKA
463 "tables-only") datastream of length <code>imageSize</code> bytes stored in
464 <code>jpegImage</code> with this decompressor instance.</div>
465 </td>
466 </tr>
467 <tr id="i26" class="altColor">
468 <td class="colFirst"><code>void</code></td>
469 <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setSourceImage(org.libjpegturbo.turbojpeg.YUVImage)">setSourceImage</a></span>&#8203;(<a href="YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a>&nbsp;srcImage)</code></th>
470 <td class="colLast">
471 <div class="block">Associate the specified planar YUV source image with this decompressor
472 instance.</div>
473 </td>
474 </tr>
475 </table>
476 <ul class="blockList">
477 <li class="blockList"><a id="methods.inherited.from.class.java.lang.Object">
478 <!-- -->
479 </a>
480 <h3>Methods inherited from class&nbsp;java.lang.Object</h3>
481 <code>clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
482 </ul>
483 </li>
484 </ul>
485 </section>
486 </li>
487 </ul>
488 </div>
489 <div class="details">
490 <ul class="blockList">
491 <li class="blockList">
492 <!-- ========= CONSTRUCTOR DETAIL ======== -->
493 <section>
494 <ul class="blockList">
495 <li class="blockList"><a id="constructor.detail">
496 <!-- -->
497 </a>
498 <h3>Constructor Detail</h3>
499 <a id="&lt;init&gt;()">
500 <!-- -->
501 </a>
502 <ul class="blockList">
503 <li class="blockList">
504 <h4>TJDecompressor</h4>
505 <pre>public&nbsp;TJDecompressor()
506 throws <a href="TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
507 <div class="block">Create a TurboJPEG decompresssor instance.</div>
508 <dl>
509 <dt><span class="throwsLabel">Throws:</span></dt>
510 <dd><code><a href="TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd>
511 </dl>
512 </li>
513 </ul>
514 <a id="&lt;init&gt;(byte[])">
515 <!-- -->
516 </a>
517 <ul class="blockList">
518 <li class="blockList">
519 <h4>TJDecompressor</h4>
520 <pre>public&nbsp;TJDecompressor&#8203;(byte[]&nbsp;jpegImage)
521 throws <a href="TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
522 <div class="block">Create a TurboJPEG decompressor instance and associate the JPEG source
523 image or "abbreviated table specification" (AKA "tables-only") datastream
524 stored in <code>jpegImage</code> with the newly created instance. Refer
525 to <a href="#setSourceImage(byte%5B%5D,int)"><code>setSourceImage(byte[], int)</code></a> for more details.</div>
526 <dl>
527 <dt><span class="paramLabel">Parameters:</span></dt>
528 <dd><code>jpegImage</code> - buffer containing a JPEG source image or tables-only
529 datastream. (The size of the JPEG image or datastream is assumed to be
530 the length of the array.) This buffer is not modified.</dd>
531 <dt><span class="throwsLabel">Throws:</span></dt>
532 <dd><code><a href="TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd>
533 </dl>
534 </li>
535 </ul>
536 <a id="&lt;init&gt;(byte[],int)">
537 <!-- -->
538 </a>
539 <ul class="blockList">
540 <li class="blockList">
541 <h4>TJDecompressor</h4>
542 <pre>public&nbsp;TJDecompressor&#8203;(byte[]&nbsp;jpegImage,
543 int&nbsp;imageSize)
544 throws <a href="TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
545 <div class="block">Create a TurboJPEG decompressor instance and associate the JPEG source
546 image or "abbreviated table specification" (AKA "tables-only") datastream
547 of length <code>imageSize</code> bytes stored in <code>jpegImage</code>
548 with the newly created instance. Refer to
549 <a href="#setSourceImage(byte%5B%5D,int)"><code>setSourceImage(byte[], int)</code></a> for more details.</div>
550 <dl>
551 <dt><span class="paramLabel">Parameters:</span></dt>
552 <dd><code>jpegImage</code> - buffer containing a JPEG source image or tables-only
553 datastream. This buffer is not modified.</dd>
554 <dd><code>imageSize</code> - size of the JPEG source image or tables-only datastream
555 (in bytes)</dd>
556 <dt><span class="throwsLabel">Throws:</span></dt>
557 <dd><code><a href="TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd>
558 </dl>
559 </li>
560 </ul>
561 <a id="&lt;init&gt;(org.libjpegturbo.turbojpeg.YUVImage)">
562 <!-- -->
563 </a>
564 <ul class="blockListLast">
565 <li class="blockList">
566 <h4>TJDecompressor</h4>
567 <pre>public&nbsp;TJDecompressor&#8203;(<a href="YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a>&nbsp;yuvImage)
568 throws <a href="TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
569 <div class="block">Create a TurboJPEG decompressor instance and associate the
570 8-bit-per-sample planar YUV source image stored in <code>yuvImage</code>
571 with the newly created instance. Refer to
572 <a href="#setSourceImage(org.libjpegturbo.turbojpeg.YUVImage)"><code>setSourceImage(YUVImage)</code></a> for more details.</div>
573 <dl>
574 <dt><span class="paramLabel">Parameters:</span></dt>
575 <dd><code>yuvImage</code> - <a href="YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>YUVImage</code></a> instance containing a planar YUV source
576 image to be decoded. This image is not modified.</dd>
577 <dt><span class="throwsLabel">Throws:</span></dt>
578 <dd><code><a href="TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd>
579 </dl>
580 </li>
581 </ul>
582 </li>
583 </ul>
584 </section>
585 <!-- ============ METHOD DETAIL ========== -->
586 <section>
587 <ul class="blockList">
588 <li class="blockList"><a id="method.detail">
589 <!-- -->
590 </a>
591 <h3>Method Detail</h3>
592 <a id="setSourceImage(byte[],int)">
593 <!-- -->
594 </a>
595 <ul class="blockList">
596 <li class="blockList">
597 <h4>setSourceImage</h4>
598 <pre class="methodSignature">public&nbsp;void&nbsp;setSourceImage&#8203;(byte[]&nbsp;jpegImage,
599 int&nbsp;imageSize)
600 throws <a href="TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
601 <div class="block">Associate the JPEG image or "abbreviated table specification" (AKA
602 "tables-only") datastream of length <code>imageSize</code> bytes stored in
603 <code>jpegImage</code> with this decompressor instance. If
604 <code>jpegImage</code> contains a JPEG image, then this image will be used
605 as the source image for subsequent decompression operations. Passing a
606 tables-only datastream to this method primes the decompressor with
607 quantization and Huffman tables that can be used when decompressing
608 subsequent "abbreviated image" datastreams. This is useful, for instance,
609 when decompressing video streams in which all frames share the same
610 quantization and Huffman tables. If a JPEG image is passed to this
611 method, then the <a href="TJ.html#PARAM_STOPONWARNING"><code>parameters</code></a> that describe
612 the JPEG image will be set when the method returns. If a JPEG image is
613 passed to this method and <a href="TJ.html#PARAM_SAVEMARKERS"><code>TJ.PARAM_SAVEMARKERS</code></a> is set to
614 <code>2</code> or <code>4</code>, then the ICC profile (if any) will be
615 extracted from the JPEG image. (<a href="#getICCProfile()"><code>getICCProfile()</code></a> can then be used
616 to retrieve the profile.)</div>
617 <dl>
618 <dt><span class="paramLabel">Parameters:</span></dt>
619 <dd><code>jpegImage</code> - buffer containing a JPEG source image or tables-only
620 datastream. This buffer is not modified.</dd>
621 <dd><code>imageSize</code> - size of the JPEG source image or tables-only datastream
622 (in bytes)</dd>
623 <dt><span class="throwsLabel">Throws:</span></dt>
624 <dd><code><a href="TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd>
625 </dl>
626 </li>
627 </ul>
628 <a id="setSourceImage(org.libjpegturbo.turbojpeg.YUVImage)">
629 <!-- -->
630 </a>
631 <ul class="blockList">
632 <li class="blockList">
633 <h4>setSourceImage</h4>
634 <pre class="methodSignature">public&nbsp;void&nbsp;setSourceImage&#8203;(<a href="YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a>&nbsp;srcImage)</pre>
635 <div class="block">Associate the specified planar YUV source image with this decompressor
636 instance. Subsequent decompression operations will decode this image into
637 a packed-pixel RGB or grayscale destination image. This method sets
638 <a href="TJ.html#PARAM_SUBSAMP"><code>TJ.PARAM_SUBSAMP</code></a> to the chrominance subsampling level of the
639 source image.</div>
640 <dl>
641 <dt><span class="paramLabel">Parameters:</span></dt>
642 <dd><code>srcImage</code> - <a href="YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>YUVImage</code></a> instance containing a planar YUV source
643 image to be decoded. This image is not modified.</dd>
644 </dl>
645 </li>
646 </ul>
647 <a id="getWidth()">
648 <!-- -->
649 </a>
650 <ul class="blockList">
651 <li class="blockList">
652 <h4>getWidth</h4>
653 <pre class="methodSignature">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>
657 <dt><span class="returnLabel">Returns:</span></dt>
658 <dd>the width of the source image (JPEG or YUV) associated with this
659 decompressor instance.</dd>
660 </dl>
661 </li>
662 </ul>
663 <a id="getHeight()">
664 <!-- -->
665 </a>
666 <ul class="blockList">
667 <li class="blockList">
668 <h4>getHeight</h4>
669 <pre class="methodSignature">public&nbsp;int&nbsp;getHeight()</pre>
670 <div class="block">Returns the height of the source image (JPEG or YUV) associated with this
671 decompressor instance.</div>
672 <dl>
673 <dt><span class="returnLabel">Returns:</span></dt>
674 <dd>the height of the source image (JPEG or YUV) associated with this
675 decompressor instance.</dd>
676 </dl>
677 </li>
678 </ul>
679 <a id="set(int,int)">
680 <!-- -->
681 </a>
682 <ul class="blockList">
683 <li class="blockList">
684 <h4>set</h4>
685 <pre class="methodSignature">public&nbsp;void&nbsp;set&#8203;(int&nbsp;param,
686 int&nbsp;value)</pre>
687 <div class="block">Set the value of a decompression parameter.</div>
688 <dl>
689 <dt><span class="paramLabel">Parameters:</span></dt>
690 <dd><code>param</code> - one of <a href="TJ.html#PARAM_STOPONWARNING"><code>TJ.PARAM_*</code></a></dd>
691 <dd><code>value</code> - value of the decompression parameter (refer to
692 <a href="TJ.html#PARAM_STOPONWARNING"><code>parameter documentation</code></a>)</dd>
693 </dl>
694 </li>
695 </ul>
696 <a id="get(int)">
697 <!-- -->
698 </a>
699 <ul class="blockList">
700 <li class="blockList">
701 <h4>get</h4>
702 <pre class="methodSignature">public&nbsp;int&nbsp;get&#8203;(int&nbsp;param)</pre>
703 <div class="block">Get the value of a decompression parameter.</div>
704 <dl>
705 <dt><span class="paramLabel">Parameters:</span></dt>
706 <dd><code>param</code> - one of <a href="TJ.html#PARAM_STOPONWARNING"><code>TJ.PARAM_*</code></a></dd>
707 <dt><span class="returnLabel">Returns:</span></dt>
708 <dd>the value of the specified decompression parameter, or -1 if the
709 value is unknown.</dd>
710 </dl>
711 </li>
712 </ul>
713 <a id="getICCProfile()">
714 <!-- -->
715 </a>
716 <ul class="blockList">
717 <li class="blockList">
718 <h4>getICCProfile</h4>
719 <pre class="methodSignature">public&nbsp;byte[]&nbsp;getICCProfile()
720 throws <a href="TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
721 <div class="block">Retrieve the ICC (International Color Consortium) color management profile
722 (if any) that was previously extracted from the JPEG image associated with
723 this decompressor instance (see <a href="#setSourceImage(byte%5B%5D,int)"><code>setSourceImage(byte[], int)</code></a>), and
724 return a buffer containing the ICC profile. Once the ICC profile is
725 retrieved, it must be re-extracted before it can be retrieved again.</div>
726 <dl>
727 <dt><span class="returnLabel">Returns:</span></dt>
728 <dd>a buffer containing the ICC profile</dd>
729 <dt><span class="throwsLabel">Throws:</span></dt>
730 <dd><code><a href="TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd>
731 </dl>
732 </li>
733 </ul>
734 <a id="getICCSize()">
735 <!-- -->
736 </a>
737 <ul class="blockList">
738 <li class="blockList">
739 <h4>getICCSize</h4>
740 <pre class="methodSignature">public&nbsp;int&nbsp;getICCSize()</pre>
741 <div class="block">Returns the size of the ICC profile (if any) that was previously extracted
742 from the JPEG image associated with this decompressor instance
743 (see <a href="#setSourceImage(byte%5B%5D,int)"><code>setSourceImage(byte[], int)</code></a>), or 0 if there is no ICC
744 profile to retrieve.</div>
745 <dl>
746 <dt><span class="returnLabel">Returns:</span></dt>
747 <dd>the size of the ICC profile (if any) that was previously extracted
748 from the JPEG image associated with this decompressor instance
749 (see <a href="#setSourceImage(byte%5B%5D,int)"><code>setSourceImage(byte[], int)</code></a>), or 0 if there is no ICC
750 profile to retrieve.</dd>
751 </dl>
752 </li>
753 </ul>
754 <a id="setScalingFactor(org.libjpegturbo.turbojpeg.TJScalingFactor)">
755 <!-- -->
756 </a>
757 <ul class="blockList">
758 <li class="blockList">
759 <h4>setScalingFactor</h4>
760 <pre class="methodSignature">public&nbsp;void&nbsp;setScalingFactor&#8203;(<a href="TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg">TJScalingFactor</a>&nbsp;scalingFactor)</pre>
761 <div class="block">Set the scaling factor for subsequent lossy decompression operations.</div>
762 <dl>
763 <dt><span class="paramLabel">Parameters:</span></dt>
764 <dd><code>scalingFactor</code> - <a href="TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg"><code>TJScalingFactor</code></a> instance that specifies a
765 fractional scaling factor that the decompressor supports (see
766 <a href="TJ.html#getScalingFactors()"><code>TJ.getScalingFactors()</code></a>), or <a href="TJ.html#UNSCALED"><code>TJ.UNSCALED</code></a> for no scaling.
767 Decompression scaling is a function of the IDCT algorithm, so scaling
768 factors are generally limited to multiples of 1/8. If the entire JPEG
769 image will be decompressed, then the width and height of the scaled
770 destination image can be determined by calling
771 <code>scalingFactor.</code><a href="TJScalingFactor.html#getScaled(int)"><code>getScaled()</code></a>
772 with the JPEG image width and height (see <a href="#getWidth()"><code>getWidth()</code></a> and
773 <a href="#getHeight()"><code>getHeight()</code></a>.) When decompressing into a planar YUV image, an
774 intermediate buffer copy will be performed if the width or height of the
775 scaled destination image is not an even multiple of the iMCU size (see
776 <a href="TJ.html#getMCUWidth(int)"><code>TJ.getMCUWidth()</code></a> and <a href="TJ.html#getMCUHeight(int)"><code>TJ.getMCUHeight()</code></a>.) Note that decompression scaling is not available
777 (and the specified scaling factor is ignored) when decompressing lossless
778 JPEG images (see <a href="TJ.html#PARAM_LOSSLESS"><code>TJ.PARAM_LOSSLESS</code></a>), since the IDCT algorithm is
779 not used with those images. Note also that <a href="TJ.html#PARAM_FASTDCT"><code>TJ.PARAM_FASTDCT</code></a> is
780 ignored when decompression scaling is enabled.</dd>
781 </dl>
782 </li>
783 </ul>
784 <a id="setCroppingRegion(java.awt.Rectangle)">
785 <!-- -->
786 </a>
787 <ul class="blockList">
788 <li class="blockList">
789 <h4>setCroppingRegion</h4>
790 <pre class="methodSignature">public&nbsp;void&nbsp;setCroppingRegion&#8203;(java.awt.Rectangle&nbsp;croppingRegion)
791 throws <a href="TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
792 <div class="block">Set the cropping region for partially decompressing a lossy JPEG image
793 into a packed-pixel image.</div>
794 <dl>
795 <dt><span class="paramLabel">Parameters:</span></dt>
796 <dd><code>croppingRegion</code> - <code>java.awt.Rectangle</code> instance that
797 specifies a subregion of the JPEG image to decompress, or
798 <a href="TJ.html#UNCROPPED"><code>TJ.UNCROPPED</code></a> for no cropping. The left boundary of the cropping
799 region must be evenly divisible by the scaled iMCU width, which can be
800 determined by calling <a href="TJScalingFactor.html#getScaled(int)"><code>TJScalingFactor.getScaled()</code></a> with the specified scaling factor (see
801 <a href="#setScalingFactor(org.libjpegturbo.turbojpeg.TJScalingFactor)"><code>setScalingFactor()</code></a>) and the iMCU width (see
802 <a href="TJ.html#getMCUWidth(int)"><code>TJ.getMCUWidth()</code></a>) for the level of chrominance
803 subsampling in the JPEG image (see <a href="TJ.html#PARAM_SUBSAMP"><code>TJ.PARAM_SUBSAMP</code></a>.) The
804 cropping region should be specified relative to the scaled image
805 dimensions. Unless <code>croppingRegion</code> is <a href="TJ.html#UNCROPPED"><code>TJ.UNCROPPED</code></a>,
806 the JPEG header must be read (see <a href="#setSourceImage(byte%5B%5D,int)"><code>setSourceImage(byte[], int)</code></a>)
807 prior to calling this method.</dd>
808 <dt><span class="throwsLabel">Throws:</span></dt>
809 <dd><code><a href="TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd>
810 </dl>
811 </li>
812 </ul>
813 <a id="getJPEGBuf()">
814 <!-- -->
815 </a>
816 <ul class="blockList">
817 <li class="blockList">
818 <h4>getJPEGBuf</h4>
819 <pre class="methodSignature">public&nbsp;byte[]&nbsp;getJPEGBuf()</pre>
820 <div class="block">Returns the JPEG buffer associated with this decompressor instance.</div>
821 <dl>
822 <dt><span class="returnLabel">Returns:</span></dt>
823 <dd>the JPEG buffer associated with this decompressor instance.</dd>
824 </dl>
825 </li>
826 </ul>
827 <a id="getJPEGSize()">
828 <!-- -->
829 </a>
830 <ul class="blockList">
831 <li class="blockList">
832 <h4>getJPEGSize</h4>
833 <pre class="methodSignature">public&nbsp;int&nbsp;getJPEGSize()</pre>
834 <div class="block">Returns the size of the JPEG image (in bytes) associated with this
835 decompressor instance.</div>
836 <dl>
837 <dt><span class="returnLabel">Returns:</span></dt>
838 <dd>the size of the JPEG image (in bytes) associated with this
839 decompressor instance.</dd>
840 </dl>
841 </li>
842 </ul>
843 <a id="decompress8(byte[],int,int,int,int)">
844 <!-- -->
845 </a>
846 <ul class="blockList">
847 <li class="blockList">
848 <h4>decompress8</h4>
849 <pre class="methodSignature">public&nbsp;void&nbsp;decompress8&#8203;(byte[]&nbsp;dstBuf,
850 int&nbsp;x,
851 int&nbsp;y,
852 int&nbsp;pitch,
853 int&nbsp;pixelFormat)
854 throws <a href="TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
855 <div class="block">Decompress the JPEG source image with 2 to 8 bits per sample, or decode
856 the 8-bit-per-sample planar YUV source image, associated with this
857 decompressor instance and output a packed-pixel grayscale, RGB, or CMYK
858 image with the same data precision to the given destination buffer.
859
860 <p>NOTE: The destination image is fully recoverable if this method throws
861 a non-fatal <a href="TJException.html" title="class in org.libjpegturbo.turbojpeg"><code>TJException</code></a> (unless <a href="TJ.html#PARAM_STOPONWARNING"><code>TJ.PARAM_STOPONWARNING</code></a> is
862 set.)</div>
863 <dl>
864 <dt><span class="paramLabel">Parameters:</span></dt>
865 <dd><code>dstBuf</code> - buffer that will receive the packed-pixel
866 decompressed/decoded image. This buffer should normally be
867 <code>pitch * destinationHeight</code> bytes in size. However, the buffer
868 may also be larger, in which case the <code>x</code>, <code>y</code>, and
869 <code>pitch</code> parameters can be used to specify the region into which
870 the source image should be decompressed/decoded. NOTE: If the source
871 image is a lossy JPEG image, then <code>destinationHeight</code> is either
872 the scaled JPEG height (see <a href="#setScalingFactor(org.libjpegturbo.turbojpeg.TJScalingFactor)"><code>setScalingFactor()</code></a>,
873 <a href="TJScalingFactor.html#getScaled(int)"><code>TJScalingFactor.getScaled()</code></a>, and
874 <a href="#getHeight()"><code>getHeight()</code></a>) or the height of the cropping region (see
875 <a href="#setCroppingRegion(java.awt.Rectangle)"><code>setCroppingRegion()</code></a>.) If the source image is a
876 YUV image or a lossless JPEG image, then <code>destinationHeight</code> is
877 the height of the source image.</dd>
878 <dd><code>x</code> - x offset (in pixels) of the region in the destination image into
879 which the source image should be decompressed/decoded</dd>
880 <dd><code>y</code> - y offset (in pixels) of the region in the destination image into
881 which the source image should be decompressed/decoded</dd>
882 <dd><code>pitch</code> - bytes per row in the destination image. Normally this should
883 be set to <code>destinationWidth *
884 <a href="TJ.html#getPixelSize(int)"><code>TJ.getPixelSize</code></a>(pixelFormat)</code>, if the
885 destination image will be unpadded. (Setting this parameter to 0 is the
886 equivalent of setting it to <code>destinationWidth *
887 <a href="TJ.html#getPixelSize(int)"><code>TJ.getPixelSize</code></a>(pixelFormat)</code>.) However,
888 you can also use this parameter to specify the row alignment/padding of
889 the destination image, to skip rows, or to decompress/decode into a
890 specific region of a larger image. NOTE: If the source image is a lossy
891 JPEG image, then <code>destinationWidth</code> is either the scaled JPEG
892 width (see <a href="#setScalingFactor(org.libjpegturbo.turbojpeg.TJScalingFactor)"><code>setScalingFactor()</code></a>,
893 <a href="TJScalingFactor.html#getScaled(int)"><code>TJScalingFactor.getScaled()</code></a>, and
894 <a href="#getWidth()"><code>getWidth()</code></a>) or the width of the cropping region (see
895 <a href="#setCroppingRegion(java.awt.Rectangle)"><code>setCroppingRegion()</code></a>.) If the source image is a
896 YUV image or a lossless JPEG image, then <code>destinationWidth</code> is
897 the width of the source image.</dd>
898 <dd><code>pixelFormat</code> - pixel format of the decompressed/decoded image (one of
899 <a href="TJ.html#PF_RGB"><code>TJ.PF_*</code></a>)</dd>
900 <dt><span class="throwsLabel">Throws:</span></dt>
901 <dd><code><a href="TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd>
902 </dl>
903 </li>
904 </ul>
905 <a id="decompress8(int,int)">
906 <!-- -->
907 </a>
908 <ul class="blockList">
909 <li class="blockList">
910 <h4>decompress8</h4>
911 <pre class="methodSignature">public&nbsp;byte[]&nbsp;decompress8&#8203;(int&nbsp;pitch,
912 int&nbsp;pixelFormat)
913 throws <a href="TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
914 <div class="block">Decompress the JPEG source image with 2 to 8 bits per sample, or decode
915 the 8-bit-per-sample planar YUV source image, associated with this
916 decompressor instance and return a buffer containing a packed-pixel
917 decompressed image with the same data precision.</div>
918 <dl>
919 <dt><span class="paramLabel">Parameters:</span></dt>
920 <dd><code>pitch</code> - see
921 <a href="#decompress8(byte%5B%5D,int,int,int,int)"><code>decompress8(byte[], int, int, int, int)</code></a> for description</dd>
922 <dd><code>pixelFormat</code> - pixel format of the decompressed image (one of
923 <a href="TJ.html#PF_RGB"><code>TJ.PF_*</code></a>)</dd>
924 <dt><span class="returnLabel">Returns:</span></dt>
925 <dd>a buffer containing a packed-pixel decompressed image with 2 to 8
926 bits of data precision per sample.</dd>
927 <dt><span class="throwsLabel">Throws:</span></dt>
928 <dd><code><a href="TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd>
929 </dl>
930 </li>
931 </ul>
932 <a id="decompress12(short[],int,int,int,int)">
933 <!-- -->
934 </a>
935 <ul class="blockList">
936 <li class="blockList">
937 <h4>decompress12</h4>
938 <pre class="methodSignature">public&nbsp;void&nbsp;decompress12&#8203;(short[]&nbsp;dstBuf,
939 int&nbsp;x,
940 int&nbsp;y,
941 int&nbsp;pitch,
942 int&nbsp;pixelFormat)
943 throws <a href="TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
944 <div class="block">Decompress the JPEG source image with 9 to 12 bits per sample associated
945 with this decompressor instance and output a packed-pixel grayscale, RGB,
946 or CMYK image with the same data precision to the given destination
947 buffer.
948
949 <p>NOTE: The destination image is fully recoverable if this method throws
950 a non-fatal <a href="TJException.html" title="class in org.libjpegturbo.turbojpeg"><code>TJException</code></a> (unless <a href="TJ.html#PARAM_STOPONWARNING"><code>TJ.PARAM_STOPONWARNING</code></a> is
951 set.)</div>
952 <dl>
953 <dt><span class="paramLabel">Parameters:</span></dt>
954 <dd><code>dstBuf</code> - buffer that will receive the packed-pixel
955 decompressed image. This buffer should normally be
956 <code>pitch * destinationHeight</code> samples in size. However, the
957 buffer may also be larger, in which case the <code>x</code>,
958 <code>y</code>, and <code>pitch</code> parameters can be used to specify
959 the region into which the source image should be decompressed. NOTE: If
960 the source image is a lossy JPEG image, then
961 <code>destinationHeight</code> is either the scaled JPEG height (see
962 <a href="#setScalingFactor(org.libjpegturbo.turbojpeg.TJScalingFactor)"><code>setScalingFactor()</code></a>,
963 <a href="TJScalingFactor.html#getScaled(int)"><code>TJScalingFactor.getScaled()</code></a>, and
964 <a href="#getHeight()"><code>getHeight()</code></a>) or the height of the cropping region (see
965 <a href="#setCroppingRegion(java.awt.Rectangle)"><code>setCroppingRegion()</code></a>.) If the source image is a
966 lossless JPEG image, then <code>destinationHeight</code> is the height of
967 the source image.</dd>
968 <dd><code>x</code> - x offset (in pixels) of the region in the destination image into
969 which the source image should be decompressed</dd>
970 <dd><code>y</code> - y offset (in pixels) of the region in the destination image into
971 which the source image should be decompressed</dd>
972 <dd><code>pitch</code> - samples per row in the destination image. Normally this
973 should be set to <code>destinationWidth *
974 <a href="TJ.html#getPixelSize(int)"><code>TJ.getPixelSize</code></a>(pixelFormat)</code>, if the
975 destination image will be unpadded. (Setting this parameter to 0 is the
976 equivalent of setting it to <code>destinationWidth *
977 <a href="TJ.html#getPixelSize(int)"><code>TJ.getPixelSize</code></a>(pixelFormat)</code>.) However,
978 you can also use this parameter to specify the row alignment/padding of
979 the destination image, to skip rows, or to decompress into a specific
980 region of a larger image. NOTE: If the source image is a lossy JPEG
981 image, then <code>destinationWidth</code> is either the scaled JPEG width
982 (see <a href="#setScalingFactor(org.libjpegturbo.turbojpeg.TJScalingFactor)"><code>setScalingFactor()</code></a>,
983 <a href="TJScalingFactor.html#getScaled(int)"><code>TJScalingFactor.getScaled()</code></a>, and
984 <a href="#getWidth()"><code>getWidth()</code></a>) or the width of the cropping region (see
985 <a href="#setCroppingRegion(java.awt.Rectangle)"><code>setCroppingRegion()</code></a>.) If the source image is a
986 YUV image or a lossless JPEG image, then <code>destinationWidth</code> is
987 the width of the source image.</dd>
988 <dd><code>pixelFormat</code> - pixel format of the decompressed image (one of
989 <a href="TJ.html#PF_RGB"><code>TJ.PF_*</code></a>)</dd>
990 <dt><span class="throwsLabel">Throws:</span></dt>
991 <dd><code><a href="TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd>
992 </dl>
993 </li>
994 </ul>
995 <a id="decompress12(int,int)">
996 <!-- -->
997 </a>
998 <ul class="blockList">
999 <li class="blockList">
1000 <h4>decompress12</h4>
1001 <pre class="methodSignature">public&nbsp;short[]&nbsp;decompress12&#8203;(int&nbsp;pitch,
1002 int&nbsp;pixelFormat)
1003 throws <a href="TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
1004 <div class="block">Decompress the JPEG source image with 9 to 12 bits per sample associated
1005 with this decompressor instance and return a buffer containing a
1006 packed-pixel decompressed image with the same data precision.</div>
1007 <dl>
1008 <dt><span class="paramLabel">Parameters:</span></dt>
1009 <dd><code>pitch</code> - see
1010 <a href="#decompress12(short%5B%5D,int,int,int,int)"><code>decompress12(short[], int, int, int, int)</code></a> for description</dd>
1011 <dd><code>pixelFormat</code> - pixel format of the decompressed image (one of
1012 <a href="TJ.html#PF_RGB"><code>TJ.PF_*</code></a>)</dd>
1013 <dt><span class="returnLabel">Returns:</span></dt>
1014 <dd>a buffer containing a packed-pixel decompressed image with 9 to 12
1015 bits of data precision per sample.</dd>
1016 <dt><span class="throwsLabel">Throws:</span></dt>
1017 <dd><code><a href="TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd>
1018 </dl>
1019 </li>
1020 </ul>
1021 <a id="decompress16(short[],int,int,int,int)">
1022 <!-- -->
1023 </a>
1024 <ul class="blockList">
1025 <li class="blockList">
1026 <h4>decompress16</h4>
1027 <pre class="methodSignature">public&nbsp;void&nbsp;decompress16&#8203;(short[]&nbsp;dstBuf,
1028 int&nbsp;x,
1029 int&nbsp;y,
1030 int&nbsp;pitch,
1031 int&nbsp;pixelFormat)
1032 throws <a href="TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
1033 <div class="block">Decompress the JPEG source image with 13 to 16 bits per sample associated
1034 with this decompressor instance and output a packed-pixel grayscale, RGB,
1035 or CMYK image with the same data precision to the given destination
1036 buffer.
1037
1038 <p>NOTE: The destination image is fully recoverable if this method throws
1039 a non-fatal <a href="TJException.html" title="class in org.libjpegturbo.turbojpeg"><code>TJException</code></a> (unless <a href="TJ.html#PARAM_STOPONWARNING"><code>TJ.PARAM_STOPONWARNING</code></a> is
1040 set.)</div>
1041 <dl>
1042 <dt><span class="paramLabel">Parameters:</span></dt>
1043 <dd><code>dstBuf</code> - buffer that will receive the packed-pixel
1044 decompressed image. This buffer should normally be
1045 <code>pitch * jpegHeight</code> samples in size. However, the buffer may
1046 also be larger, in which case the <code>x</code>,
1047 <code>y</code>, and <code>pitch</code> parameters can be used to specify
1048 the region into which the source image should be decompressed.</dd>
1049 <dd><code>x</code> - x offset (in pixels) of the region in the destination image into
1050 which the source image should be decompressed</dd>
1051 <dd><code>y</code> - y offset (in pixels) of the region in the destination image into
1052 which the source image should be decompressed</dd>
1053 <dd><code>pitch</code> - samples per row in the destination image. Normally this
1054 should be set to <code>jpegWidth *
1055 <a href="TJ.html#getPixelSize(int)"><code>TJ.getPixelSize</code></a>(pixelFormat)</code>, if the
1056 destination image will be unpadded. (Setting this parameter to 0 is the
1057 equivalent of setting it to <code>jpegWidth *
1058 <a href="TJ.html#getPixelSize(int)"><code>TJ.getPixelSize</code></a>(pixelFormat)</code>.) However,
1059 you can also use this parameter to specify the row alignment/padding of
1060 the destination image, to skip rows, or to decompress into a specific
1061 region of a larger image.</dd>
1062 <dd><code>pixelFormat</code> - pixel format of the decompressed image (one of
1063 <a href="TJ.html#PF_RGB"><code>TJ.PF_*</code></a>)</dd>
1064 <dt><span class="throwsLabel">Throws:</span></dt>
1065 <dd><code><a href="TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd>
1066 </dl>
1067 </li>
1068 </ul>
1069 <a id="decompress16(int,int)">
1070 <!-- -->
1071 </a>
1072 <ul class="blockList">
1073 <li class="blockList">
1074 <h4>decompress16</h4>
1075 <pre class="methodSignature">public&nbsp;short[]&nbsp;decompress16&#8203;(int&nbsp;pitch,
1076 int&nbsp;pixelFormat)
1077 throws <a href="TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
1078 <div class="block">Decompress the JPEG source image with 13 to 16 bits per sample associated
1079 with this decompressor instance and return a buffer containing a
1080 packed-pixel decompressed image with the same data precision.</div>
1081 <dl>
1082 <dt><span class="paramLabel">Parameters:</span></dt>
1083 <dd><code>pitch</code> - see
1084 <a href="#decompress16(short%5B%5D,int,int,int,int)"><code>decompress16(short[], int, int, int, int)</code></a> for description</dd>
1085 <dd><code>pixelFormat</code> - pixel format of the decompressed image (one of
1086 <a href="TJ.html#PF_RGB"><code>TJ.PF_*</code></a>)</dd>
1087 <dt><span class="returnLabel">Returns:</span></dt>
1088 <dd>a buffer containing a packed-pixel decompressed image with 13 to
1089 16 bits of data precision per sample.</dd>
1090 <dt><span class="throwsLabel">Throws:</span></dt>
1091 <dd><code><a href="TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd>
1092 </dl>
1093 </li>
1094 </ul>
1095 <a id="decompressToYUV(org.libjpegturbo.turbojpeg.YUVImage)">
1096 <!-- -->
1097 </a>
1098 <ul class="blockList">
1099 <li class="blockList">
1100 <h4>decompressToYUV</h4>
1101 <pre class="methodSignature">public&nbsp;void&nbsp;decompressToYUV&#8203;(<a href="YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a>&nbsp;dstImage)
1102 throws <a href="TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
1103 <div class="block">Decompress the 8-bit-per-sample JPEG source image associated with this
1104 decompressor instance into an 8-bit-per-sample planar YUV image and store
1105 it in the given <a href="YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>YUVImage</code></a> instance. This method performs JPEG
1106 decompression but leaves out the color conversion step, so a planar YUV
1107 image is generated instead of a packed-pixel image. This method cannot be
1108 used to decompress JPEG source images with the CMYK or YCCK colorspace.
1109
1110 <p>NOTE: The planar YUV destination image is fully recoverable if this
1111 method throws a non-fatal <a href="TJException.html" title="class in org.libjpegturbo.turbojpeg"><code>TJException</code></a> (unless
1112 <a href="TJ.html#PARAM_STOPONWARNING"><code>TJ.PARAM_STOPONWARNING</code></a> is set.)</div>
1113 <dl>
1114 <dt><span class="paramLabel">Parameters:</span></dt>
1115 <dd><code>dstImage</code> - <a href="YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>YUVImage</code></a> instance that will receive the planar YUV
1116 decompressed image. The level of subsampling specified in this
1117 <a href="YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>YUVImage</code></a> instance must match that of the JPEG image, and the width
1118 and height specified in the <a href="YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>YUVImage</code></a> instance must match the
1119 scaled JPEG width and height (see <a href="#setScalingFactor(org.libjpegturbo.turbojpeg.TJScalingFactor)"><code>setScalingFactor()</code></a>, <a href="TJScalingFactor.html#getScaled(int)"><code>TJScalingFactor.getScaled()</code></a>, <a href="#getWidth()"><code>getWidth()</code></a>, and <a href="#getHeight()"><code>getHeight()</code></a>.)</dd>
1120 <dt><span class="throwsLabel">Throws:</span></dt>
1121 <dd><code><a href="TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd>
1122 </dl>
1123 </li>
1124 </ul>
1125 <a id="decompressToYUV(int[])">
1126 <!-- -->
1127 </a>
1128 <ul class="blockList">
1129 <li class="blockList">
1130 <h4>decompressToYUV</h4>
1131 <pre class="methodSignature">public&nbsp;<a href="YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a>&nbsp;decompressToYUV&#8203;(int[]&nbsp;strides)
1132 throws <a href="TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
1133 <div class="block">Decompress the 8-bit-per-sample JPEG source image associated with this
1134 decompressor instance into a set of 8-bit-per-sample Y, U (Cb), and V (Cr)
1135 image planes and return a <a href="YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>YUVImage</code></a> instance containing the
1136 decompressed image planes. This method performs JPEG decompression but
1137 leaves out the color conversion step, so a planar YUV image is generated
1138 instead of a packed-pixel image. This method cannot be used to decompress
1139 JPEG source images with the CMYK or YCCK colorspace.</div>
1140 <dl>
1141 <dt><span class="paramLabel">Parameters:</span></dt>
1142 <dd><code>strides</code> - an array of integers, each specifying the number of bytes
1143 per row in the corresponding plane of the YUV image. Setting the stride
1144 for any plane to 0 is the same as setting it to the scaled plane width
1145 (see <a href="YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>YUVImage</code></a>.) If <code>strides</code> is null, then the strides
1146 for all planes will be set to their respective scaled plane widths. You
1147 can adjust the strides in order to add an arbitrary amount of row padding
1148 to each plane.</dd>
1149 <dt><span class="returnLabel">Returns:</span></dt>
1150 <dd>a <a href="YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>YUVImage</code></a> instance containing the decompressed image
1151 planes</dd>
1152 <dt><span class="throwsLabel">Throws:</span></dt>
1153 <dd><code><a href="TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd>
1154 </dl>
1155 </li>
1156 </ul>
1157 <a id="decompressToYUV(int)">
1158 <!-- -->
1159 </a>
1160 <ul class="blockList">
1161 <li class="blockList">
1162 <h4>decompressToYUV</h4>
1163 <pre class="methodSignature">public&nbsp;<a href="YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a>&nbsp;decompressToYUV&#8203;(int&nbsp;align)
1164 throws <a href="TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
1165 <div class="block">Decompress the 8-bit-per-sample JPEG source image associated with this
1166 decompressor instance into an 8-bit-per-sample unified planar YUV image
1167 and return a <a href="YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>YUVImage</code></a> instance containing the decompressed image.
1168 This method performs JPEG decompression but leaves out the color
1169 conversion step, so a planar YUV image is generated instead of a
1170 packed-pixel image. This method cannot be used to decompress JPEG source
1171 images with the CMYK or YCCK colorspace.</div>
1172 <dl>
1173 <dt><span class="paramLabel">Parameters:</span></dt>
1174 <dd><code>align</code> - row alignment (in bytes) of the YUV image (must be a power of
1175 2.) Setting this parameter to n will cause each row in each plane of the
1176 YUV image to be padded to the nearest multiple of n bytes (1 = unpadded.)</dd>
1177 <dt><span class="returnLabel">Returns:</span></dt>
1178 <dd>a <a href="YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>YUVImage</code></a> instance containing the unified planar YUV
1179 decompressed image</dd>
1180 <dt><span class="throwsLabel">Throws:</span></dt>
1181 <dd><code><a href="TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd>
1182 </dl>
1183 </li>
1184 </ul>
1185 <a id="decompress8(int[],int,int,int,int)">
1186 <!-- -->
1187 </a>
1188 <ul class="blockList">
1189 <li class="blockList">
1190 <h4>decompress8</h4>
1191 <pre class="methodSignature">public&nbsp;void&nbsp;decompress8&#8203;(int[]&nbsp;dstBuf,
1192 int&nbsp;x,
1193 int&nbsp;y,
1194 int&nbsp;stride,
1195 int&nbsp;pixelFormat)
1196 throws <a href="TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
1197 <div class="block">Decompress the 8-bit-per-sample JPEG source image or decode the planar YUV
1198 source image associated with this decompressor instance and output an
1199 8-bit-per-sample packed-pixel grayscale, RGB, or CMYK image to the given
1200 destination buffer.
1201
1202 <p>NOTE: The destination image is fully recoverable if this method throws
1203 a non-fatal <a href="TJException.html" title="class in org.libjpegturbo.turbojpeg"><code>TJException</code></a> (unless <a href="TJ.html#PARAM_STOPONWARNING"><code>TJ.PARAM_STOPONWARNING</code></a>
1204 is set.)</div>
1205 <dl>
1206 <dt><span class="paramLabel">Parameters:</span></dt>
1207 <dd><code>dstBuf</code> - buffer that will receive the packed-pixel
1208 decompressed/decoded image. This buffer should normally be
1209 <code>stride * destinationHeight</code> pixels in size. However, the
1210 buffer may also be larger, in which case the <code>x</code>,
1211 <code>y</code>, and <code>pitch</code> parameters can be used to specify
1212 the region into which the source image should be decompressed/decoded.
1213 NOTE: If the source image is a lossy JPEG image, then
1214 <code>destinationHeight</code> is either the scaled JPEG height (see
1215 <a href="#setScalingFactor(org.libjpegturbo.turbojpeg.TJScalingFactor)"><code>setScalingFactor()</code></a>,
1216 <a href="TJScalingFactor.html#getScaled(int)"><code>TJScalingFactor.getScaled()</code></a>, and
1217 <a href="#getHeight()"><code>getHeight()</code></a>) or the height of the cropping region (see
1218 <a href="#setCroppingRegion(java.awt.Rectangle)"><code>setCroppingRegion()</code></a>.) If the source image is a
1219 YUV image or a lossless JPEG image, then <code>destinationHeight</code> is
1220 the height of the source image.</dd>
1221 <dd><code>x</code> - x offset (in pixels) of the region in the destination image into
1222 which the source image should be decompressed/decoded</dd>
1223 <dd><code>y</code> - y offset (in pixels) of the region in the destination image into
1224 which the source image should be decompressed/decoded</dd>
1225 <dd><code>stride</code> - pixels per row in the destination image. Normally this
1226 should be set to <code>destinationWidth</code>. (Setting this parameter
1227 to 0 is the equivalent of setting it to <code>destinationWidth</code>.)
1228 However, you can also use this parameter to skip rows or to
1229 decompress/decode into a specific region of a larger image. NOTE: If the
1230 source image is a lossy JPEG image, then <code>destinationWidth</code> is
1231 either the scaled JPEG width (see <a href="#setScalingFactor(org.libjpegturbo.turbojpeg.TJScalingFactor)"><code>setScalingFactor()</code></a>, <a href="TJScalingFactor.html#getScaled(int)"><code>TJScalingFactor.getScaled()</code></a>, and <a href="#getWidth()"><code>getWidth()</code></a>) or the width of the
1232 cropping region (see <a href="#setCroppingRegion(java.awt.Rectangle)"><code>setCroppingRegion()</code></a>.) If
1233 the source image is a YUV image or a lossless JPEG image, then
1234 <code>destinationWidth</code> is the width of the source image.</dd>
1235 <dd><code>pixelFormat</code> - pixel format of the decompressed/decoded image (one of
1236 <a href="TJ.html#PF_RGB"><code>TJ.PF_*</code></a>)</dd>
1237 <dt><span class="throwsLabel">Throws:</span></dt>
1238 <dd><code><a href="TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd>
1239 </dl>
1240 </li>
1241 </ul>
1242 <a id="decompress8(java.awt.image.BufferedImage)">
1243 <!-- -->
1244 </a>
1245 <ul class="blockList">
1246 <li class="blockList">
1247 <h4>decompress8</h4>
1248 <pre class="methodSignature">public&nbsp;void&nbsp;decompress8&#8203;(java.awt.image.BufferedImage&nbsp;dstImage)
1249 throws <a href="TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
1250 <div class="block">Decompress the 8-bit-per-sample JPEG source image or decode the planar YUV
1251 source image associated with this decompressor instance and output an
1252 8-bit-per-sample packed-pixel decompressed/decoded image to the given
1253 <code>BufferedImage</code> instance.
1254
1255 <p>NOTE: The destination image is fully recoverable if this method throws
1256 a non-fatal <a href="TJException.html" title="class in org.libjpegturbo.turbojpeg"><code>TJException</code></a> (unless <a href="TJ.html#PARAM_STOPONWARNING"><code>TJ.PARAM_STOPONWARNING</code></a>
1257 is set.)</div>
1258 <dl>
1259 <dt><span class="paramLabel">Parameters:</span></dt>
1260 <dd><code>dstImage</code> - a <code>BufferedImage</code> instance that will receive
1261 the packed-pixel decompressed/decoded image. If the source image is a
1262 lossy JPEG image, then the width and height of the
1263 <code>BufferedImage</code> instance must match the scaled JPEG width and
1264 height (see <a href="#setScalingFactor(org.libjpegturbo.turbojpeg.TJScalingFactor)"><code>setScalingFactor()</code></a>,
1265 <a href="TJScalingFactor.html#getScaled(int)"><code>TJScalingFactor.getScaled()</code></a>,
1266 <a href="#getWidth()"><code>getWidth()</code></a>, and <a href="#getHeight()"><code>getHeight()</code></a>) or the width and height of the
1267 cropping region (see <a href="#setCroppingRegion(java.awt.Rectangle)"><code>setCroppingRegion()</code></a>.) If
1268 the source image is a YUV image or a lossless JPEG image, then the width
1269 and height of the <code>BufferedImage</code> instance must match the width
1270 and height of the source image.</dd>
1271 <dt><span class="throwsLabel">Throws:</span></dt>
1272 <dd><code><a href="TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd>
1273 </dl>
1274 </li>
1275 </ul>
1276 <a id="decompress8(int)">
1277 <!-- -->
1278 </a>
1279 <ul class="blockList">
1280 <li class="blockList">
1281 <h4>decompress8</h4>
1282 <pre class="methodSignature">public&nbsp;java.awt.image.BufferedImage&nbsp;decompress8&#8203;(int&nbsp;bufferedImageType)
1283 throws <a href="TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
1284 <div class="block">Decompress the 8-bit-per-sample JPEG source image or decode the planar YUV
1285 source image associated with this decompressor instance and return a
1286 <code>BufferedImage</code> instance containing the 8-bit-per-sample
1287 packed-pixel decompressed/decoded image.</div>
1288 <dl>
1289 <dt><span class="paramLabel">Parameters:</span></dt>
1290 <dd><code>bufferedImageType</code> - the image type of the <code>BufferedImage</code>
1291 instance that will be created (for instance,
1292 <code>BufferedImage.TYPE_INT_RGB</code>)</dd>
1293 <dt><span class="returnLabel">Returns:</span></dt>
1294 <dd>a <code>BufferedImage</code> instance containing the
1295 8-bit-per-sample packed-pixel decompressed/decoded image.</dd>
1296 <dt><span class="throwsLabel">Throws:</span></dt>
1297 <dd><code><a href="TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd>
1298 </dl>
1299 </li>
1300 </ul>
1301 <a id="saveImage(java.lang.String,java.lang.Object,int,int,int,int,int,int)">
1302 <!-- -->
1303 </a>
1304 <ul class="blockList">
1305 <li class="blockList">
1306 <h4>saveImage</h4>
1307 <pre class="methodSignature">public&nbsp;void&nbsp;saveImage&#8203;(java.lang.String&nbsp;fileName,
1308 java.lang.Object&nbsp;image,
1309 int&nbsp;x,
1310 int&nbsp;y,
1311 int&nbsp;width,
1312 int&nbsp;pitch,
1313 int&nbsp;height,
1314 int&nbsp;pixelFormat)
1315 throws <a href="TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
1316 <div class="block">Save a packed-pixel image with 2 to 16 bits of data precision per sample
1317 from memory to disk.</div>
1318 <dl>
1319 <dt><span class="paramLabel">Parameters:</span></dt>
1320 <dd><code>fileName</code> - name of a file to which to save the packed-pixel image.
1321 The image will be stored in Windows BMP or PBMPLUS (PPM/PGM) format,
1322 depending on the file extension. Windows BMP files require
1323 8-bit-per-sample data precision. When saving a PBMPLUS file, the source
1324 data precision (from 2 to 16 bits per sample) can be specified using
1325 <a href="TJ.html#PARAM_PRECISION"><code>TJ.PARAM_PRECISION</code></a> and defaults to 8 if <a href="TJ.html#PARAM_PRECISION"><code>TJ.PARAM_PRECISION</code></a>
1326 is unset.</dd>
1327 <dd><code>image</code> - buffer containing a packed-pixel RGB, grayscale, or CMYK
1328 image to be saved. The buffer is a <code>byte</code> array if the image
1329 has 2 to 8 bits of data precision per sample and a <code>short</code>
1330 array otherwise.</dd>
1331 <dd><code>x</code> - x offset (in pixels) of the region in the buffer from which to
1332 save the packed-pixel image</dd>
1333 <dd><code>y</code> - y offset (in pixels) of the region in the buffer from which to
1334 save the packed-pixel image</dd>
1335 <dd><code>width</code> - width (in pixels) of the region in the buffer from which to
1336 save the packed-pixel image</dd>
1337 <dd><code>pitch</code> - samples per row in the packed-pixel buffer. Setting this
1338 parameter to 0 is the equivalent of setting it to <code>width *
1339 <a href="TJ.html#getPixelSize(int)"><code>TJ.getPixelSize</code></a>(pixelFormat)</code>.</dd>
1340 <dd><code>height</code> - height (in pixels) of the region in the buffer from which to
1341 save the packed-pixel image</dd>
1342 <dd><code>pixelFormat</code> - pixel format of the packed-pixel image (one of
1343 <a href="TJ.html#PF_RGB"><code>TJ.PF_*</code></a>). If this parameter is set to
1344 <a href="TJ.html#PF_GRAY"><code>TJ.PF_GRAY</code></a>, then the image will be stored in PGM or
1345 8-bit-per-pixel (indexed color) BMP format. Otherwise, the image will be
1346 stored in PPM or 24-bit-per-pixel BMP format. If this parameter is set to
1347 <a href="TJ.html#PF_CMYK"><code>TJ.PF_CMYK</code></a>, then the CMYK pixels will be converted to RGB using a
1348 quick &amp; dirty algorithm that is suitable only for testing purposes.
1349 (Proper conversion between CMYK and other formats requires a color
1350 management system.)</dd>
1351 <dt><span class="throwsLabel">Throws:</span></dt>
1352 <dd><code><a href="TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd>
1353 </dl>
1354 </li>
1355 </ul>
1356 <a id="close()">
1357 <!-- -->
1358 </a>
1359 <ul class="blockList">
1360 <li class="blockList">
1361 <h4>close</h4>
1362 <pre class="methodSignature">public&nbsp;void&nbsp;close()
1363 throws <a href="TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
1364 <div class="block">Free the native structures associated with this decompressor instance.</div>
1365 <dl>
1366 <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
1367 <dd><code>close</code>&nbsp;in interface&nbsp;<code>java.lang.AutoCloseable</code></dd>
1368 <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
1369 <dd><code>close</code>&nbsp;in interface&nbsp;<code>java.io.Closeable</code></dd>
1370 <dt><span class="throwsLabel">Throws:</span></dt>
1371 <dd><code><a href="TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd>
1372 </dl>
1373 </li>
1374 </ul>
1375 <a id="finalize()">
1376 <!-- -->
1377 </a>
1378 <ul class="blockListLast">
1379 <li class="blockList">
1380 <h4>finalize</h4>
1381 <pre class="methodSignature">protected&nbsp;void&nbsp;finalize()
1382 throws java.lang.Throwable</pre>
1383 <dl>
1384 <dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
1385 <dd><code>finalize</code>&nbsp;in class&nbsp;<code>java.lang.Object</code></dd>
1386 <dt><span class="throwsLabel">Throws:</span></dt>
1387 <dd><code>java.lang.Throwable</code></dd>
1388 </dl>
1389 </li>
1390 </ul>
1391 </li>
1392 </ul>
1393 </section>
1394 </li>
1395 </ul>
1396 </div>
1397 </div>
1398 </main>
1399 <!-- ========= END OF CLASS DATA ========= -->
1400 <footer role="contentinfo">
1401 <nav role="navigation">
1402 <!-- ======= START OF BOTTOM NAVBAR ====== -->
1403 <div class="bottomNav"><a id="navbar.bottom">
1404 <!-- -->
1405 </a>
1406 <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
1407 <a id="navbar.bottom.firstrow">
1408 <!-- -->
1409 </a>
1410 <ul class="navList" title="Navigation">
1411 <li><a href="package-summary.html">Package</a></li>
1412 <li class="navBarCell1Rev">Class</li>
1413 <li><a href="package-tree.html">Tree</a></li>
1414 <li><a href="../../../deprecated-list.html">Deprecated</a></li>
1415 <li><a href="../../../index-all.html">Index</a></li>
1416 <li><a href="../../../help-doc.html">Help</a></li>
1417 </ul>
1418 </div>
1419 <div class="subNav">
1420 <ul class="navList" id="allclasses_navbar_bottom">
1421 <li><a href="../../../allclasses.html">All&nbsp;Classes</a></li>
1422 </ul>
1423 <div>
1424 <script type="text/javascript"><!--
1425 allClassesLink = document.getElementById("allclasses_navbar_bottom");
1426 if(window==top) {
1427 allClassesLink.style.display = "block";
1428 }
1429 else {
1430 allClassesLink.style.display = "none";
1431 }
1432 //-->
1433 </script>
1434 <noscript>
1435 <div>JavaScript is disabled on your browser.</div>
1436 </noscript>
1437 </div>
1438 <div>
1439 <ul class="subNavList">
1440 <li>Summary:&nbsp;</li>
1441 <li>Nested&nbsp;|&nbsp;</li>
1442 <li>Field&nbsp;|&nbsp;</li>
1443 <li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
1444 <li><a href="#method.summary">Method</a></li>
1445 </ul>
1446 <ul class="subNavList">
1447 <li>Detail:&nbsp;</li>
1448 <li>Field&nbsp;|&nbsp;</li>
1449 <li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
1450 <li><a href="#method.detail">Method</a></li>
1451 </ul>
1452 </div>
1453 <a id="skip.navbar.bottom">
1454 <!-- -->
1455 </a></div>
1456 <!-- ======== END OF BOTTOM NAVBAR ======= -->
1457 </nav>
1458 </footer>
1459 </body>
1460 </html>