Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(464)

Side by Side Diff: java/doc/org/libjpegturbo/turbojpeg/TJCompressor.html

Issue 1934113002: Update libjpeg_turbo to 1.4.90 from https://github.com/libjpeg-turbo/ (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libjpeg_turbo.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.or g/TR/html4/loose.dtd">
2 <!-- NewPage -->
3 <html lang="en">
4 <head>
5 <title>TJCompressor</title>
6 <link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Sty le">
7 </head>
8 <body>
9 <script type="text/javascript"><!--
10 if (location.href.indexOf('is-external=true') == -1) {
11 parent.document.title="TJCompressor";
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/TJ.html" title="class in org.li bjpegturbo.turbojpeg"><span class="strong">Prev Class</span></a></li>
36 <li><a href="../../../org/libjpegturbo/turbojpeg/TJCustomFilter.html" title="int erface 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/TJCompressor.html" t arget="_top">Frames</a></li>
40 <li><a href="TJCompressor.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>Field&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>Field&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 TJCompressor" class="title">Class TJCompressor</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.TJCompressor</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 <hr>
98 <br>
99 <pre>public class <span class="strong">TJCompressor</span>
100 extends java.lang.Object
101 implements java.io.Closeable</pre>
102 <div class="block">TurboJPEG compressor</div>
103 </li>
104 </ul>
105 </div>
106 <div class="summary">
107 <ul class="blockList">
108 <li class="blockList">
109 <!-- ======== CONSTRUCTOR SUMMARY ======== -->
110 <ul class="blockList">
111 <li class="blockList"><a name="constructor_summary">
112 <!-- -->
113 </a>
114 <h3>Constructor Summary</h3>
115 <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summar y="Constructor Summary table, listing constructors, and an explanation">
116 <caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
117 <tr>
118 <th class="colOne" scope="col">Constructor and Description</th>
119 </tr>
120 <tr class="altColor">
121 <td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ Compressor.html#TJCompressor()">TJCompressor</a></strong>()</code>
122 <div class="block">Create a TurboJPEG compressor instance.</div>
123 </td>
124 </tr>
125 <tr class="rowColor">
126 <td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ Compressor.html#TJCompressor(java.awt.image.BufferedImage,%20int,%20int,%20int,% 20int)">TJCompressor</a></strong>(java.awt.image.BufferedImage&nbsp;srcImage,
127 int&nbsp;x,
128 int&nbsp;y,
129 int&nbsp;width,
130 int&nbsp;height)</code>
131 <div class="block">Create a TurboJPEG compressor instance and associate the unco mpressed
132 source image stored in <code>srcImage</code> with the newly created
133 instance.</div>
134 </td>
135 </tr>
136 <tr class="altColor">
137 <td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ Compressor.html#TJCompressor(byte[],%20int,%20int,%20int,%20int)">TJCompressor</ a></strong>(byte[]&nbsp;srcImage,
138 int&nbsp;width,
139 int&nbsp;pitch,
140 int&nbsp;height,
141 int&nbsp;pixelFormat)</code>
142 <div class="block"><strong>Deprecated.</strong>&nbsp;
143 <div class="block"><i>Use
144 <a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#TJCompressor(byt e[],%20int,%20int,%20int,%20int,%20int,%20int)"><code>TJCompressor(byte[], int, int, int, int, int, int)</code></a> instead.</i></div>
145 </div>
146 </td>
147 </tr>
148 <tr class="rowColor">
149 <td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ Compressor.html#TJCompressor(byte[],%20int,%20int,%20int,%20int,%20int,%20int)"> TJCompressor</a></strong>(byte[]&nbsp;srcImage,
150 int&nbsp;x,
151 int&nbsp;y,
152 int&nbsp;width,
153 int&nbsp;pitch,
154 int&nbsp;height,
155 int&nbsp;pixelFormat)</code>
156 <div class="block">Create a TurboJPEG compressor instance and associate the unco mpressed
157 source image stored in <code>srcImage</code> with the newly created
158 instance.</div>
159 </td>
160 </tr>
161 </table>
162 </li>
163 </ul>
164 <!-- ========== METHOD SUMMARY =========== -->
165 <ul class="blockList">
166 <li class="blockList"><a name="method_summary">
167 <!-- -->
168 </a>
169 <h3>Method Summary</h3>
170 <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summar y="Method Summary table, listing methods, and an explanation">
171 <caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
172 <tr>
173 <th class="colFirst" scope="col">Modifier and Type</th>
174 <th class="colLast" scope="col">Method and Description</th>
175 </tr>
176 <tr class="altColor">
177 <td class="colFirst"><code>void</code></td>
178 <td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/T JCompressor.html#close()">close</a></strong>()</code>
179 <div class="block">Free the native structures associated with this compressor in stance.</div>
180 </td>
181 </tr>
182 <tr class="rowColor">
183 <td class="colFirst"><code>void</code></td>
184 <td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/T JCompressor.html#compress(java.awt.image.BufferedImage,%20byte[],%20int)">compre ss</a></strong>(java.awt.image.BufferedImage&nbsp;srcImage,
185 byte[]&nbsp;dstBuf,
186 int&nbsp;flags)</code>
187 <div class="block"><strong>Deprecated.</strong>&nbsp;
188 <div class="block"><i>Use
189 <a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(j ava.awt.image.BufferedImage,%20int,%20int,%20int,%20int)"><code>setSourceImage(B ufferedImage, int, int, int, int)</code></a> and
190 <a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#compress(byte[], %20int)"><code>compress(byte[], int)</code></a> instead.</i></div>
191 </div>
192 </td>
193 </tr>
194 <tr class="altColor">
195 <td class="colFirst"><code>byte[]</code></td>
196 <td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/T JCompressor.html#compress(java.awt.image.BufferedImage,%20int)">compress</a></st rong>(java.awt.image.BufferedImage&nbsp;srcImage,
197 int&nbsp;flags)</code>
198 <div class="block"><strong>Deprecated.</strong>&nbsp;
199 <div class="block"><i>Use
200 <a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(j ava.awt.image.BufferedImage,%20int,%20int,%20int,%20int)"><code>setSourceImage(B ufferedImage, int, int, int, int)</code></a> and
201 <a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#compress(int)">< code>compress(int)</code></a> instead.</i></div>
202 </div>
203 </td>
204 </tr>
205 <tr class="rowColor">
206 <td class="colFirst"><code>void</code></td>
207 <td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/T JCompressor.html#compress(byte[],%20int)">compress</a></strong>(byte[]&nbsp;dstB uf,
208 int&nbsp;flags)</code>
209 <div class="block">Compress the uncompressed source image associated with this c ompressor
210 instance and output a JPEG image to the given destination buffer.</div>
211 </td>
212 </tr>
213 <tr class="altColor">
214 <td class="colFirst"><code>byte[]</code></td>
215 <td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/T JCompressor.html#compress(int)">compress</a></strong>(int&nbsp;flags)</code>
216 <div class="block">Compress the uncompressed source image associated with this c ompressor
217 instance and return a buffer containing a JPEG image.</div>
218 </td>
219 </tr>
220 <tr class="rowColor">
221 <td class="colFirst"><code>void</code></td>
222 <td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/T JCompressor.html#encodeYUV(java.awt.image.BufferedImage,%20byte[],%20int)">encod eYUV</a></strong>(java.awt.image.BufferedImage&nbsp;srcImage,
223 byte[]&nbsp;dstBuf,
224 int&nbsp;flags)</code>
225 <div class="block"><strong>Deprecated.</strong>&nbsp;
226 <div class="block"><i>Use
227 <a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(j ava.awt.image.BufferedImage,%20int,%20int,%20int,%20int)"><code>setSourceImage(B ufferedImage, int, int, int, int)</code></a> and
228 <a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(byte[] ,%20int)"><code>encodeYUV(byte[], int)</code></a> instead.</i></div>
229 </div>
230 </td>
231 </tr>
232 <tr class="altColor">
233 <td class="colFirst"><code>byte[]</code></td>
234 <td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/T JCompressor.html#encodeYUV(java.awt.image.BufferedImage,%20int)">encodeYUV</a></ strong>(java.awt.image.BufferedImage&nbsp;srcImage,
235 int&nbsp;flags)</code>
236 <div class="block"><strong>Deprecated.</strong>&nbsp;
237 <div class="block"><i>Use
238 <a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(j ava.awt.image.BufferedImage,%20int,%20int,%20int,%20int)"><code>setSourceImage(B ufferedImage, int, int, int, int)</code></a> and
239 <a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(int,%2 0int)"><code>encodeYUV(int, int)</code></a> instead.</i></div>
240 </div>
241 </td>
242 </tr>
243 <tr class="rowColor">
244 <td class="colFirst"><code>void</code></td>
245 <td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/T JCompressor.html#encodeYUV(byte[],%20int)">encodeYUV</a></strong>(byte[]&nbsp;ds tBuf,
246 int&nbsp;flags)</code>
247 <div class="block"><strong>Deprecated.</strong>&nbsp;
248 <div class="block"><i>Use <a href="../../../org/libjpegturbo/turbojpeg/TJCompres sor.html#encodeYUV(org.libjpegturbo.turbojpeg.YUVImage,%20int)"><code>encodeYUV( YUVImage, int)</code></a> instead.</i></div>
249 </div>
250 </td>
251 </tr>
252 <tr class="altColor">
253 <td class="colFirst"><code>byte[]</code></td>
254 <td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/T JCompressor.html#encodeYUV(int)">encodeYUV</a></strong>(int&nbsp;flags)</code>
255 <div class="block"><strong>Deprecated.</strong>&nbsp;
256 <div class="block"><i>Use <a href="../../../org/libjpegturbo/turbojpeg/TJCompres sor.html#encodeYUV(int,%20int)"><code>encodeYUV(int, int)</code></a> instead.</i ></div>
257 </div>
258 </td>
259 </tr>
260 <tr class="rowColor">
261 <td class="colFirst"><code><a href="../../../org/libjpegturbo/turbojpeg/YUVImage .html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a></code></td>
262 <td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/T JCompressor.html#encodeYUV(int[],%20int)">encodeYUV</a></strong>(int[]&nbsp;stri des,
263 int&nbsp;flags)</code>
264 <div class="block">Encode the uncompressed source image associated with this com pressor
265 instance into separate Y, U (Cb), and V (Cr) image planes and return a
266 <code>YUVImage</code> instance containing the encoded image planes.</div>
267 </td>
268 </tr>
269 <tr class="altColor">
270 <td class="colFirst"><code><a href="../../../org/libjpegturbo/turbojpeg/YUVImage .html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a></code></td>
271 <td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/T JCompressor.html#encodeYUV(int,%20int)">encodeYUV</a></strong>(int&nbsp;pad,
272 int&nbsp;flags)</code>
273 <div class="block">Encode the uncompressed source image associated with this com pressor
274 instance into a unified YUV planar image buffer and return a
275 <code>YUVImage</code> instance containing the encoded image.</div>
276 </td>
277 </tr>
278 <tr class="rowColor">
279 <td class="colFirst"><code>void</code></td>
280 <td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/T JCompressor.html#encodeYUV(org.libjpegturbo.turbojpeg.YUVImage,%20int)">encodeYU V</a></strong>(<a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title ="class in org.libjpegturbo.turbojpeg">YUVImage</a>&nbsp;dstImage,
281 int&nbsp;flags)</code>
282 <div class="block">Encode the uncompressed source image associated with this com pressor
283 instance into a YUV planar image and store it in the given
284 <code>YUVImage</code> instance.</div>
285 </td>
286 </tr>
287 <tr class="altColor">
288 <td class="colFirst"><code>protected void</code></td>
289 <td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/T JCompressor.html#finalize()">finalize</a></strong>()</code>&nbsp;</td>
290 </tr>
291 <tr class="rowColor">
292 <td class="colFirst"><code>int</code></td>
293 <td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/T JCompressor.html#getCompressedSize()">getCompressedSize</a></strong>()</code>
294 <div class="block">Returns the size of the image (in bytes) generated by the mos t recent
295 compress operation.</div>
296 </td>
297 </tr>
298 <tr class="altColor">
299 <td class="colFirst"><code>void</code></td>
300 <td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/T JCompressor.html#setJPEGQuality(int)">setJPEGQuality</a></strong>(int&nbsp;quali ty)</code>
301 <div class="block">Set the JPEG image quality level for subsequent compress oper ations.</div>
302 </td>
303 </tr>
304 <tr class="rowColor">
305 <td class="colFirst"><code>void</code></td>
306 <td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/T JCompressor.html#setSourceImage(java.awt.image.BufferedImage,%20int,%20int,%20in t,%20int)">setSourceImage</a></strong>(java.awt.image.BufferedImage&nbsp;srcImag e,
307 int&nbsp;x,
308 int&nbsp;y,
309 int&nbsp;width,
310 int&nbsp;height)</code>
311 <div class="block">Associate an uncompressed RGB or grayscale source image with this
312 compressor instance.</div>
313 </td>
314 </tr>
315 <tr class="altColor">
316 <td class="colFirst"><code>void</code></td>
317 <td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/T JCompressor.html#setSourceImage(byte[],%20int,%20int,%20int,%20int)">setSourceIm age</a></strong>(byte[]&nbsp;srcImage,
318 int&nbsp;width,
319 int&nbsp;pitch,
320 int&nbsp;height,
321 int&nbsp;pixelFormat)</code>
322 <div class="block"><strong>Deprecated.</strong>&nbsp;
323 <div class="block"><i>Use
324 <a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(b yte[],%20int,%20int,%20int,%20int,%20int,%20int)"><code>setSourceImage(byte[], i nt, int, int, int, int, int)</code></a> instead.</i></div>
325 </div>
326 </td>
327 </tr>
328 <tr class="rowColor">
329 <td class="colFirst"><code>void</code></td>
330 <td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/T JCompressor.html#setSourceImage(byte[],%20int,%20int,%20int,%20int,%20int,%20int )">setSourceImage</a></strong>(byte[]&nbsp;srcImage,
331 int&nbsp;x,
332 int&nbsp;y,
333 int&nbsp;width,
334 int&nbsp;pitch,
335 int&nbsp;height,
336 int&nbsp;pixelFormat)</code>
337 <div class="block">Associate an uncompressed RGB, grayscale, or CMYK source imag e with this
338 compressor instance.</div>
339 </td>
340 </tr>
341 <tr class="altColor">
342 <td class="colFirst"><code>void</code></td>
343 <td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/T JCompressor.html#setSourceImage(org.libjpegturbo.turbojpeg.YUVImage)">setSourceI mage</a></strong>(<a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" ti tle="class in org.libjpegturbo.turbojpeg">YUVImage</a>&nbsp;srcImage)</code>
344 <div class="block">Associate an uncompressed YUV planar source image with this c ompressor
345 instance.</div>
346 </td>
347 </tr>
348 <tr class="rowColor">
349 <td class="colFirst"><code>void</code></td>
350 <td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/T JCompressor.html#setSubsamp(int)">setSubsamp</a></strong>(int&nbsp;newSubsamp)</ code>
351 <div class="block">Set the level of chrominance subsampling for subsequent compr ess/encode
352 operations.</div>
353 </td>
354 </tr>
355 </table>
356 <ul class="blockList">
357 <li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
358 <!-- -->
359 </a>
360 <h3>Methods inherited from class&nbsp;java.lang.Object</h3>
361 <code>clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait , wait</code></li>
362 </ul>
363 </li>
364 </ul>
365 </li>
366 </ul>
367 </div>
368 <div class="details">
369 <ul class="blockList">
370 <li class="blockList">
371 <!-- ========= CONSTRUCTOR DETAIL ======== -->
372 <ul class="blockList">
373 <li class="blockList"><a name="constructor_detail">
374 <!-- -->
375 </a>
376 <h3>Constructor Detail</h3>
377 <a name="TJCompressor()">
378 <!-- -->
379 </a>
380 <ul class="blockList">
381 <li class="blockList">
382 <h4>TJCompressor</h4>
383 <pre>public&nbsp;TJCompressor()
384 throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.htm l" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
385 <div class="block">Create a TurboJPEG compressor instance.</div>
386 <dl><dt><span class="strong">Throws:</span></dt>
387 <dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title=" class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
388 </li>
389 </ul>
390 <a name="TJCompressor(byte[], int, int, int, int, int, int)">
391 <!-- -->
392 </a>
393 <ul class="blockList">
394 <li class="blockList">
395 <h4>TJCompressor</h4>
396 <pre>public&nbsp;TJCompressor(byte[]&nbsp;srcImage,
397 int&nbsp;x,
398 int&nbsp;y,
399 int&nbsp;width,
400 int&nbsp;pitch,
401 int&nbsp;height,
402 int&nbsp;pixelFormat)
403 throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.htm l" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
404 <div class="block">Create a TurboJPEG compressor instance and associate the unco mpressed
405 source image stored in <code>srcImage</code> with the newly created
406 instance.</div>
407 <dl><dt><span class="strong">Parameters:</span></dt><dd><code>srcImage</code> - see <a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImag e(byte[],%20int,%20int,%20int,%20int,%20int,%20int)"><code>setSourceImage(byte[] , int, int, int, int, int, int)</code></a> for description</dd><dd><code>x</code > - see <a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSource Image(byte[],%20int,%20int,%20int,%20int,%20int,%20int)"><code>setSourceImage(by te[], int, int, int, int, int, int)</code></a> for description</dd><dd><code>y</ code> - see <a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSo urceImage(byte[],%20int,%20int,%20int,%20int,%20int,%20int)"><code>setSourceImag e(byte[], int, int, int, int, int, int)</code></a> for description</dd><dd><code >width</code> - see <a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.ht ml#setSourceImage(byte[],%20int,%20int,%20int,%20int,%20int,%20int)"><code>setSo urceImage(byte[], int, int, int, int, int, int)</code></a> for description</dd>< dd><code>pitch</code> - see <a href="../../../org/libjpegturbo/turbojpeg/TJCompr essor.html#setSourceImage(byte[],%20int,%20int,%20int,%20int,%20int,%20int)"><co de>setSourceImage(byte[], int, int, int, int, int, int)</code></a> for descripti on</dd><dd><code>height</code> - see <a href="../../../org/libjpegturbo/turbojpe g/TJCompressor.html#setSourceImage(byte[],%20int,%20int,%20int,%20int,%20int,%20 int)"><code>setSourceImage(byte[], int, int, int, int, int, int)</code></a> for description</dd><dd><code>pixelFormat</code> - pixel format of the source image (one of
408 <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_RGB"><code>TJ.PF_*</cod e></a>)</dd>
409 <dt><span class="strong">Throws:</span></dt>
410 <dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title=" class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
411 </li>
412 </ul>
413 <a name="TJCompressor(byte[], int, int, int, int)">
414 <!-- -->
415 </a>
416 <ul class="blockList">
417 <li class="blockList">
418 <h4>TJCompressor</h4>
419 <pre>@Deprecated
420 public&nbsp;TJCompressor(byte[]&nbsp;srcImage,
421 int&nbsp;width,
422 int&nbsp;pitch,
423 int&nbsp;height,
424 int&nbsp;pixelFormat)
425 throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.htm l" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
426 <div class="block"><span class="strong">Deprecated.</span>&nbsp;<i>Use
427 <a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#TJCompressor(byt e[],%20int,%20int,%20int,%20int,%20int,%20int)"><code>TJCompressor(byte[], int, int, int, int, int, int)</code></a> instead.</i></div>
428 <dl><dt><span class="strong">Throws:</span></dt>
429 <dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title=" class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
430 </li>
431 </ul>
432 <a name="TJCompressor(java.awt.image.BufferedImage, int, int, int, int)">
433 <!-- -->
434 </a>
435 <ul class="blockListLast">
436 <li class="blockList">
437 <h4>TJCompressor</h4>
438 <pre>public&nbsp;TJCompressor(java.awt.image.BufferedImage&nbsp;srcImage,
439 int&nbsp;x,
440 int&nbsp;y,
441 int&nbsp;width,
442 int&nbsp;height)
443 throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.htm l" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
444 <div class="block">Create a TurboJPEG compressor instance and associate the unco mpressed
445 source image stored in <code>srcImage</code> with the newly created
446 instance.</div>
447 <dl><dt><span class="strong">Parameters:</span></dt><dd><code>srcImage</code> - see
448 <a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(j ava.awt.image.BufferedImage,%20int,%20int,%20int,%20int)"><code>setSourceImage(B ufferedImage, int, int, int, int)</code></a> for description</dd><dd><code>x</co de> - see
449 <a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(j ava.awt.image.BufferedImage,%20int,%20int,%20int,%20int)"><code>setSourceImage(B ufferedImage, int, int, int, int)</code></a> for description</dd><dd><code>y</co de> - see
450 <a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(j ava.awt.image.BufferedImage,%20int,%20int,%20int,%20int)"><code>setSourceImage(B ufferedImage, int, int, int, int)</code></a> for description</dd><dd><code>width </code> - see
451 <a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(j ava.awt.image.BufferedImage,%20int,%20int,%20int,%20int)"><code>setSourceImage(B ufferedImage, int, int, int, int)</code></a> for description</dd><dd><code>heigh t</code> - see
452 <a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(j ava.awt.image.BufferedImage,%20int,%20int,%20int,%20int)"><code>setSourceImage(B ufferedImage, int, int, int, int)</code></a> for description</dd>
453 <dt><span class="strong">Throws:</span></dt>
454 <dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title=" class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
455 </li>
456 </ul>
457 </li>
458 </ul>
459 <!-- ============ METHOD DETAIL ========== -->
460 <ul class="blockList">
461 <li class="blockList"><a name="method_detail">
462 <!-- -->
463 </a>
464 <h3>Method Detail</h3>
465 <a name="setSourceImage(byte[], int, int, int, int, int, int)">
466 <!-- -->
467 </a>
468 <ul class="blockList">
469 <li class="blockList">
470 <h4>setSourceImage</h4>
471 <pre>public&nbsp;void&nbsp;setSourceImage(byte[]&nbsp;srcImage,
472 int&nbsp;x,
473 int&nbsp;y,
474 int&nbsp;width,
475 int&nbsp;pitch,
476 int&nbsp;height,
477 int&nbsp;pixelFormat)
478 throws <a href="../../../org/libjpegturbo/turbojpeg/TJExcept ion.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
479 <div class="block">Associate an uncompressed RGB, grayscale, or CMYK source imag e with this
480 compressor instance.</div>
481 <dl><dt><span class="strong">Parameters:</span></dt><dd><code>srcImage</code> - image buffer containing RGB, grayscale, or CMYK pixels to
482 be compressed or encoded. This buffer is not modified.</dd><dd><code>x</code> - x offset (in pixels) of the region in the source image from which
483 the JPEG or YUV image should be compressed/encoded</dd><dd><code>y</code> - y o ffset (in pixels) of the region in the source image from which
484 the JPEG or YUV image should be compressed/encoded</dd><dd><code>width</code> - width (in pixels) of the region in the source image from
485 which the JPEG or YUV image should be compressed/encoded</dd><dd><code>pitch</c ode> - bytes per line of the source image. Normally, this should be
486 <code>width * TJ.pixelSize(pixelFormat)</code> if the source image is
487 unpadded, but you can use this parameter to, for instance, specify that
488 the scanlines in the source image are padded to a 4-byte boundary or to
489 compress/encode a JPEG or YUV image from a region of a larger source
490 image. You can also be clever and use this parameter to skip lines, etc.
491 Setting this parameter to 0 is the equivalent of setting it to
492 <code>width * TJ.pixelSize(pixelFormat)</code>.</dd><dd><code>height</code> - h eight (in pixels) of the region in the source image from
493 which the JPEG or YUV image should be compressed/encoded</dd><dd><code>pixelFor mat</code> - pixel format of the source image (one of
494 <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_RGB"><code>TJ.PF_*</cod e></a>)</dd>
495 <dt><span class="strong">Throws:</span></dt>
496 <dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title=" class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
497 </li>
498 </ul>
499 <a name="setSourceImage(byte[], int, int, int, int)">
500 <!-- -->
501 </a>
502 <ul class="blockList">
503 <li class="blockList">
504 <h4>setSourceImage</h4>
505 <pre>@Deprecated
506 public&nbsp;void&nbsp;setSourceImage(byte[]&nbsp;srcImage,
507 int&nbsp;width,
508 int&nbsp;pitch,
509 int&nbsp;height,
510 int&nbsp;pixelFormat)
511 throws <a href="../../../org/libjpegturbo/turbojpeg/TJExcept ion.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
512 <div class="block"><span class="strong">Deprecated.</span>&nbsp;<i>Use
513 <a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(b yte[],%20int,%20int,%20int,%20int,%20int,%20int)"><code>setSourceImage(byte[], i nt, int, int, int, int, int)</code></a> instead.</i></div>
514 <dl><dt><span class="strong">Throws:</span></dt>
515 <dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title=" class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
516 </li>
517 </ul>
518 <a name="setSourceImage(java.awt.image.BufferedImage, int, int, int, int)">
519 <!-- -->
520 </a>
521 <ul class="blockList">
522 <li class="blockList">
523 <h4>setSourceImage</h4>
524 <pre>public&nbsp;void&nbsp;setSourceImage(java.awt.image.BufferedImage&nbsp;srcI mage,
525 int&nbsp;x,
526 int&nbsp;y,
527 int&nbsp;width,
528 int&nbsp;height)
529 throws <a href="../../../org/libjpegturbo/turbojpeg/TJExcept ion.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
530 <div class="block">Associate an uncompressed RGB or grayscale source image with this
531 compressor instance.</div>
532 <dl><dt><span class="strong">Parameters:</span></dt><dd><code>srcImage</code> - a <code>BufferedImage</code> instance containing RGB or
533 grayscale pixels to be compressed or encoded. This image is not modified.</dd> <dd><code>x</code> - x offset (in pixels) of the region in the source image from which
534 the JPEG or YUV image should be compressed/encoded</dd><dd><code>y</code> - y o ffset (in pixels) of the region in the source image from which
535 the JPEG or YUV image should be compressed/encoded</dd><dd><code>width</code> - width (in pixels) of the region in the source image from
536 which the JPEG or YUV image should be compressed/encoded (0 = use the
537 width of the source image)</dd><dd><code>height</code> - height (in pixels) of the region in the source image from
538 which the JPEG or YUV image should be compressed/encoded (0 = use the
539 height of the source image)</dd>
540 <dt><span class="strong">Throws:</span></dt>
541 <dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title=" class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
542 </li>
543 </ul>
544 <a name="setSourceImage(org.libjpegturbo.turbojpeg.YUVImage)">
545 <!-- -->
546 </a>
547 <ul class="blockList">
548 <li class="blockList">
549 <h4>setSourceImage</h4>
550 <pre>public&nbsp;void&nbsp;setSourceImage(<a href="../../../org/libjpegturbo/tur bojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a>&n bsp;srcImage)
551 throws <a href="../../../org/libjpegturbo/turbojpeg/TJExcept ion.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
552 <div class="block">Associate an uncompressed YUV planar source image with this c ompressor
553 instance.</div>
554 <dl><dt><span class="strong">Parameters:</span></dt><dd><code>srcImage</code> - YUV planar image to be compressed. This image is not
555 modified.</dd>
556 <dt><span class="strong">Throws:</span></dt>
557 <dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title=" class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
558 </li>
559 </ul>
560 <a name="setSubsamp(int)">
561 <!-- -->
562 </a>
563 <ul class="blockList">
564 <li class="blockList">
565 <h4>setSubsamp</h4>
566 <pre>public&nbsp;void&nbsp;setSubsamp(int&nbsp;newSubsamp)</pre>
567 <div class="block">Set the level of chrominance subsampling for subsequent compr ess/encode
568 operations. When pixels are converted from RGB to YCbCr (see
569 <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#CS_YCbCr"><code>TJ.CS_YCbC r</code></a>) or from CMYK to YCCK (see <a href="../../../org/libjpegturbo/turbo jpeg/TJ.html#CS_YCCK"><code>TJ.CS_YCCK</code></a>) as part
570 of the JPEG compression process, some of the Cb and Cr (chrominance)
571 components can be discarded or averaged together to produce a smaller
572 image with little perceptible loss of image clarity (the human eye is more
573 sensitive to small changes in brightness than to small changes in color.)
574 This is called "chrominance subsampling".
575 <p>
576 NOTE: This method has no effect when compressing a JPEG image from a YUV
577 planar source. In that case, the level of chrominance subsampling in
578 the JPEG image is determined by the source. Further, this method has no
579 effect when encoding to a pre-allocated <a href="../../../org/libjpegturbo/turb ojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>YUVImage< /code></a> instance. In
580 that case, the level of chrominance subsampling is determined by the
581 destination.</div>
582 <dl><dt><span class="strong">Parameters:</span></dt><dd><code>newSubsamp</code> - the level of chrominance subsampling to use in
583 subsequent compress/encode oeprations (one of
584 <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_444"><code>TJ.SAMP_*< /code></a>)</dd></dl>
585 </li>
586 </ul>
587 <a name="setJPEGQuality(int)">
588 <!-- -->
589 </a>
590 <ul class="blockList">
591 <li class="blockList">
592 <h4>setJPEGQuality</h4>
593 <pre>public&nbsp;void&nbsp;setJPEGQuality(int&nbsp;quality)</pre>
594 <div class="block">Set the JPEG image quality level for subsequent compress oper ations.</div>
595 <dl><dt><span class="strong">Parameters:</span></dt><dd><code>quality</code> - t he new JPEG image quality level (1 to 100, 1 = worst,
596 100 = best)</dd></dl>
597 </li>
598 </ul>
599 <a name="compress(byte[], int)">
600 <!-- -->
601 </a>
602 <ul class="blockList">
603 <li class="blockList">
604 <h4>compress</h4>
605 <pre>public&nbsp;void&nbsp;compress(byte[]&nbsp;dstBuf,
606 int&nbsp;flags)
607 throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.ht ml" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
608 <div class="block">Compress the uncompressed source image associated with this c ompressor
609 instance and output a JPEG image to the given destination buffer.</div>
610 <dl><dt><span class="strong">Parameters:</span></dt><dd><code>dstBuf</code> - bu ffer that will receive the JPEG image. Use
611 <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#bufSize(int,%20int,%20int) "><code>TJ.bufSize(int, int, int)</code></a> to determine the maximum size for t his buffer based on
612 the source image's width and height and the desired level of chrominance
613 subsampling.</dd><dd><code>flags</code> - the bitwise OR of one or more of
614 <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP"><code>TJ.FL AG_*</code></a></dd>
615 <dt><span class="strong">Throws:</span></dt>
616 <dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title=" class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
617 </li>
618 </ul>
619 <a name="compress(int)">
620 <!-- -->
621 </a>
622 <ul class="blockList">
623 <li class="blockList">
624 <h4>compress</h4>
625 <pre>public&nbsp;byte[]&nbsp;compress(int&nbsp;flags)
626 throws <a href="../../../org/libjpegturbo/turbojpeg/TJException. html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
627 <div class="block">Compress the uncompressed source image associated with this c ompressor
628 instance and return a buffer containing a JPEG image.</div>
629 <dl><dt><span class="strong">Parameters:</span></dt><dd><code>flags</code> - the bitwise OR of one or more of
630 <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP"><code>TJ.FL AG_*</code></a></dd>
631 <dt><span class="strong">Returns:</span></dt><dd>a buffer containing a JPEG imag e. The length of this buffer will
632 not be equal to the size of the JPEG image. Use <a href="../../../org/libjpegt urbo/turbojpeg/TJCompressor.html#getCompressedSize()"><code>getCompressedSize()< /code></a> to obtain the size of the JPEG image.</dd>
633 <dt><span class="strong">Throws:</span></dt>
634 <dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title=" class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
635 </li>
636 </ul>
637 <a name="compress(java.awt.image.BufferedImage, byte[], int)">
638 <!-- -->
639 </a>
640 <ul class="blockList">
641 <li class="blockList">
642 <h4>compress</h4>
643 <pre>@Deprecated
644 public&nbsp;void&nbsp;compress(java.awt.image.BufferedImage&nbsp;srcImage,
645 byte[]&nbsp;dstBuf,
646 int&nbsp;flags)
647 throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.ht ml" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
648 <div class="block"><span class="strong">Deprecated.</span>&nbsp;<i>Use
649 <a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(j ava.awt.image.BufferedImage,%20int,%20int,%20int,%20int)"><code>setSourceImage(B ufferedImage, int, int, int, int)</code></a> and
650 <a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#compress(byte[], %20int)"><code>compress(byte[], int)</code></a> instead.</i></div>
651 <dl><dt><span class="strong">Throws:</span></dt>
652 <dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title=" class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
653 </li>
654 </ul>
655 <a name="compress(java.awt.image.BufferedImage, int)">
656 <!-- -->
657 </a>
658 <ul class="blockList">
659 <li class="blockList">
660 <h4>compress</h4>
661 <pre>@Deprecated
662 public&nbsp;byte[]&nbsp;compress(java.awt.image.BufferedImage&nbsp;srcImage,
663 int&nbsp;flags)
664 throws <a href="../../../org/libjpegturbo/turbojpeg/TJException. html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
665 <div class="block"><span class="strong">Deprecated.</span>&nbsp;<i>Use
666 <a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(j ava.awt.image.BufferedImage,%20int,%20int,%20int,%20int)"><code>setSourceImage(B ufferedImage, int, int, int, int)</code></a> and
667 <a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#compress(int)">< code>compress(int)</code></a> instead.</i></div>
668 <dl><dt><span class="strong">Throws:</span></dt>
669 <dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title=" class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
670 </li>
671 </ul>
672 <a name="encodeYUV(org.libjpegturbo.turbojpeg.YUVImage, int)">
673 <!-- -->
674 </a>
675 <ul class="blockList">
676 <li class="blockList">
677 <h4>encodeYUV</h4>
678 <pre>public&nbsp;void&nbsp;encodeYUV(<a href="../../../org/libjpegturbo/turbojpe g/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a>&nbsp;d stImage,
679 int&nbsp;flags)
680 throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.h tml" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
681 <div class="block">Encode the uncompressed source image associated with this com pressor
682 instance into a YUV planar image and store it in the given
683 <code>YUVImage</code> instance. This method uses the accelerated color
684 conversion routines in TurboJPEG's underlying codec but does not execute
685 any of the other steps in the JPEG compression process. Encoding
686 CMYK source images to YUV is not supported.</div>
687 <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
688 image</dd><dd><code>flags</code> - the bitwise OR of one or more of
689 <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP"><code>TJ.FL AG_*</code></a></dd>
690 <dt><span class="strong">Throws:</span></dt>
691 <dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title=" class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
692 </li>
693 </ul>
694 <a name="encodeYUV(byte[], int)">
695 <!-- -->
696 </a>
697 <ul class="blockList">
698 <li class="blockList">
699 <h4>encodeYUV</h4>
700 <pre>@Deprecated
701 public&nbsp;void&nbsp;encodeYUV(byte[]&nbsp;dstBuf,
702 int&nbsp;flags)
703 throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.h tml" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
704 <div class="block"><span class="strong">Deprecated.</span>&nbsp;<i>Use <a href=" ../../../org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(org.libjpegturbo .turbojpeg.YUVImage,%20int)"><code>encodeYUV(YUVImage, int)</code></a> instead.< /i></div>
705 <dl><dt><span class="strong">Throws:</span></dt>
706 <dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title=" class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
707 </li>
708 </ul>
709 <a name="encodeYUV(int, int)">
710 <!-- -->
711 </a>
712 <ul class="blockList">
713 <li class="blockList">
714 <h4>encodeYUV</h4>
715 <pre>public&nbsp;<a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" tit le="class in org.libjpegturbo.turbojpeg">YUVImage</a>&nbsp;encodeYUV(int&nbsp;pa d,
716 int&nbsp;flags)
717 throws <a href="../../../org/libjpegturbo/turbojpeg/TJExcepti on.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
718 <div class="block">Encode the uncompressed source image associated with this com pressor
719 instance into a unified YUV planar image buffer and return a
720 <code>YUVImage</code> instance containing the encoded image. This method
721 uses the accelerated color conversion routines in TurboJPEG's underlying
722 codec but does not execute any of the other steps in the JPEG compression
723 process. Encoding CMYK source images to YUV is not supported.</div>
724 <dl><dt><span class="strong">Parameters:</span></dt><dd><code>pad</code> - the w idth of each line in each plane of the YUV image will be
725 padded to the nearest multiple of this number of bytes (must be a power of
726 2.)</dd><dd><code>flags</code> - the bitwise OR of one or more of
727 <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP"><code>TJ.FL AG_*</code></a></dd>
728 <dt><span class="strong">Returns:</span></dt><dd>a YUV planar image.</dd>
729 <dt><span class="strong">Throws:</span></dt>
730 <dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title=" class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
731 </li>
732 </ul>
733 <a name="encodeYUV(int[], int)">
734 <!-- -->
735 </a>
736 <ul class="blockList">
737 <li class="blockList">
738 <h4>encodeYUV</h4>
739 <pre>public&nbsp;<a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" tit le="class in org.libjpegturbo.turbojpeg">YUVImage</a>&nbsp;encodeYUV(int[]&nbsp; strides,
740 int&nbsp;flags)
741 throws <a href="../../../org/libjpegturbo/turbojpeg/TJExcepti on.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
742 <div class="block">Encode the uncompressed source image associated with this com pressor
743 instance into separate Y, U (Cb), and V (Cr) image planes and return a
744 <code>YUVImage</code> instance containing the encoded image planes. This
745 method uses the accelerated color conversion routines in TurboJPEG's
746 underlying codec but does not execute any of the other steps in the JPEG
747 compression process. Encoding CMYK source images to YUV is not supported.</div >
748 <dl><dt><span class="strong">Parameters:</span></dt><dd><code>strides</code> - a n array of integers, each specifying the number of bytes
749 per line in the corresponding plane of the output image. Setting the
750 stride for any plane to 0 is the same as setting it to the component width
751 of the plane. If <code>strides</code> is null, then the strides for all
752 planes will be set to their respective component widths. You can adjust
753 the strides in order to add an arbitrary amount of line padding to each
754 plane.</dd><dd><code>flags</code> - the bitwise OR of one or more of
755 <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP"><code>TJ.FL AG_*</code></a></dd>
756 <dt><span class="strong">Returns:</span></dt><dd>a YUV planar image.</dd>
757 <dt><span class="strong">Throws:</span></dt>
758 <dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title=" class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
759 </li>
760 </ul>
761 <a name="encodeYUV(int)">
762 <!-- -->
763 </a>
764 <ul class="blockList">
765 <li class="blockList">
766 <h4>encodeYUV</h4>
767 <pre>@Deprecated
768 public&nbsp;byte[]&nbsp;encodeYUV(int&nbsp;flags)
769 throws <a href="../../../org/libjpegturbo/turbojpeg/TJException .html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
770 <div class="block"><span class="strong">Deprecated.</span>&nbsp;<i>Use <a href=" ../../../org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(int,%20int)"><co de>encodeYUV(int, int)</code></a> instead.</i></div>
771 <dl><dt><span class="strong">Throws:</span></dt>
772 <dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title=" class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
773 </li>
774 </ul>
775 <a name="encodeYUV(java.awt.image.BufferedImage, byte[], int)">
776 <!-- -->
777 </a>
778 <ul class="blockList">
779 <li class="blockList">
780 <h4>encodeYUV</h4>
781 <pre>@Deprecated
782 public&nbsp;void&nbsp;encodeYUV(java.awt.image.BufferedImage&nbsp;srcImage,
783 byte[]&nbsp;dstBuf,
784 int&nbsp;flags)
785 throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.h tml" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
786 <div class="block"><span class="strong">Deprecated.</span>&nbsp;<i>Use
787 <a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(j ava.awt.image.BufferedImage,%20int,%20int,%20int,%20int)"><code>setSourceImage(B ufferedImage, int, int, int, int)</code></a> and
788 <a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(byte[] ,%20int)"><code>encodeYUV(byte[], int)</code></a> instead.</i></div>
789 <dl><dt><span class="strong">Throws:</span></dt>
790 <dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title=" class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
791 </li>
792 </ul>
793 <a name="encodeYUV(java.awt.image.BufferedImage, int)">
794 <!-- -->
795 </a>
796 <ul class="blockList">
797 <li class="blockList">
798 <h4>encodeYUV</h4>
799 <pre>@Deprecated
800 public&nbsp;byte[]&nbsp;encodeYUV(java.awt.image.BufferedImage&nbsp;srcImage,
801 int&nbsp;flags)
802 throws <a href="../../../org/libjpegturbo/turbojpeg/TJException .html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
803 <div class="block"><span class="strong">Deprecated.</span>&nbsp;<i>Use
804 <a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(j ava.awt.image.BufferedImage,%20int,%20int,%20int,%20int)"><code>setSourceImage(B ufferedImage, int, int, int, int)</code></a> and
805 <a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(int,%2 0int)"><code>encodeYUV(int, int)</code></a> instead.</i></div>
806 <dl><dt><span class="strong">Throws:</span></dt>
807 <dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title=" class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
808 </li>
809 </ul>
810 <a name="getCompressedSize()">
811 <!-- -->
812 </a>
813 <ul class="blockList">
814 <li class="blockList">
815 <h4>getCompressedSize</h4>
816 <pre>public&nbsp;int&nbsp;getCompressedSize()</pre>
817 <div class="block">Returns the size of the image (in bytes) generated by the mos t recent
818 compress operation.</div>
819 <dl><dt><span class="strong">Returns:</span></dt><dd>the size of the image (in b ytes) generated by the most recent
820 compress operation.</dd></dl>
821 </li>
822 </ul>
823 <a name="close()">
824 <!-- -->
825 </a>
826 <ul class="blockList">
827 <li class="blockList">
828 <h4>close</h4>
829 <pre>public&nbsp;void&nbsp;close()
830 throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
831 <div class="block">Free the native structures associated with this compressor in stance.</div>
832 <dl>
833 <dt><strong>Specified by:</strong></dt>
834 <dd><code>close</code>&nbsp;in interface&nbsp;<code>java.io.Closeable</code></dd >
835 <dt><strong>Specified by:</strong></dt>
836 <dd><code>close</code>&nbsp;in interface&nbsp;<code>java.lang.AutoCloseable</cod e></dd>
837 <dt><span class="strong">Throws:</span></dt>
838 <dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title=" class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
839 </li>
840 </ul>
841 <a name="finalize()">
842 <!-- -->
843 </a>
844 <ul class="blockListLast">
845 <li class="blockList">
846 <h4>finalize</h4>
847 <pre>protected&nbsp;void&nbsp;finalize()
848 throws java.lang.Throwable</pre>
849 <dl>
850 <dt><strong>Overrides:</strong></dt>
851 <dd><code>finalize</code>&nbsp;in class&nbsp;<code>java.lang.Object</code></dd>
852 <dt><span class="strong">Throws:</span></dt>
853 <dd><code>java.lang.Throwable</code></dd></dl>
854 </li>
855 </ul>
856 </li>
857 </ul>
858 </li>
859 </ul>
860 </div>
861 </div>
862 <!-- ========= END OF CLASS DATA ========= -->
863 <!-- ======= START OF BOTTOM NAVBAR ====== -->
864 <div class="bottomNav"><a name="navbar_bottom">
865 <!-- -->
866 </a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="nav bar_bottom_firstrow">
867 <!-- -->
868 </a>
869 <ul class="navList" title="Navigation">
870 <li><a href="../../../org/libjpegturbo/turbojpeg/package-summary.html">Package</ a></li>
871 <li class="navBarCell1Rev">Class</li>
872 <li><a href="package-tree.html">Tree</a></li>
873 <li><a href="../../../deprecated-list.html">Deprecated</a></li>
874 <li><a href="../../../index-all.html">Index</a></li>
875 <li><a href="../../../help-doc.html">Help</a></li>
876 </ul>
877 </div>
878 <div class="subNav">
879 <ul class="navList">
880 <li><a href="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.li bjpegturbo.turbojpeg"><span class="strong">Prev Class</span></a></li>
881 <li><a href="../../../org/libjpegturbo/turbojpeg/TJCustomFilter.html" title="int erface in org.libjpegturbo.turbojpeg"><span class="strong">Next Class</span></a> </li>
882 </ul>
883 <ul class="navList">
884 <li><a href="../../../index.html?org/libjpegturbo/turbojpeg/TJCompressor.html" t arget="_top">Frames</a></li>
885 <li><a href="TJCompressor.html" target="_top">No Frames</a></li>
886 </ul>
887 <ul class="navList" id="allclasses_navbar_bottom">
888 <li><a href="../../../allclasses-noframe.html">All Classes</a></li>
889 </ul>
890 <div>
891 <script type="text/javascript"><!--
892 allClassesLink = document.getElementById("allclasses_navbar_bottom");
893 if(window==top) {
894 allClassesLink.style.display = "block";
895 }
896 else {
897 allClassesLink.style.display = "none";
898 }
899 //-->
900 </script>
901 </div>
902 <div>
903 <ul class="subNavList">
904 <li>Summary:&nbsp;</li>
905 <li>Nested&nbsp;|&nbsp;</li>
906 <li>Field&nbsp;|&nbsp;</li>
907 <li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
908 <li><a href="#method_summary">Method</a></li>
909 </ul>
910 <ul class="subNavList">
911 <li>Detail:&nbsp;</li>
912 <li>Field&nbsp;|&nbsp;</li>
913 <li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
914 <li><a href="#method_detail">Method</a></li>
915 </ul>
916 </div>
917 <a name="skip-navbar_bottom">
918 <!-- -->
919 </a></div>
920 <!-- ======== END OF BOTTOM NAVBAR ======= -->
921 </body>
922 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698