1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
5 <!-- Generated by javadoc (build 1.6.0_29) on Sun Dec 18 20:09:44 CST 2011 -->
10 <META NAME="date" CONTENT="2011-12-18">
12 <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
14 <SCRIPT type="text/javascript">
15 function windowTitle()
17 if (location.href.indexOf('is-external=true') == -1) {
18 parent.document.title="TJ";
27 <BODY BGCOLOR="white" onload="windowTitle();">
31 <!-- ========= START OF TOP NAVBAR ======= -->
32 <A NAME="navbar_top"><!-- --></A>
33 <A HREF="#skip-navbar_top" title="Skip navigation links"></A>
34 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
36 <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
37 <A NAME="navbar_top_firstrow"><!-- --></A>
38 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
39 <TR ALIGN="center" VALIGN="top">
40 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../org/libjpegturbo/turbojpeg/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
41 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
42 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
43 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
44 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
45 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
49 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
55 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
56 PREV CLASS
57 <A HREF="../../../org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg"><B>NEXT CLASS</B></A></FONT></TD>
58 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
59 <A HREF="../../../index.html?org/libjpegturbo/turbojpeg/TJ.html" target="_top"><B>FRAMES</B></A>
60 <A HREF="TJ.html" target="_top"><B>NO FRAMES</B></A>
61 <SCRIPT type="text/javascript">
64 document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
69 <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
76 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
77 SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
78 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
79 DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
82 <A NAME="skip-navbar_top"></A>
83 <!-- ========= END OF TOP NAVBAR ========= -->
86 <!-- ======== START OF CLASS DATA ======== -->
89 org.libjpegturbo.turbojpeg</FONT>
94 <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>org.libjpegturbo.turbojpeg.TJ</B>
98 <DT><PRE>public final class <B>TJ</B><DT>extends java.lang.Object</DL>
102 TurboJPEG utility class (cannot be instantiated)
109 <!-- =========== FIELD SUMMARY =========== -->
111 <A NAME="field_summary"><!-- --></A>
112 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
113 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
114 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
115 <B>Field Summary</B></FONT></TH>
117 <TR BGCOLOR="white" CLASS="TableRowColor">
118 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
119 <CODE>static int</CODE></FONT></TD>
120 <TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP">FLAG_BOTTOMUP</A></B></CODE>
123 The uncompressed source/destination image is stored in bottom-up (Windows,
124 OpenGL) order, not top-down (X11) order.</TD>
126 <TR BGCOLOR="white" CLASS="TableRowColor">
127 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
128 <CODE>static int</CODE></FONT></TD>
129 <TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_FASTUPSAMPLE">FLAG_FASTUPSAMPLE</A></B></CODE>
132 Use fast, inaccurate chrominance upsampling routines in the JPEG
133 decompressor (libjpeg and libjpeg-turbo versions only.)</TD>
135 <TR BGCOLOR="white" CLASS="TableRowColor">
136 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
137 <CODE>static int</CODE></FONT></TD>
138 <TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_FORCEMMX">FLAG_FORCEMMX</A></B></CODE>
141 Turn off CPU auto-detection and force TurboJPEG to use MMX code
142 (IPP and 32-bit libjpeg-turbo versions only.)</TD>
144 <TR BGCOLOR="white" CLASS="TableRowColor">
145 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
146 <CODE>static int</CODE></FONT></TD>
147 <TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_FORCESSE">FLAG_FORCESSE</A></B></CODE>
150 Turn off CPU auto-detection and force TurboJPEG to use SSE code
151 (32-bit IPP and 32-bit libjpeg-turbo versions only.)</TD>
153 <TR BGCOLOR="white" CLASS="TableRowColor">
154 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
155 <CODE>static int</CODE></FONT></TD>
156 <TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_FORCESSE2">FLAG_FORCESSE2</A></B></CODE>
159 Turn off CPU auto-detection and force TurboJPEG to use SSE2 code
160 (32-bit IPP and 32-bit libjpeg-turbo versions only.)</TD>
162 <TR BGCOLOR="white" CLASS="TableRowColor">
163 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
164 <CODE>static int</CODE></FONT></TD>
165 <TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_FORCESSE3">FLAG_FORCESSE3</A></B></CODE>
168 Turn off CPU auto-detection and force TurboJPEG to use SSE3 code
169 (64-bit IPP version only.)</TD>
171 <TR BGCOLOR="white" CLASS="TableRowColor">
172 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
173 <CODE>static int</CODE></FONT></TD>
174 <TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#NUMPF">NUMPF</A></B></CODE>
177 The number of pixel formats</TD>
179 <TR BGCOLOR="white" CLASS="TableRowColor">
180 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
181 <CODE>static int</CODE></FONT></TD>
182 <TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#NUMSAMP">NUMSAMP</A></B></CODE>
185 The number of chrominance subsampling options</TD>
187 <TR BGCOLOR="white" CLASS="TableRowColor">
188 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
189 <CODE>static int</CODE></FONT></TD>
190 <TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_ABGR">PF_ABGR</A></B></CODE>
193 ABGR pixel format.</TD>
195 <TR BGCOLOR="white" CLASS="TableRowColor">
196 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
197 <CODE>static int</CODE></FONT></TD>
198 <TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_ARGB">PF_ARGB</A></B></CODE>
201 ARGB pixel format.</TD>
203 <TR BGCOLOR="white" CLASS="TableRowColor">
204 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
205 <CODE>static int</CODE></FONT></TD>
206 <TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_BGR">PF_BGR</A></B></CODE>
209 BGR pixel format.</TD>
211 <TR BGCOLOR="white" CLASS="TableRowColor">
212 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
213 <CODE>static int</CODE></FONT></TD>
214 <TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_BGRA">PF_BGRA</A></B></CODE>
217 BGRA pixel format.</TD>
219 <TR BGCOLOR="white" CLASS="TableRowColor">
220 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
221 <CODE>static int</CODE></FONT></TD>
222 <TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_BGRX">PF_BGRX</A></B></CODE>
225 BGRX pixel format.</TD>
227 <TR BGCOLOR="white" CLASS="TableRowColor">
228 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
229 <CODE>static int</CODE></FONT></TD>
230 <TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_GRAY">PF_GRAY</A></B></CODE>
233 Grayscale pixel format.</TD>
235 <TR BGCOLOR="white" CLASS="TableRowColor">
236 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
237 <CODE>static int</CODE></FONT></TD>
238 <TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_RGB">PF_RGB</A></B></CODE>
241 RGB pixel format.</TD>
243 <TR BGCOLOR="white" CLASS="TableRowColor">
244 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
245 <CODE>static int</CODE></FONT></TD>
246 <TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_RGBA">PF_RGBA</A></B></CODE>
249 RGBA pixel format.</TD>
251 <TR BGCOLOR="white" CLASS="TableRowColor">
252 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
253 <CODE>static int</CODE></FONT></TD>
254 <TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_RGBX">PF_RGBX</A></B></CODE>
257 RGBX pixel format.</TD>
259 <TR BGCOLOR="white" CLASS="TableRowColor">
260 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
261 <CODE>static int</CODE></FONT></TD>
262 <TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_XBGR">PF_XBGR</A></B></CODE>
265 XBGR pixel format.</TD>
267 <TR BGCOLOR="white" CLASS="TableRowColor">
268 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
269 <CODE>static int</CODE></FONT></TD>
270 <TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_XRGB">PF_XRGB</A></B></CODE>
273 XRGB pixel format.</TD>
275 <TR BGCOLOR="white" CLASS="TableRowColor">
276 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
277 <CODE>static int</CODE></FONT></TD>
278 <TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_420">SAMP_420</A></B></CODE>
281 4:2:0 chrominance subsampling.</TD>
283 <TR BGCOLOR="white" CLASS="TableRowColor">
284 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
285 <CODE>static int</CODE></FONT></TD>
286 <TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_422">SAMP_422</A></B></CODE>
289 4:2:2 chrominance subsampling.</TD>
291 <TR BGCOLOR="white" CLASS="TableRowColor">
292 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
293 <CODE>static int</CODE></FONT></TD>
294 <TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_440">SAMP_440</A></B></CODE>
297 4:4:0 chrominance subsampling.</TD>
299 <TR BGCOLOR="white" CLASS="TableRowColor">
300 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
301 <CODE>static int</CODE></FONT></TD>
302 <TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_444">SAMP_444</A></B></CODE>
305 4:4:4 chrominance subsampling (no chrominance subsampling).</TD>
307 <TR BGCOLOR="white" CLASS="TableRowColor">
308 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
309 <CODE>static int</CODE></FONT></TD>
310 <TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_GRAY">SAMP_GRAY</A></B></CODE>
313 Grayscale.</TD>
317 <!-- ======== CONSTRUCTOR SUMMARY ======== -->
319 <A NAME="constructor_summary"><!-- --></A>
320 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
321 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
322 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
323 <B>Constructor Summary</B></FONT></TH>
325 <TR BGCOLOR="white" CLASS="TableRowColor">
326 <TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#TJ()">TJ</A></B>()</CODE>
329 </TD>
333 <!-- ========== METHOD SUMMARY =========== -->
335 <A NAME="method_summary"><!-- --></A>
336 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
337 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
338 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
339 <B>Method Summary</B></FONT></TH>
341 <TR BGCOLOR="white" CLASS="TableRowColor">
342 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
343 <CODE>static int</CODE></FONT></TD>
344 <TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#bufSize(int, int, int)">bufSize</A></B>(int width,
346 int jpegSubsamp)</CODE>
349 Returns the maximum size of the buffer (in bytes) required to hold a JPEG
350 image with the given width and height, and level of chrominance
353 <TR BGCOLOR="white" CLASS="TableRowColor">
354 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
355 <CODE>static int</CODE></FONT></TD>
356 <TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#bufSizeYUV(int, int, int)">bufSizeYUV</A></B>(int width,
358 int subsamp)</CODE>
361 Returns the size of the buffer (in bytes) required to hold a YUV planar
362 image with the given width, height, and level of chrominance subsampling.</TD>
364 <TR BGCOLOR="white" CLASS="TableRowColor">
365 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
366 <CODE>static int</CODE></FONT></TD>
367 <TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#getBlueOffset(int)">getBlueOffset</A></B>(int pixelFormat)</CODE>
370 For the given pixel format, returns the number of bytes that the blue
371 component is offset from the start of the pixel.</TD>
373 <TR BGCOLOR="white" CLASS="TableRowColor">
374 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
375 <CODE>static int</CODE></FONT></TD>
376 <TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#getGreenOffset(int)">getGreenOffset</A></B>(int pixelFormat)</CODE>
379 For the given pixel format, returns the number of bytes that the green
380 component is offset from the start of the pixel.</TD>
382 <TR BGCOLOR="white" CLASS="TableRowColor">
383 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
384 <CODE>static int</CODE></FONT></TD>
385 <TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#getMCUHeight(int)">getMCUHeight</A></B>(int subsamp)</CODE>
388 Returns the MCU block height for the given level of chrominance
391 <TR BGCOLOR="white" CLASS="TableRowColor">
392 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
393 <CODE>static int</CODE></FONT></TD>
394 <TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#getMCUWidth(int)">getMCUWidth</A></B>(int subsamp)</CODE>
397 Returns the MCU block width for the given level of chrominance
400 <TR BGCOLOR="white" CLASS="TableRowColor">
401 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
402 <CODE>static int</CODE></FONT></TD>
403 <TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#getPixelSize(int)">getPixelSize</A></B>(int pixelFormat)</CODE>
406 Returns the pixel size (in bytes) of the given pixel format.</TD>
408 <TR BGCOLOR="white" CLASS="TableRowColor">
409 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
410 <CODE>static int</CODE></FONT></TD>
411 <TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#getRedOffset(int)">getRedOffset</A></B>(int pixelFormat)</CODE>
414 For the given pixel format, returns the number of bytes that the red
415 component is offset from the start of the pixel.</TD>
417 <TR BGCOLOR="white" CLASS="TableRowColor">
418 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
419 <CODE>static <A HREF="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg">TJScalingFactor</A>[]</CODE></FONT></TD>
420 <TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#getScalingFactors()">getScalingFactors</A></B>()</CODE>
423 Returns a list of fractional scaling factors that the JPEG decompressor in
424 this implementation of TurboJPEG supports.</TD>
427 <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
428 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
429 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
430 <TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
432 <TR BGCOLOR="white" CLASS="TableRowColor">
433 <TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
439 <!-- ============ FIELD DETAIL =========== -->
441 <A NAME="field_detail"><!-- --></A>
442 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
443 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
444 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
445 <B>Field Detail</B></FONT></TH>
449 <A NAME="NUMSAMP"><!-- --></A><H3>
452 public static final int <B>NUMSAMP</B></PRE>
454 <DD>The number of chrominance subsampling options
457 <DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.NUMSAMP">Constant Field Values</A></DL>
461 <A NAME="SAMP_444"><!-- --></A><H3>
464 public static final int <B>SAMP_444</B></PRE>
466 <DD>4:4:4 chrominance subsampling (no chrominance subsampling). The JPEG
467 or YUV image will contain one chrominance component for every pixel in the
471 <DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.SAMP_444">Constant Field Values</A></DL>
475 <A NAME="SAMP_422"><!-- --></A><H3>
478 public static final int <B>SAMP_422</B></PRE>
480 <DD>4:2:2 chrominance subsampling. The JPEG or YUV image will contain one
481 chrominance component for every 2x1 block of pixels in the source image.
484 <DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.SAMP_422">Constant Field Values</A></DL>
488 <A NAME="SAMP_420"><!-- --></A><H3>
491 public static final int <B>SAMP_420</B></PRE>
493 <DD>4:2:0 chrominance subsampling. The JPEG or YUV image will contain one
494 chrominance component for every 2x2 block of pixels in the source image.
497 <DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.SAMP_420">Constant Field Values</A></DL>
501 <A NAME="SAMP_GRAY"><!-- --></A><H3>
504 public static final int <B>SAMP_GRAY</B></PRE>
506 <DD>Grayscale. The JPEG or YUV image will contain no chrominance components.
509 <DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.SAMP_GRAY">Constant Field Values</A></DL>
513 <A NAME="SAMP_440"><!-- --></A><H3>
516 public static final int <B>SAMP_440</B></PRE>
518 <DD>4:4:0 chrominance subsampling. The JPEG or YUV image will contain one
519 chrominance component for every 1x2 block of pixels in the source image.
522 <DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.SAMP_440">Constant Field Values</A></DL>
526 <A NAME="NUMPF"><!-- --></A><H3>
529 public static final int <B>NUMPF</B></PRE>
531 <DD>The number of pixel formats
534 <DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.NUMPF">Constant Field Values</A></DL>
538 <A NAME="PF_RGB"><!-- --></A><H3>
541 public static final int <B>PF_RGB</B></PRE>
543 <DD>RGB pixel format. The red, green, and blue components in the image are
544 stored in 3-byte pixels in the order R, G, B from lowest to highest byte
545 address within each pixel.
548 <DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PF_RGB">Constant Field Values</A></DL>
552 <A NAME="PF_BGR"><!-- --></A><H3>
555 public static final int <B>PF_BGR</B></PRE>
557 <DD>BGR pixel format. The red, green, and blue components in the image are
558 stored in 3-byte pixels in the order B, G, R from lowest to highest byte
559 address within each pixel.
562 <DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PF_BGR">Constant Field Values</A></DL>
566 <A NAME="PF_RGBX"><!-- --></A><H3>
569 public static final int <B>PF_RGBX</B></PRE>
571 <DD>RGBX pixel format. The red, green, and blue components in the image are
572 stored in 4-byte pixels in the order R, G, B from lowest to highest byte
573 address within each pixel. The X component is ignored when compressing
574 and undefined when decompressing.
577 <DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PF_RGBX">Constant Field Values</A></DL>
581 <A NAME="PF_BGRX"><!-- --></A><H3>
584 public static final int <B>PF_BGRX</B></PRE>
586 <DD>BGRX pixel format. The red, green, and blue components in the image are
587 stored in 4-byte pixels in the order B, G, R from lowest to highest byte
588 address within each pixel. The X component is ignored when compressing
589 and undefined when decompressing.
592 <DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PF_BGRX">Constant Field Values</A></DL>
596 <A NAME="PF_XBGR"><!-- --></A><H3>
599 public static final int <B>PF_XBGR</B></PRE>
601 <DD>XBGR pixel format. The red, green, and blue components in the image are
602 stored in 4-byte pixels in the order R, G, B from highest to lowest byte
603 address within each pixel. The X component is ignored when compressing
604 and undefined when decompressing.
607 <DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PF_XBGR">Constant Field Values</A></DL>
611 <A NAME="PF_XRGB"><!-- --></A><H3>
614 public static final int <B>PF_XRGB</B></PRE>
616 <DD>XRGB pixel format. The red, green, and blue components in the image are
617 stored in 4-byte pixels in the order B, G, R from highest to lowest byte
618 address within each pixel. The X component is ignored when compressing
619 and undefined when decompressing.
622 <DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PF_XRGB">Constant Field Values</A></DL>
626 <A NAME="PF_GRAY"><!-- --></A><H3>
629 public static final int <B>PF_GRAY</B></PRE>
631 <DD>Grayscale pixel format. Each 1-byte pixel represents a luminance
632 (brightness) level from 0 to 255.
635 <DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PF_GRAY">Constant Field Values</A></DL>
639 <A NAME="PF_RGBA"><!-- --></A><H3>
642 public static final int <B>PF_RGBA</B></PRE>
644 <DD>RGBA pixel format. This is the same as <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_RGBX"><CODE>PF_RGBX</CODE></A>, except that when
645 decompressing, the X byte is guaranteed to be 0xFF, which can be
646 interpreted as an opaque alpha channel.
649 <DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PF_RGBA">Constant Field Values</A></DL>
653 <A NAME="PF_BGRA"><!-- --></A><H3>
656 public static final int <B>PF_BGRA</B></PRE>
658 <DD>BGRA pixel format. This is the same as <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_BGRX"><CODE>PF_BGRX</CODE></A>, except that when
659 decompressing, the X byte is guaranteed to be 0xFF, which can be
660 interpreted as an opaque alpha channel.
663 <DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PF_BGRA">Constant Field Values</A></DL>
667 <A NAME="PF_ABGR"><!-- --></A><H3>
670 public static final int <B>PF_ABGR</B></PRE>
672 <DD>ABGR pixel format. This is the same as <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_XBGR"><CODE>PF_XBGR</CODE></A>, except that when
673 decompressing, the X byte is guaranteed to be 0xFF, which can be
674 interpreted as an opaque alpha channel.
677 <DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PF_ABGR">Constant Field Values</A></DL>
681 <A NAME="PF_ARGB"><!-- --></A><H3>
684 public static final int <B>PF_ARGB</B></PRE>
686 <DD>ARGB pixel format. This is the same as <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_XRGB"><CODE>PF_XRGB</CODE></A>, except that when
687 decompressing, the X byte is guaranteed to be 0xFF, which can be
688 interpreted as an opaque alpha channel.
691 <DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PF_ARGB">Constant Field Values</A></DL>
695 <A NAME="FLAG_BOTTOMUP"><!-- --></A><H3>
698 public static final int <B>FLAG_BOTTOMUP</B></PRE>
700 <DD>The uncompressed source/destination image is stored in bottom-up (Windows,
701 OpenGL) order, not top-down (X11) order.
704 <DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.FLAG_BOTTOMUP">Constant Field Values</A></DL>
708 <A NAME="FLAG_FORCEMMX"><!-- --></A><H3>
711 public static final int <B>FLAG_FORCEMMX</B></PRE>
713 <DD>Turn off CPU auto-detection and force TurboJPEG to use MMX code
714 (IPP and 32-bit libjpeg-turbo versions only.)
717 <DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.FLAG_FORCEMMX">Constant Field Values</A></DL>
721 <A NAME="FLAG_FORCESSE"><!-- --></A><H3>
724 public static final int <B>FLAG_FORCESSE</B></PRE>
726 <DD>Turn off CPU auto-detection and force TurboJPEG to use SSE code
727 (32-bit IPP and 32-bit libjpeg-turbo versions only.)
730 <DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.FLAG_FORCESSE">Constant Field Values</A></DL>
734 <A NAME="FLAG_FORCESSE2"><!-- --></A><H3>
737 public static final int <B>FLAG_FORCESSE2</B></PRE>
739 <DD>Turn off CPU auto-detection and force TurboJPEG to use SSE2 code
740 (32-bit IPP and 32-bit libjpeg-turbo versions only.)
743 <DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.FLAG_FORCESSE2">Constant Field Values</A></DL>
747 <A NAME="FLAG_FORCESSE3"><!-- --></A><H3>
750 public static final int <B>FLAG_FORCESSE3</B></PRE>
752 <DD>Turn off CPU auto-detection and force TurboJPEG to use SSE3 code
753 (64-bit IPP version only.)
756 <DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.FLAG_FORCESSE3">Constant Field Values</A></DL>
760 <A NAME="FLAG_FASTUPSAMPLE"><!-- --></A><H3>
761 FLAG_FASTUPSAMPLE</H3>
763 public static final int <B>FLAG_FASTUPSAMPLE</B></PRE>
765 <DD>Use fast, inaccurate chrominance upsampling routines in the JPEG
766 decompressor (libjpeg and libjpeg-turbo versions only.)
769 <DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.FLAG_FASTUPSAMPLE">Constant Field Values</A></DL>
772 <!-- ========= CONSTRUCTOR DETAIL ======== -->
774 <A NAME="constructor_detail"><!-- --></A>
775 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
776 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
777 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
778 <B>Constructor Detail</B></FONT></TH>
782 <A NAME="TJ()"><!-- --></A><H3>
785 public <B>TJ</B>()</PRE>
789 <!-- ============ METHOD DETAIL ========== -->
791 <A NAME="method_detail"><!-- --></A>
792 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
793 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
794 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
795 <B>Method Detail</B></FONT></TH>
799 <A NAME="getMCUWidth(int)"><!-- --></A><H3>
802 public static int <B>getMCUWidth</B>(int subsamp)
803 throws java.lang.Exception</PRE>
805 <DD>Returns the MCU block width for the given level of chrominance
809 <DT><B>Parameters:</B><DD><CODE>subsamp</CODE> - the level of chrominance subsampling (one of
811 <DT><B>Returns:</B><DD>the MCU block width for the given level of chrominance subsampling
813 <DD><CODE>java.lang.Exception</CODE></DL>
818 <A NAME="getMCUHeight(int)"><!-- --></A><H3>
821 public static int <B>getMCUHeight</B>(int subsamp)
822 throws java.lang.Exception</PRE>
824 <DD>Returns the MCU block height for the given level of chrominance
828 <DT><B>Parameters:</B><DD><CODE>subsamp</CODE> - the level of chrominance subsampling (one of
830 <DT><B>Returns:</B><DD>the MCU block height for the given level of chrominance
833 <DD><CODE>java.lang.Exception</CODE></DL>
838 <A NAME="getPixelSize(int)"><!-- --></A><H3>
841 public static int <B>getPixelSize</B>(int pixelFormat)
842 throws java.lang.Exception</PRE>
844 <DD>Returns the pixel size (in bytes) of the given pixel format.
847 <DT><B>Parameters:</B><DD><CODE>pixelFormat</CODE> - the pixel format (one of <code>PF_*</code>)
848 <DT><B>Returns:</B><DD>the pixel size (in bytes) of the given pixel format
850 <DD><CODE>java.lang.Exception</CODE></DL>
855 <A NAME="getRedOffset(int)"><!-- --></A><H3>
858 public static int <B>getRedOffset</B>(int pixelFormat)
859 throws java.lang.Exception</PRE>
861 <DD>For the given pixel format, returns the number of bytes that the red
862 component is offset from the start of the pixel. For instance, if a pixel
863 of format <code>TJ.PF_BGRX</code> is stored in <code>char pixel[]</code>,
864 then the red component will be
865 <code>pixel[TJ.getRedOffset(TJ.PF_BGRX)]</code>.
868 <DT><B>Parameters:</B><DD><CODE>pixelFormat</CODE> - the pixel format (one of <code>PF_*</code>)
869 <DT><B>Returns:</B><DD>the red offset for the given pixel format
871 <DD><CODE>java.lang.Exception</CODE></DL>
876 <A NAME="getGreenOffset(int)"><!-- --></A><H3>
879 public static int <B>getGreenOffset</B>(int pixelFormat)
880 throws java.lang.Exception</PRE>
882 <DD>For the given pixel format, returns the number of bytes that the green
883 component is offset from the start of the pixel. For instance, if a pixel
884 of format <code>TJ.PF_BGRX</code> is stored in <code>char pixel[]</code>,
885 then the green component will be
886 <code>pixel[TJ.getGreenOffset(TJ.PF_BGRX)]</code>.
889 <DT><B>Parameters:</B><DD><CODE>pixelFormat</CODE> - the pixel format (one of <code>PF_*</code>)
890 <DT><B>Returns:</B><DD>the green offset for the given pixel format
892 <DD><CODE>java.lang.Exception</CODE></DL>
897 <A NAME="getBlueOffset(int)"><!-- --></A><H3>
900 public static int <B>getBlueOffset</B>(int pixelFormat)
901 throws java.lang.Exception</PRE>
903 <DD>For the given pixel format, returns the number of bytes that the blue
904 component is offset from the start of the pixel. For instance, if a pixel
905 of format <code>TJ.PF_BGRX</code> is stored in <code>char pixel[]</code>,
906 then the blue component will be
907 <code>pixel[TJ.getBlueOffset(TJ.PF_BGRX)]</code>.
910 <DT><B>Parameters:</B><DD><CODE>pixelFormat</CODE> - the pixel format (one of <code>PF_*</code>)
911 <DT><B>Returns:</B><DD>the blue offset for the given pixel format
913 <DD><CODE>java.lang.Exception</CODE></DL>
918 <A NAME="bufSize(int, int, int)"><!-- --></A><H3>
921 public static int <B>bufSize</B>(int width,
923 int jpegSubsamp)
924 throws java.lang.Exception</PRE>
926 <DD>Returns the maximum size of the buffer (in bytes) required to hold a JPEG
927 image with the given width and height, and level of chrominance
931 <DT><B>Parameters:</B><DD><CODE>width</CODE> - the width (in pixels) of the JPEG image<DD><CODE>height</CODE> - the height (in pixels) of the JPEG image<DD><CODE>jpegSubsamp</CODE> - the level of chrominance subsampling to be used when
932 generating the JPEG image (one of <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><CODE>TJ.SAMP_*</CODE></A>)
933 <DT><B>Returns:</B><DD>the maximum size of the buffer (in bytes) required to hold a JPEG
934 image with the given width and height, and level of chrominance
937 <DD><CODE>java.lang.Exception</CODE></DL>
942 <A NAME="bufSizeYUV(int, int, int)"><!-- --></A><H3>
945 public static int <B>bufSizeYUV</B>(int width,
948 throws java.lang.Exception</PRE>
950 <DD>Returns the size of the buffer (in bytes) required to hold a YUV planar
951 image with the given width, height, and level of chrominance subsampling.
954 <DT><B>Parameters:</B><DD><CODE>width</CODE> - the width (in pixels) of the YUV image<DD><CODE>height</CODE> - the height (in pixels) of the YUV image<DD><CODE>subsamp</CODE> - the level of chrominance subsampling used in the YUV
955 image (one of <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><CODE>TJ.SAMP_*</CODE></A>)
956 <DT><B>Returns:</B><DD>the size of the buffer (in bytes) required to hold a YUV planar
957 image with the given width, height, and level of chrominance subsampling
959 <DD><CODE>java.lang.Exception</CODE></DL>
964 <A NAME="getScalingFactors()"><!-- --></A><H3>
965 getScalingFactors</H3>
967 public static <A HREF="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg">TJScalingFactor</A>[] <B>getScalingFactors</B>()
968 throws java.lang.Exception</PRE>
970 <DD>Returns a list of fractional scaling factors that the JPEG decompressor in
971 this implementation of TurboJPEG supports.
975 <DT><B>Returns:</B><DD>a list of fractional scaling factors that the JPEG decompressor in
976 this implementation of TurboJPEG supports
978 <DD><CODE>java.lang.Exception</CODE></DL>
981 <!-- ========= END OF CLASS DATA ========= -->
985 <!-- ======= START OF BOTTOM NAVBAR ====== -->
986 <A NAME="navbar_bottom"><!-- --></A>
987 <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
988 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
990 <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
991 <A NAME="navbar_bottom_firstrow"><!-- --></A>
992 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
993 <TR ALIGN="center" VALIGN="top">
994 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../org/libjpegturbo/turbojpeg/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
995 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
996 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
997 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
998 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
999 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
1003 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
1009 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
1010 PREV CLASS
1011 <A HREF="../../../org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg"><B>NEXT CLASS</B></A></FONT></TD>
1012 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
1013 <A HREF="../../../index.html?org/libjpegturbo/turbojpeg/TJ.html" target="_top"><B>FRAMES</B></A>
1014 <A HREF="TJ.html" target="_top"><B>NO FRAMES</B></A>
1015 <SCRIPT type="text/javascript">
1018 document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
1023 <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
1030 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
1031 SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
1032 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
1033 DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
1036 <A NAME="skip-navbar_bottom"></A>
1037 <!-- ======== END OF BOTTOM NAVBAR ======= -->