diff options
author | dcommander <dcommander@632fc199-4ca6-4c93-a231-07263d6284db> | 2014-03-16 22:56:26 +0000 |
---|---|---|
committer | dcommander <dcommander@632fc199-4ca6-4c93-a231-07263d6284db> | 2014-03-16 22:56:26 +0000 |
commit | aa862a864dd6db1b0ba7c91913b15bf77581ae22 (patch) | |
tree | 5c4681cad228ba57a869a2c323023935e00e80df /java/doc/org | |
parent | e8d62552fb459a328df687e6eb4164d2e57f5f61 (diff) |
Extend the YUV decode functionality to the TurboJPEG Java API, and port the TJUnitTest modifications that treat YUV encoding/decoding as an intermediate step of the JPEG compression/decompression pipeline rather than a separate test case; Add the ability to encode YUV images from an arbitrary position in a large image buffer; Significantly refactor the handling of YUV images; numerous doc tweaks; other Java API cleanup and usability improvements
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1176 632fc199-4ca6-4c93-a231-07263d6284db
Diffstat (limited to 'java/doc/org')
6 files changed, 563 insertions, 353 deletions
diff --git a/java/doc/org/libjpegturbo/turbojpeg/TJCompressor.html b/java/doc/org/libjpegturbo/turbojpeg/TJCompressor.html index b6452f3..3c24544 100644 --- a/java/doc/org/libjpegturbo/turbojpeg/TJCompressor.html +++ b/java/doc/org/libjpegturbo/turbojpeg/TJCompressor.html @@ -128,7 +128,7 @@ TurboJPEG compressor <BR> Create a TurboJPEG compressor instance and associate the uncompressed - source image stored in <code>srcImage</code> with the newly-created + source image stored in <code>srcImage</code> with the newly created instance.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> @@ -153,7 +153,7 @@ TurboJPEG compressor <BR> Create a TurboJPEG compressor instance and associate the uncompressed - source image stored in <code>srcImage</code> with the newly-created + source image stored in <code>srcImage</code> with the newly created instance.</TD> </TR> </TABLE> @@ -246,8 +246,7 @@ TurboJPEG compressor int flags)</CODE> <BR> - Encode the uncompressed source image associated with this compressor - instance and output a YUV planar image to the given destination buffer.</TD> + <B>Deprecated.</B> <I>Use <A HREF="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(org.libjpegturbo.turbojpeg.YUVImage, int)"><CODE>encodeYUV(YUVImage, int)</CODE></A> instead.</I></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> @@ -255,8 +254,29 @@ TurboJPEG compressor <TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(int)">encodeYUV</A></B>(int flags)</CODE> <BR> + <B>Deprecated.</B> <I>Use <A HREF="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(int, int)"><CODE>encodeYUV(int, int)</CODE></A> instead.</I></TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> <A HREF="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</A></CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(int, int)">encodeYUV</A></B>(int pad, + int flags)</CODE> + +<BR> Encode the uncompressed source image associated with this compressor - instance and return a buffer containing a YUV planar image.</TD> + instance into a YUV planar image and return a <code>YUVImage</code> + instance containing the encoded image.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> void</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(org.libjpegturbo.turbojpeg.YUVImage, int)">encodeYUV</A></B>(<A HREF="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</A> dstImage, + int flags)</CODE> + +<BR> + Encode the uncompressed source image associated with this compressor + instance into a YUV planar image and store it in the given + <code>YUVImage</code> instance.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> @@ -293,7 +313,8 @@ TurboJPEG compressor int height)</CODE> <BR> - Associate an uncompressed source image with this compressor instance.</TD> + Associate an uncompressed RGB or grayscale source image with this + compressor instance.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> @@ -320,15 +341,13 @@ TurboJPEG compressor int pixelFormat)</CODE> <BR> - Associate an uncompressed source image with this compressor instance.</TD> + Associate an uncompressed RGB, grayscale, or CMYK source image with this + compressor instance.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImageYUV(byte[], int, int, int)">setSourceImageYUV</A></B>(byte[] srcImage, - int width, - int pad, - int height)</CODE> +<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(org.libjpegturbo.turbojpeg.YUVImage)">setSourceImage</A></B>(<A HREF="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</A> srcImage)</CODE> <BR> Associate an uncompressed YUV planar source image with this compressor @@ -343,14 +362,6 @@ TurboJPEG compressor Set the level of chrominance subsampling for subsequent compress/encode operations.</TD> </TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> void</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setYUVPad(int)">setYUVPad</A></B>(int pad)</CODE> - -<BR> - Set the plane padding for subsequent YUV encode operations.</TD> -</TR> </TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> @@ -389,27 +400,6 @@ public <B>TJCompressor</B>() </DL> <HR> -<A NAME="TJCompressor(byte[], int, int, int, int)"><!-- --></A><H3> -TJCompressor</H3> -<PRE> -<FONT SIZE="-1">@Deprecated -</FONT>public <B>TJCompressor</B>(byte[] srcImage, - int width, - int pitch, - int height, - int pixelFormat) - throws java.lang.Exception</PRE> -<DL> -<DD><B>Deprecated.</B> <I>Use - <A HREF="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#TJCompressor(byte[], int, int, int, int, int, int)"><CODE>TJCompressor(byte[], int, int, int, int, int, int)</CODE></A> instead.</I> -<P> -<DL> - -<DT><B>Throws:</B> -<DD><CODE>java.lang.Exception</CODE></DL> -</DL> -<HR> - <A NAME="TJCompressor(byte[], int, int, int, int, int, int)"><!-- --></A><H3> TJCompressor</H3> <PRE> @@ -423,12 +413,33 @@ public <B>TJCompressor</B>(byte[] srcImage, throws java.lang.Exception</PRE> <DL> <DD>Create a TurboJPEG compressor instance and associate the uncompressed - source image stored in <code>srcImage</code> with the newly-created + source image stored in <code>srcImage</code> with the newly created instance. <P> <DL> <DT><B>Parameters:</B><DD><CODE>srcImage</CODE> - see <A HREF="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[], int, int, int, int, int, int)"><CODE>setSourceImage(byte[], int, int, int, int, int, int)</CODE></A> for description<DD><CODE>x</CODE> - see <A HREF="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[], int, int, int, int, int, int)"><CODE>setSourceImage(byte[], int, int, int, int, int, int)</CODE></A> for description<DD><CODE>y</CODE> - see <A HREF="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[], int, int, int, int, int, int)"><CODE>setSourceImage(byte[], int, int, int, int, int, int)</CODE></A> for description<DD><CODE>width</CODE> - see <A HREF="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[], int, int, int, int, int, int)"><CODE>setSourceImage(byte[], int, int, int, int, int, int)</CODE></A> for description<DD><CODE>pitch</CODE> - see <A HREF="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[], int, int, int, int, int, int)"><CODE>setSourceImage(byte[], int, int, int, int, int, int)</CODE></A> for description<DD><CODE>height</CODE> - see <A HREF="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[], int, int, int, int, int, int)"><CODE>setSourceImage(byte[], int, int, int, int, int, int)</CODE></A> for description<DD><CODE>pixelFormat</CODE> - pixel format of the source image (one of - <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><CODE>TJ.PF_*</CODE></A>) + <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_RGB"><CODE>TJ.PF_*</CODE></A>) +<DT><B>Throws:</B> +<DD><CODE>java.lang.Exception</CODE></DL> +</DL> +<HR> + +<A NAME="TJCompressor(byte[], int, int, int, int)"><!-- --></A><H3> +TJCompressor</H3> +<PRE> +<FONT SIZE="-1">@Deprecated +</FONT>public <B>TJCompressor</B>(byte[] srcImage, + int width, + int pitch, + int height, + int pixelFormat) + throws java.lang.Exception</PRE> +<DL> +<DD><B>Deprecated.</B> <I>Use + <A HREF="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#TJCompressor(byte[], int, int, int, int, int, int)"><CODE>TJCompressor(byte[], int, int, int, int, int, int)</CODE></A> instead.</I> +<P> +<DL> + <DT><B>Throws:</B> <DD><CODE>java.lang.Exception</CODE></DL> </DL> @@ -445,7 +456,7 @@ public <B>TJCompressor</B>(java.awt.image.BufferedImage srcImage, throws java.lang.Exception</PRE> <DL> <DD>Create a TurboJPEG compressor instance and associate the uncompressed - source image stored in <code>srcImage</code> with the newly-created + source image stored in <code>srcImage</code> with the newly created instance. <P> <DL> @@ -481,23 +492,24 @@ public void <B>setSourceImage</B>(byte[] srcImage, int pixelFormat) throws java.lang.Exception</PRE> <DL> -<DD>Associate an uncompressed source image with this compressor instance. +<DD>Associate an uncompressed RGB, grayscale, or CMYK source image with this + compressor instance. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>srcImage</CODE> - image buffer containing RGB, grayscale, or CMYK pixels to - be compressed<DD><CODE>x</CODE> - x offset (in pixels) of the region from which the JPEG image - should be compressed, relative to the start of <code>srcImage</code>.<DD><CODE>y</CODE> - y offset (in pixels) of the region from which the JPEG image - should be compressed, relative to the start of <code>srcImage</code>.<DD><CODE>width</CODE> - width (in pixels) of the region in the source image from - which the JPEG image should be compressed.<DD><CODE>pitch</CODE> - bytes per line of the source image. Normally, this should be + be compressed or encoded<DD><CODE>x</CODE> - x offset (in pixels) of the region in the source image from which + the JPEG or YUV image should be compressed/encoded<DD><CODE>y</CODE> - y offset (in pixels) of the region in the source image from which + the JPEG or YUV image should be compressed/encoded<DD><CODE>width</CODE> - width (in pixels) of the region in the source image from + which the JPEG or YUV image should be compressed/encoded<DD><CODE>pitch</CODE> - bytes per line of the source image. Normally, this should be <code>width * TJ.pixelSize(pixelFormat)</code> if the source image is unpadded, but you can use this parameter to, for instance, specify that the scanlines in the source image are padded to a 4-byte boundary or to - compress a JPEG image from a region of a larger source image. You can - also be clever and use this parameter to skip lines, etc. Setting this - parameter to 0 is the equivalent of setting it to <code>width * - TJ.pixelSize(pixelFormat)</code>.<DD><CODE>height</CODE> - height (in pixels) of the region in the source image from - which the JPEG image should be compressed.<DD><CODE>pixelFormat</CODE> - pixel format of the source image (one of - <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><CODE>TJ.PF_*</CODE></A>) + compress/encode a JPEG or YUV image from a region of a larger source + image. You can also be clever and use this parameter to skip lines, etc. + Setting this parameter to 0 is the equivalent of setting it to + <code>width * TJ.pixelSize(pixelFormat)</code>.<DD><CODE>height</CODE> - height (in pixels) of the region in the source image from + which the JPEG or YUV image should be compressed/encoded<DD><CODE>pixelFormat</CODE> - pixel format of the source image (one of + <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_RGB"><CODE>TJ.PF_*</CODE></A>) <DT><B>Throws:</B> <DD><CODE>java.lang.Exception</CODE></DL> </DD> @@ -536,47 +548,35 @@ public void <B>setSourceImage</B>(java.awt.image.BufferedImage srcImage, int height) throws java.lang.Exception</PRE> <DL> -<DD>Associate an uncompressed source image with this compressor instance. +<DD>Associate an uncompressed RGB or grayscale source image with this + compressor instance. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>srcImage</CODE> - a <code>BufferedImage</code> instance containing RGB or - grayscale pixels to be compressed<DD><CODE>x</CODE> - x offset (in pixels) of the region in the source image from which - the JPEG image should be compressed<DD><CODE>y</CODE> - y offset (in pixels) of the region in the source image from which - the JPEG image should be compressed<DD><CODE>width</CODE> - width (in pixels) of the region in the source image from - which the JPEG image should be compressed (0 = compress the whole image)<DD><CODE>height</CODE> - height (in pixels) of the region in the source image from - which the JPEG image should be compressed (0 = compress the whole image) + grayscale pixels to be compressed or encoded<DD><CODE>x</CODE> - x offset (in pixels) of the region in the source image from which + the JPEG or YUV image should be compressed/encoded<DD><CODE>y</CODE> - y offset (in pixels) of the region in the source image from which + the JPEG or YUV image should be compressed/encoded<DD><CODE>width</CODE> - width (in pixels) of the region in the source image from + which the JPEG or YUV image should be compressed/encoded (0 = use the + width of the source image)<DD><CODE>height</CODE> - height (in pixels) of the region in the source image from + which the JPEG or YUV image should be compressed/encoded (0 = use the + height of the source image) <DT><B>Throws:</B> <DD><CODE>java.lang.Exception</CODE></DL> </DD> </DL> <HR> -<A NAME="setSourceImageYUV(byte[], int, int, int)"><!-- --></A><H3> -setSourceImageYUV</H3> +<A NAME="setSourceImage(org.libjpegturbo.turbojpeg.YUVImage)"><!-- --></A><H3> +setSourceImage</H3> <PRE> -public void <B>setSourceImageYUV</B>(byte[] srcImage, - int width, - int pad, - int height) - throws java.lang.Exception</PRE> +public void <B>setSourceImage</B>(<A HREF="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</A> srcImage) + throws java.lang.Exception</PRE> <DL> <DD>Associate an uncompressed YUV planar source image with this compressor instance. <P> <DD><DL> -<DT><B>Parameters:</B><DD><CODE>srcImage</CODE> - image buffer containing a YUV planar image to be - compressed. The Y, U (Cb), and V (Cr) image planes should be stored - sequentially in the buffer, and the size of each plane is determined by - the specified width, height, and padding, as well as the level of - chrominance subsampling (specified using <A HREF="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSubsamp(int)"><CODE>setSubsamp(int)</CODE></A>.) If the - chrominance components are subsampled along the horizontal dimension, then - the width of the luminance plane should be padded to the nearest multiple - of 2 (same goes for the height of the luminance plane, if the chrominance - components are subsampled along the vertical dimension.) This is - irrespective of any additional padding specified in the <code>pad</code> - parameter.<DD><CODE>width</CODE> - width (in pixels) of the source image<DD><CODE>pad</CODE> - the line padding used in the source image. For instance, if - each line in each plane of the YUV image is padded to the nearest multiple - of 4 bytes, then <code>pad</code> should be set to 4.<DD><CODE>height</CODE> - height (in pixels) of the source image +<DT><B>Parameters:</B><DD><CODE>srcImage</CODE> - YUV planar image to be compressed <DT><B>Throws:</B> <DD><CODE>java.lang.Exception</CODE></DL> </DD> @@ -598,13 +598,17 @@ public void <B>setSubsamp</B>(int newSubsamp) sensitive to small changes in brightness than to small changes in color.) This is called "chrominance subsampling". <p> - NOTE: When compressing a YUV planar image into a JPEG image, this method - also specifies the level of chrominance subsampling used in the source - image. + NOTE: This method has no effect when compressing a JPEG image from a YUV + planar source. In that case, the level of chrominance subsampling in + the JPEG image is determined by the source. Further, this method has no + effect when encoding to a pre-allocated <A HREF="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><CODE>YUVImage</CODE></A> instance. In + that case, the level of chrominance subsampling is determined by the + destination. <P> <DD><DL> -<DT><B>Parameters:</B><DD><CODE>newSubsamp</CODE> - the new level of chrominance subsampling (one of - <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><CODE>TJ.SAMP_*</CODE></A>) +<DT><B>Parameters:</B><DD><CODE>newSubsamp</CODE> - the level of chrominance subsampling to use in + subsequent compress/encode oeprations (one of + <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_444"><CODE>TJ.SAMP_*</CODE></A>) <DT><B>Throws:</B> <DD><CODE>java.lang.Exception</CODE></DL> </DD> @@ -641,7 +645,9 @@ public void <B>compress</B>(byte[] dstBuf, <DD><DL> <DT><B>Parameters:</B><DD><CODE>dstBuf</CODE> - buffer that will receive the JPEG image. Use <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#bufSize(int, int, int)"><CODE>TJ.bufSize(int, int, int)</CODE></A> to determine the maximum size for this buffer based on - the image width, height, and level of chrominance subsampling.<DD><CODE>flags</CODE> - the bitwise OR of one or more of <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><CODE>TJ.FLAG_*</CODE></A> + the source image's width and height and the desired level of chrominance + subsampling.<DD><CODE>flags</CODE> - the bitwise OR of one or more of + <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP"><CODE>TJ.FLAG_*</CODE></A> <DT><B>Throws:</B> <DD><CODE>java.lang.Exception</CODE></DL> </DD> @@ -658,7 +664,8 @@ public byte[] <B>compress</B>(int flags) instance and return a buffer containing a JPEG image. <P> <DD><DL> -<DT><B>Parameters:</B><DD><CODE>flags</CODE> - the bitwise OR of one or more of <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><CODE>TJ.FLAG_*</CODE></A> +<DT><B>Parameters:</B><DD><CODE>flags</CODE> - the bitwise OR of one or more of + <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP"><CODE>TJ.FLAG_*</CODE></A> <DT><B>Returns:</B><DD>a buffer containing a JPEG image. The length of this buffer will not be equal to the size of the JPEG image. Use <A HREF="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#getCompressedSize()"><CODE>getCompressedSize()</CODE></A> to obtain the size of the JPEG image. <DT><B>Throws:</B> @@ -708,19 +715,24 @@ compress</H3> </DL> <HR> -<A NAME="setYUVPad(int)"><!-- --></A><H3> -setYUVPad</H3> +<A NAME="encodeYUV(org.libjpegturbo.turbojpeg.YUVImage, int)"><!-- --></A><H3> +encodeYUV</H3> <PRE> -public void <B>setYUVPad</B>(int pad) +public void <B>encodeYUV</B>(<A HREF="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</A> dstImage, + int flags) throws java.lang.Exception</PRE> <DL> -<DD>Set the plane padding for subsequent YUV encode operations. +<DD>Encode the uncompressed source image associated with this compressor + instance into a YUV planar image and store it in the given + <code>YUVImage</code> instance. This method uses the accelerated color + conversion routines in TurboJPEG's underlying codec but does not execute + any of the other steps in the JPEG compression process. Encoding + CMYK source images to YUV is not supported. <P> <DD><DL> -<DT><B>Parameters:</B><DD><CODE>pad</CODE> - the width of each line in each plane of the YUV image will be - padded to the nearest multiple of this number of bytes (must be a - power of 2.) The default padding is 4 bytes, which generates - images suitable for direct video display. +<DT><B>Parameters:</B><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 + image<DD><CODE>flags</CODE> - the bitwise OR of one or more of + <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP"><CODE>TJ.FLAG_*</CODE></A> <DT><B>Throws:</B> <DD><CODE>java.lang.Exception</CODE></DL> </DD> @@ -730,31 +742,41 @@ public void <B>setYUVPad</B>(int pad) <A NAME="encodeYUV(byte[], int)"><!-- --></A><H3> encodeYUV</H3> <PRE> -public void <B>encodeYUV</B>(byte[] dstBuf, - int flags) +<FONT SIZE="-1">@Deprecated +</FONT>public void <B>encodeYUV</B>(byte[] dstBuf, + int flags) throws java.lang.Exception</PRE> <DL> +<DD><B>Deprecated.</B> <I>Use <A HREF="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(org.libjpegturbo.turbojpeg.YUVImage, int)"><CODE>encodeYUV(YUVImage, int)</CODE></A> instead.</I> +<P> +<DD><DL> + +<DT><B>Throws:</B> +<DD><CODE>java.lang.Exception</CODE></DL> +</DD> +</DL> +<HR> + +<A NAME="encodeYUV(int, int)"><!-- --></A><H3> +encodeYUV</H3> +<PRE> +public <A HREF="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</A> <B>encodeYUV</B>(int pad, + int flags) + throws java.lang.Exception</PRE> +<DL> <DD>Encode the uncompressed source image associated with this compressor - instance and output a YUV planar image to the given destination buffer. - This method uses the accelerated color conversion routines in TurboJPEG's - underlying codec but does not execute any of the other steps in the JPEG - compression process. The Y, U (Cb), and V (Cr) image planes are stored - sequentially into the destination buffer, and the size of each plane is - determined by the width and height of the source image, as well as the - specified padding and level of chrominance subsampling. If the - chrominance components are subsampled along the horizontal dimension, then - the width of the luminance plane is padded to the nearest multiple of 2 in - the output image (same goes for the height of the luminance plane, if the - chrominance components are subsampled along the vertical dimension.) - <p> - NOTE: Technically, the JPEG format uses the YCbCr colorspace, but per the - convention of the digital video community, the TurboJPEG API uses "YUV" to - refer to an image format consisting of Y, Cb, and Cr image planes. + instance into a YUV planar image and return a <code>YUVImage</code> + instance containing the encoded image. This method uses the accelerated + color conversion routines in TurboJPEG's underlying codec but does not + execute any of the other steps in the JPEG compression process. Encoding + CMYK source images to YUV is not supported. <P> <DD><DL> -<DT><B>Parameters:</B><DD><CODE>dstBuf</CODE> - buffer that will receive the YUV planar image. Use - <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#bufSizeYUV(int, int, int, int)"><CODE>TJ.bufSizeYUV(int, int, int, int)</CODE></A> to determine the appropriate size for this buffer - based on the image width, height, and level of chrominance subsampling.<DD><CODE>flags</CODE> - the bitwise OR of one or more of <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><CODE>TJ.FLAG_*</CODE></A> +<DT><B>Parameters:</B><DD><CODE>pad</CODE> - the width of each line in each plane of the YUV image will be + padded to the nearest multiple of this number of bytes (must be a power of + 2.)<DD><CODE>flags</CODE> - the bitwise OR of one or more of + <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP"><CODE>TJ.FLAG_*</CODE></A> +<DT><B>Returns:</B><DD>a YUV planar image <DT><B>Throws:</B> <DD><CODE>java.lang.Exception</CODE></DL> </DD> @@ -764,16 +786,14 @@ public void <B>encodeYUV</B>(byte[] dstBuf, <A NAME="encodeYUV(int)"><!-- --></A><H3> encodeYUV</H3> <PRE> -public byte[] <B>encodeYUV</B>(int flags) +<FONT SIZE="-1">@Deprecated +</FONT>public byte[] <B>encodeYUV</B>(int flags) throws java.lang.Exception</PRE> <DL> -<DD>Encode the uncompressed source image associated with this compressor - instance and return a buffer containing a YUV planar image. See - <A HREF="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(byte[], int)"><CODE>encodeYUV(byte[], int)</CODE></A> for more detail. +<DD><B>Deprecated.</B> <I>Use <A HREF="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(int, int)"><CODE>encodeYUV(int, int)</CODE></A> instead.</I> <P> <DD><DL> -<DT><B>Parameters:</B><DD><CODE>flags</CODE> - the bitwise OR of one or more of <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><CODE>TJ.FLAG_*</CODE></A> -<DT><B>Returns:</B><DD>a buffer containing a YUV planar image + <DT><B>Throws:</B> <DD><CODE>java.lang.Exception</CODE></DL> </DD> diff --git a/java/doc/org/libjpegturbo/turbojpeg/TJDecompressor.html b/java/doc/org/libjpegturbo/turbojpeg/TJDecompressor.html index 2dc3cc6..01007b3 100644 --- a/java/doc/org/libjpegturbo/turbojpeg/TJDecompressor.html +++ b/java/doc/org/libjpegturbo/turbojpeg/TJDecompressor.html @@ -142,7 +142,7 @@ TurboJPEG decompressor <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#jpegColorspace">jpegColorspace</A></B></CODE> +<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#srcColorspace">srcColorspace</A></B></CODE> <BR> </TD> @@ -150,7 +150,7 @@ TurboJPEG decompressor <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#jpegHeight">jpegHeight</A></B></CODE> +<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#srcHeight">srcHeight</A></B></CODE> <BR> </TD> @@ -158,7 +158,7 @@ TurboJPEG decompressor <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#jpegSubsamp">jpegSubsamp</A></B></CODE> +<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#srcSubsamp">srcSubsamp</A></B></CODE> <BR> </TD> @@ -166,7 +166,15 @@ TurboJPEG decompressor <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#jpegWidth">jpegWidth</A></B></CODE> +<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#srcWidth">srcWidth</A></B></CODE> + +<BR> + </TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>protected <A HREF="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</A></CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#yuvImage">yuvImage</A></B></CODE> <BR> </TD> @@ -191,17 +199,25 @@ TurboJPEG decompressor <TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#TJDecompressor(byte[])">TJDecompressor</A></B>(byte[] jpegImage)</CODE> <BR> - Create a TurboJPEG decompressor instance and associate the JPEG image - stored in <code>jpegImage</code> with the newly-created instance.</TD> + Create a TurboJPEG decompressor instance and associate the JPEG source + image stored in <code>jpegImage</code> with the newly created instance.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#TJDecompressor(byte[], int)">TJDecompressor</A></B>(byte[] jpegImage, int imageSize)</CODE> <BR> - Create a TurboJPEG decompressor instance and associate the JPEG image - of length <code>imageSize</code> bytes stored in <code>jpegImage</code> - with the newly-created instance.</TD> + Create a TurboJPEG decompressor instance and associate the JPEG source + image of length <code>imageSize</code> bytes stored in + <code>jpegImage</code> with the newly created instance.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#TJDecompressor(org.libjpegturbo.turbojpeg.YUVImage)">TJDecompressor</A></B>(<A HREF="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</A> yuvImage)</CODE> + +<BR> + Create a TurboJPEG decompressor instance and associate the YUV planar + source image stored in <code>yuvImage</code> with the newly created + instance.</TD> </TR> </TABLE> @@ -228,9 +244,9 @@ TurboJPEG decompressor int flags)</CODE> <BR> - Decompress the JPEG source image associated with this decompressor - instance and output a decompressed image to the given - <code>BufferedImage</code> instance.</TD> + Decompress the JPEG source image or decode the YUV source image associated + with this decompressor instance and output a decompressed/decoded image to + the given <code>BufferedImage</code> instance.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> @@ -259,8 +275,9 @@ TurboJPEG decompressor int flags)</CODE> <BR> - Decompress the JPEG source image associated with this decompressor - instance and output a decompressed image to the given destination buffer.</TD> + Decompress the JPEG source image or decode the YUV source image associated + with this decompressor instance and output a grayscale, RGB, or CMYK image + to the given destination buffer.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> @@ -275,8 +292,9 @@ TurboJPEG decompressor int flags)</CODE> <BR> - Decompress the JPEG source image associated with this decompressor - instance and output a decompressed image to the given destination buffer.</TD> + Decompress the JPEG source image or decode the YUV source image associated + with this decompressor instance and output a grayscale, RGB, or CMYK image + to the given destination buffer.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> @@ -287,9 +305,9 @@ TurboJPEG decompressor int flags)</CODE> <BR> - Decompress the JPEG source image associated with this decompressor - instance and return a <code>BufferedImage</code> instance containing the - decompressed image.</TD> + Decompress the JPEG source image or decode the YUV source image associated + with this decompressor instance and return a <code>BufferedImage</code> + instance containing the decompressed/decoded image.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> @@ -311,21 +329,7 @@ TurboJPEG decompressor int flags)</CODE> <BR> - <B>Deprecated.</B> <I>Use <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(byte[], int, int, int, int)"><CODE>decompressToYUV(byte[], int, int, int, int)</CODE></A> - instead.</I></TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> void</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(byte[], int, int, int, int)">decompressToYUV</A></B>(byte[] dstBuf, - int desiredWidth, - int pad, - int desiredHeight, - int flags)</CODE> - -<BR> - Decompress the JPEG source image associated with this decompressor - instance and output a YUV planar image to the given destination buffer.</TD> + <B>Deprecated.</B> <I>Use <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(org.libjpegturbo.turbojpeg.YUVImage, int)"><CODE>decompressToYUV(YUVImage, int)</CODE></A> instead.</I></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> @@ -337,7 +341,7 @@ TurboJPEG decompressor </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> byte[]</CODE></FONT></TD> +<CODE> <A HREF="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(int, int, int, int)">decompressToYUV</A></B>(int desiredWidth, int pad, int desiredHeight, @@ -345,7 +349,19 @@ TurboJPEG decompressor <BR> Decompress the JPEG source image associated with this decompressor - instance and return a buffer containing a YUV planar image.</TD> + instance into a YUV planar image and return a <code>YUVImage</code> + instance containing the decompressed image.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> void</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(org.libjpegturbo.turbojpeg.YUVImage, int)">decompressToYUV</A></B>(<A HREF="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</A> dstImage, + int flags)</CODE> + +<BR> + Decompress the JPEG source image associated with this decompressor + instance into a YUV planar image and store it in the given + <code>YUVImage</code> instance.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> @@ -361,8 +377,8 @@ TurboJPEG decompressor <TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getColorspace()">getColorspace</A></B>()</CODE> <BR> - Returns the colorspace used in the JPEG image associated with this - decompressor instance.</TD> + Returns the colorspace used in the source image (JPEG or YUV) associated + with this decompressor instance.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> @@ -370,8 +386,8 @@ TurboJPEG decompressor <TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getHeight()">getHeight</A></B>()</CODE> <BR> - Returns the height of the JPEG image associated with this decompressor - instance.</TD> + Returns the height of the source image (JPEG or YUV) associated with this + decompressor instance.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> @@ -379,7 +395,7 @@ TurboJPEG decompressor <TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getJPEGBuf()">getJPEGBuf</A></B>()</CODE> <BR> - Returns the JPEG image buffer associated with this decompressor instance.</TD> + <B>Deprecated.</B> <I>Use <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getSourceBuf()"><CODE>getSourceBuf()</CODE></A> instead.</I></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> @@ -387,8 +403,7 @@ TurboJPEG decompressor <TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getJPEGSize()">getJPEGSize</A></B>()</CODE> <BR> - Returns the size of the JPEG image (in bytes) associated with this - decompressor instance.</TD> + <B>Deprecated.</B> <I>Use <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getSourceSize()"><CODE>getSourceSize()</CODE></A> instead.</I></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> @@ -414,12 +429,30 @@ TurboJPEG decompressor </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> byte[]</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getSourceBuf()">getSourceBuf</A></B>()</CODE> + +<BR> + Returns the source image buffer associated with this decompressor + instance.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> int</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getSourceSize()">getSourceSize</A></B>()</CODE> + +<BR> + Returns the size of the source image (in bytes) associated with this + decompressor instance.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> int</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getSubsamp()">getSubsamp</A></B>()</CODE> <BR> - Returns the level of chrominance subsampling used in the JPEG image - associated with this decompressor instance.</TD> + Returns the level of chrominance subsampling used in the source image + (JPEG or YUV) associated with this decompressor instance.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> @@ -427,8 +460,8 @@ TurboJPEG decompressor <TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getWidth()">getWidth</A></B>()</CODE> <BR> - Returns the width of the JPEG image associated with this decompressor - instance.</TD> + Returns the width of the source image (JPEG or YUV) associated with this + decompressor instance.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> @@ -437,8 +470,26 @@ TurboJPEG decompressor int imageSize)</CODE> <BR> + <B>Deprecated.</B> <I>Use <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#setSourceImage(byte[], int)"><CODE>setSourceImage(byte[], int)</CODE></A> instead.</I></TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> void</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#setSourceImage(byte[], int)">setSourceImage</A></B>(byte[] srcImage, + int imageSize)</CODE> + +<BR> Associate the JPEG image of length <code>imageSize</code> bytes stored in - <code>jpegImage</code> with this decompressor instance.</TD> + <code>srcImage</code> with this decompressor instance.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> void</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#setSourceImage(org.libjpegturbo.turbojpeg.YUVImage)">setSourceImage</A></B>(<A HREF="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</A> srcImage)</CODE> + +<BR> + Associate the specified YUV planar source image with this decompressor + instance.</TD> </TR> </TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> @@ -493,40 +544,50 @@ protected int <B>jpegBufSize</B></PRE> </DL> <HR> -<A NAME="jpegWidth"><!-- --></A><H3> -jpegWidth</H3> +<A NAME="yuvImage"><!-- --></A><H3> +yuvImage</H3> +<PRE> +protected <A HREF="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</A> <B>yuvImage</B></PRE> +<DL> +<DL> +</DL> +</DL> +<HR> + +<A NAME="srcWidth"><!-- --></A><H3> +srcWidth</H3> <PRE> -protected int <B>jpegWidth</B></PRE> +protected int <B>srcWidth</B></PRE> <DL> <DL> </DL> </DL> <HR> -<A NAME="jpegHeight"><!-- --></A><H3> -jpegHeight</H3> +<A NAME="srcHeight"><!-- --></A><H3> +srcHeight</H3> <PRE> -protected int <B>jpegHeight</B></PRE> +protected int <B>srcHeight</B></PRE> <DL> <DL> </DL> </DL> <HR> -<A NAME="jpegSubsamp"><!-- --></A><H3> -jpegSubsamp</H3> +<A NAME="srcSubsamp"><!-- --></A><H3> +srcSubsamp</H3> <PRE> -protected int <B>jpegSubsamp</B></PRE> +protected int <B>srcSubsamp</B></PRE> <DL> <DL> </DL> </DL> <HR> -<A NAME="jpegColorspace"><!-- --></A><H3> -jpegColorspace</H3> +<A NAME="srcColorspace"><!-- --></A><H3> +srcColorspace</H3> <PRE> -protected int <B>jpegColorspace</B></PRE> +protected int <B>srcColorspace</B></PRE> <DL> <DL> </DL> @@ -563,8 +624,8 @@ TJDecompressor</H3> public <B>TJDecompressor</B>(byte[] jpegImage) throws java.lang.Exception</PRE> <DL> -<DD>Create a TurboJPEG decompressor instance and associate the JPEG image - stored in <code>jpegImage</code> with the newly-created instance. +<DD>Create a TurboJPEG decompressor instance and associate the JPEG source + image stored in <code>jpegImage</code> with the newly created instance. <P> <DL> <DT><B>Parameters:</B><DD><CODE>jpegImage</CODE> - JPEG image buffer (size of the JPEG image is assumed to @@ -581,15 +642,33 @@ public <B>TJDecompressor</B>(byte[] jpegImage, int imageSize) throws java.lang.Exception</PRE> <DL> -<DD>Create a TurboJPEG decompressor instance and associate the JPEG image - of length <code>imageSize</code> bytes stored in <code>jpegImage</code> - with the newly-created instance. +<DD>Create a TurboJPEG decompressor instance and associate the JPEG source + image of length <code>imageSize</code> bytes stored in + <code>jpegImage</code> with the newly created instance. <P> <DL> <DT><B>Parameters:</B><DD><CODE>jpegImage</CODE> - JPEG image buffer<DD><CODE>imageSize</CODE> - size of the JPEG image (in bytes) <DT><B>Throws:</B> <DD><CODE>java.lang.Exception</CODE></DL> </DL> +<HR> + +<A NAME="TJDecompressor(org.libjpegturbo.turbojpeg.YUVImage)"><!-- --></A><H3> +TJDecompressor</H3> +<PRE> +public <B>TJDecompressor</B>(<A HREF="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</A> yuvImage) + throws java.lang.Exception</PRE> +<DL> +<DD>Create a TurboJPEG decompressor instance and associate the YUV planar + source image stored in <code>yuvImage</code> with the newly created + instance. +<P> +<DL> +<DT><B>Parameters:</B><DD><CODE>yuvImage</CODE> - <A HREF="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><CODE>YUVImage</CODE></A> instance containing a YUV planar + image to be decoded +<DT><B>Throws:</B> +<DD><CODE>java.lang.Exception</CODE></DL> +</DL> <!-- ============ METHOD DETAIL ========== --> @@ -601,19 +680,56 @@ public <B>TJDecompressor</B>(byte[] jpegImage, </TR> </TABLE> +<A NAME="setSourceImage(byte[], int)"><!-- --></A><H3> +setSourceImage</H3> +<PRE> +public void <B>setSourceImage</B>(byte[] srcImage, + int imageSize) + throws java.lang.Exception</PRE> +<DL> +<DD>Associate the JPEG image of length <code>imageSize</code> bytes stored in + <code>srcImage</code> with this decompressor instance. This image will + be used as the source image for subsequent decompress operations. +<P> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>srcImage</CODE> - JPEG image buffer<DD><CODE>imageSize</CODE> - size of the JPEG image (in bytes) +<DT><B>Throws:</B> +<DD><CODE>java.lang.Exception</CODE></DL> +</DD> +</DL> +<HR> + <A NAME="setJPEGImage(byte[], int)"><!-- --></A><H3> setJPEGImage</H3> <PRE> -public void <B>setJPEGImage</B>(byte[] jpegImage, - int imageSize) +<FONT SIZE="-1">@Deprecated +</FONT>public void <B>setJPEGImage</B>(byte[] jpegImage, + int imageSize) throws java.lang.Exception</PRE> <DL> -<DD>Associate the JPEG image of length <code>imageSize</code> bytes stored in - <code>jpegImage</code> with this decompressor instance. This image will - be used as the source image for subsequent decompress operations. +<DD><B>Deprecated.</B> <I>Use <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#setSourceImage(byte[], int)"><CODE>setSourceImage(byte[], int)</CODE></A> instead.</I> <P> <DD><DL> -<DT><B>Parameters:</B><DD><CODE>jpegImage</CODE> - JPEG image buffer<DD><CODE>imageSize</CODE> - size of the JPEG image (in bytes) + +<DT><B>Throws:</B> +<DD><CODE>java.lang.Exception</CODE></DL> +</DD> +</DL> +<HR> + +<A NAME="setSourceImage(org.libjpegturbo.turbojpeg.YUVImage)"><!-- --></A><H3> +setSourceImage</H3> +<PRE> +public void <B>setSourceImage</B>(<A HREF="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</A> srcImage) + throws java.lang.Exception</PRE> +<DL> +<DD>Associate the specified YUV planar source image with this decompressor + instance. Subsequent decompress operations will decode this image into an + RGB or grayscale destination image. +<P> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>srcImage</CODE> - <A HREF="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><CODE>YUVImage</CODE></A> instance containing a YUV planar image to + be decoded <DT><B>Throws:</B> <DD><CODE>java.lang.Exception</CODE></DL> </DD> @@ -626,13 +742,13 @@ getWidth</H3> public int <B>getWidth</B>() throws java.lang.Exception</PRE> <DL> -<DD>Returns the width of the JPEG image associated with this decompressor - instance. +<DD>Returns the width of the source image (JPEG or YUV) associated with this + decompressor instance. <P> <DD><DL> -<DT><B>Returns:</B><DD>the width of the JPEG image associated with this decompressor - instance +<DT><B>Returns:</B><DD>the width of the source image (JPEG or YUV) associated with this + decompressor instance <DT><B>Throws:</B> <DD><CODE>java.lang.Exception</CODE></DL> </DD> @@ -645,13 +761,13 @@ getHeight</H3> public int <B>getHeight</B>() throws java.lang.Exception</PRE> <DL> -<DD>Returns the height of the JPEG image associated with this decompressor - instance. +<DD>Returns the height of the source image (JPEG or YUV) associated with this + decompressor instance. <P> <DD><DL> -<DT><B>Returns:</B><DD>the height of the JPEG image associated with this decompressor - instance +<DT><B>Returns:</B><DD>the height of the source image (JPEG or YUV) associated with this + decompressor instance <DT><B>Throws:</B> <DD><CODE>java.lang.Exception</CODE></DL> </DD> @@ -664,13 +780,14 @@ getSubsamp</H3> public int <B>getSubsamp</B>() throws java.lang.Exception</PRE> <DL> -<DD>Returns the level of chrominance subsampling used in the JPEG image - associated with this decompressor instance. See <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><CODE>TJ.SAMP_*</CODE></A>. +<DD>Returns the level of chrominance subsampling used in the source image + (JPEG or YUV) associated with this decompressor instance. See + <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_444"><CODE>TJ.SAMP_*</CODE></A>. <P> <DD><DL> -<DT><B>Returns:</B><DD>the level of chrominance subsampling used in the JPEG image - associated with this decompressor instance +<DT><B>Returns:</B><DD>the level of chrominance subsampling used in the source image + (JPEG or YUV) associated with this decompressor instance <DT><B>Throws:</B> <DD><CODE>java.lang.Exception</CODE></DL> </DD> @@ -683,13 +800,32 @@ getColorspace</H3> public int <B>getColorspace</B>() throws java.lang.Exception</PRE> <DL> -<DD>Returns the colorspace used in the JPEG image associated with this - decompressor instance. See <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><CODE>TJ.CS_*</CODE></A>. +<DD>Returns the colorspace used in the source image (JPEG or YUV) associated + with this decompressor instance. See <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#CS_RGB"><CODE>TJ.CS_*</CODE></A>. If the + source image is YUV, then this always returns <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#CS_YCbCr"><CODE>TJ.CS_YCbCr</CODE></A>. <P> <DD><DL> -<DT><B>Returns:</B><DD>the colorspace used in the JPEG image associated with this - decompressor instance +<DT><B>Returns:</B><DD>the colorspace used in the source image (JPEG or YUV) associated + with this decompressor instance +<DT><B>Throws:</B> +<DD><CODE>java.lang.Exception</CODE></DL> +</DD> +</DL> +<HR> + +<A NAME="getSourceBuf()"><!-- --></A><H3> +getSourceBuf</H3> +<PRE> +public byte[] <B>getSourceBuf</B>() + throws java.lang.Exception</PRE> +<DL> +<DD>Returns the source image buffer associated with this decompressor + instance. +<P> +<DD><DL> + +<DT><B>Returns:</B><DD>the source image buffer associated with this decompressor instance <DT><B>Throws:</B> <DD><CODE>java.lang.Exception</CODE></DL> </DD> @@ -699,14 +835,33 @@ public int <B>getColorspace</B>() <A NAME="getJPEGBuf()"><!-- --></A><H3> getJPEGBuf</H3> <PRE> -public byte[] <B>getJPEGBuf</B>() +<FONT SIZE="-1">@Deprecated +</FONT>public byte[] <B>getJPEGBuf</B>() throws java.lang.Exception</PRE> <DL> -<DD>Returns the JPEG image buffer associated with this decompressor instance. +<DD><B>Deprecated.</B> <I>Use <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getSourceBuf()"><CODE>getSourceBuf()</CODE></A> instead.</I> <P> <DD><DL> -<DT><B>Returns:</B><DD>the JPEG image buffer associated with this decompressor instance +<DT><B>Throws:</B> +<DD><CODE>java.lang.Exception</CODE></DL> +</DD> +</DL> +<HR> + +<A NAME="getSourceSize()"><!-- --></A><H3> +getSourceSize</H3> +<PRE> +public int <B>getSourceSize</B>() + throws java.lang.Exception</PRE> +<DL> +<DD>Returns the size of the source image (in bytes) associated with this + decompressor instance. +<P> +<DD><DL> + +<DT><B>Returns:</B><DD>the size of the source image (in bytes) associated with this + decompressor instance <DT><B>Throws:</B> <DD><CODE>java.lang.Exception</CODE></DL> </DD> @@ -716,16 +871,14 @@ public byte[] <B>getJPEGBuf</B>() <A NAME="getJPEGSize()"><!-- --></A><H3> getJPEGSize</H3> <PRE> -public int <B>getJPEGSize</B>() +<FONT SIZE="-1">@Deprecated +</FONT>public int <B>getJPEGSize</B>() throws java.lang.Exception</PRE> <DL> -<DD>Returns the size of the JPEG image (in bytes) associated with this - decompressor instance. +<DD><B>Deprecated.</B> <I>Use <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getSourceSize()"><CODE>getSourceSize()</CODE></A> instead.</I> <P> <DD><DL> -<DT><B>Returns:</B><DD>the size of the JPEG image (in bytes) associated with this - decompressor instance <DT><B>Throws:</B> <DD><CODE>java.lang.Exception</CODE></DL> </DD> @@ -801,43 +954,54 @@ public void <B>decompress</B>(byte[] dstBuf, int flags) throws java.lang.Exception</PRE> <DL> -<DD>Decompress the JPEG source image associated with this decompressor - instance and output a decompressed image to the given destination buffer. +<DD>Decompress the JPEG source image or decode the YUV source image associated + with this decompressor instance and output a grayscale, RGB, or CMYK image + to the given destination buffer. <P> <DD><DL> -<DT><B>Parameters:</B><DD><CODE>dstBuf</CODE> - buffer that will receive the decompressed image. This - buffer should normally be <code>pitch * scaledHeight</code> bytes in size, - where <code>scaledHeight</code> can be determined by calling <code> +<DT><B>Parameters:</B><DD><CODE>dstBuf</CODE> - buffer that will receive the decompressed/decoded image. + If the source image is a JPEG image, then this buffer should normally be + <code>pitch * scaledHeight</code> bytes in size, where + <code>scaledHeight</code> can be determined by calling <code> scalingFactor.<A HREF="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html#getScaled(int)"><CODE>getScaled</CODE></A>(jpegHeight) - </code> with one of the scaling factors returned from <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#getScalingFactors()"><CODE>TJ.getScalingFactors()</CODE></A> or by calling <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getScaledHeight(int, int)"><CODE>getScaledHeight(int, int)</CODE></A>. However, - the buffer may also be larger than the dimensions of the JPEG image, in - which case the <code>x</code>, <code>y</code>, and <code>pitch</code> - parameters can be used to specify the region into which the JPEG image - should be decompressed.<DD><CODE>x</CODE> - x offset (in pixels) of the region into which the JPEG image - should be decompressed, relative to the start of <code>dstBuf</code>.<DD><CODE>y</CODE> - y offset (in pixels) of the region into which the JPEG image - should be decompressed, relative to the start of <code>dstBuf</code>.<DD><CODE>desiredWidth</CODE> - desired width (in pixels) of the decompressed image - (or image region.) If the desired image dimensions are different than the - dimensions of the JPEG image being decompressed, then TurboJPEG will use - scaling in the JPEG decompressor to generate the largest possible image - that will fit within the desired dimensions. Setting this to 0 is the - same as setting it to the width of the JPEG image (in other words, the - width will not be considered when determining the scaled image size.)<DD><CODE>pitch</CODE> - bytes per line of the destination image. Normally, this + </code> with one of the scaling factors returned from <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#getScalingFactors()"><CODE>TJ.getScalingFactors()</CODE></A> or by calling <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getScaledHeight(int, int)"><CODE>getScaledHeight(int, int)</CODE></A>. If the + source image is a YUV image, then this buffer should normally be + <code>pitch * height</code> bytes in size, where <code>height</code> is + the height of the YUV image. However, the buffer may also be larger than + the dimensions of the source image, in which case the <code>x</code>, + <code>y</code>, and <code>pitch</code> parameters can be used to specify + the region into which the source image should be decompressed/decoded.<DD><CODE>x</CODE> - x offset (in pixels) of the region in the destination image into + which the source image should be decompressed/decoded<DD><CODE>y</CODE> - y offset (in pixels) of the region in the destination image into + which the source image should be decompressed/decoded<DD><CODE>desiredWidth</CODE> - If the source image is a JPEG image, then this + specifies the desired width (in pixels) of the decompressed image (or + image region.) If the desired destination image dimensions are different + than the source image dimensions, then TurboJPEG will use scaling in the + JPEG decompressor to generate the largest possible image that will fit + within the desired dimensions. Setting this to 0 is the same as setting + it to the width of the JPEG image (in other words, the width will not be + considered when determining the scaled image size.) This parameter is + ignored if the source image is a YUV image.<DD><CODE>pitch</CODE> - bytes per line of the destination image. Normally, this should be set to <code>scaledWidth * TJ.pixelSize(pixelFormat)</code> if - the decompressed image is unpadded, but you can use this to, for instance, - pad each line of the decompressed image to a 4-byte boundary or to - decompress the JPEG image into a region of a larger image. NOTE: - <code>scaledWidth</code> can be determined by calling <code> + the destination image is unpadded, but you can use this to, for instance, + pad each line of the destination image to a 4-byte boundary or to + decompress/decode the source image into a region of a larger image. NOTE: + if the source image is a JPEG image, then <code>scaledWidth</code> can be + determined by calling <code> scalingFactor.<A HREF="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html#getScaled(int)"><CODE>getScaled</CODE></A>(jpegWidth) - </code> or by calling <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getScaledWidth(int, int)"><CODE>getScaledWidth(int, int)</CODE></A>. Setting this parameter to - 0 is the equivalent of setting it to <code>scaledWidth * - TJ.pixelSize(pixelFormat)</code>.<DD><CODE>desiredHeight</CODE> - desired height (in pixels) of the decompressed image - (or image region.) If the desired image dimensions are different than the - dimensions of the JPEG image being decompressed, then TurboJPEG will use - scaling in the JPEG decompressor to generate the largest possible image - that will fit within the desired dimensions. Setting this to 0 is the - same as setting it to the height of the JPEG image (in other words, the - height will not be considered when determining the scaled image size.)<DD><CODE>pixelFormat</CODE> - pixel format of the decompressed image (one of - <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><CODE>TJ.PF_*</CODE></A>)<DD><CODE>flags</CODE> - the bitwise OR of one or more of <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><CODE>TJ.FLAG_*</CODE></A> + </code> or by calling <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getScaledWidth(int, int)"><CODE>getScaledWidth(int, int)</CODE></A>. If the source image is a + YUV image, then <code>scaledWidth</code> is the width of the YUV image. + Setting this parameter to 0 is the equivalent of setting it to + <code>scaledWidth * TJ.pixelSize(pixelFormat)</code>.<DD><CODE>desiredHeight</CODE> - If the source image is a JPEG image, then this + specifies the desired height (in pixels) of the decompressed image (or + image region.) If the desired destination image dimensions are different + than the source image dimensions, then TurboJPEG will use scaling in the + JPEG decompressor to generate the largest possible image that will fit + within the desired dimensions. Setting this to 0 is the same as setting + it to the height of the JPEG image (in other words, the height will not be + considered when determining the scaled image size.) This parameter is + ignored if the source image is a YUV image.<DD><CODE>pixelFormat</CODE> - pixel format of the decompressed/decoded image (one of + <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_RGB"><CODE>TJ.PF_*</CODE></A>)<DD><CODE>flags</CODE> - the bitwise OR of one or more of + <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP"><CODE>TJ.FLAG_*</CODE></A> <DT><B>Throws:</B> <DD><CODE>java.lang.Exception</CODE></DL> </DD> @@ -888,7 +1052,8 @@ public byte[] <B>decompress</B>(int desiredWidth, for description<DD><CODE>desiredHeight</CODE> - see <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(byte[], int, int, int, int, int, int, int)"><CODE>decompress(byte[], int, int, int, int, int, int, int)</CODE></A> for description<DD><CODE>pixelFormat</CODE> - pixel format of the decompressed image (one of - <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><CODE>TJ.PF_*</CODE></A>)<DD><CODE>flags</CODE> - the bitwise OR of one or more of <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><CODE>TJ.FLAG_*</CODE></A> + <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_RGB"><CODE>TJ.PF_*</CODE></A>)<DD><CODE>flags</CODE> - the bitwise OR of one or more of + <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP"><CODE>TJ.FLAG_*</CODE></A> <DT><B>Returns:</B><DD>a buffer containing the decompressed image <DT><B>Throws:</B> <DD><CODE>java.lang.Exception</CODE></DL> @@ -896,48 +1061,28 @@ public byte[] <B>decompress</B>(int desiredWidth, </DL> <HR> -<A NAME="decompressToYUV(byte[], int, int, int, int)"><!-- --></A><H3> +<A NAME="decompressToYUV(org.libjpegturbo.turbojpeg.YUVImage, int)"><!-- --></A><H3> decompressToYUV</H3> <PRE> -public void <B>decompressToYUV</B>(byte[] dstBuf, - int desiredWidth, - int pad, - int desiredHeight, +public void <B>decompressToYUV</B>(<A HREF="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</A> dstImage, int flags) throws java.lang.Exception</PRE> <DL> <DD>Decompress the JPEG source image associated with this decompressor - instance and output a YUV planar image to the given destination buffer. - This method performs JPEG decompression but leaves out the color - conversion step, so a planar YUV image is generated instead of an RGB - image. The padding of the planes in this image is the same as in the - images generated by <A HREF="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(byte[], int)"><CODE>TJCompressor.encodeYUV(byte[], int)</CODE></A>. Note - that, if the width or height of the image is not an even multiple of the - MCU block size (see <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#getMCUWidth(int)"><CODE>TJ.getMCUWidth(int)</CODE></A> and <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#getMCUHeight(int)"><CODE>TJ.getMCUHeight(int)</CODE></A>), - then an intermediate buffer copy will be performed within TurboJPEG. - <p> - NOTE: Technically, the JPEG format uses the YCbCr colorspace, but per the - convention of the digital video community, the TurboJPEG API uses "YUV" to - refer to an image format consisting of Y, Cb, and Cr image planes. + instance into a YUV planar image and store it in the given + <code>YUVImage</code> instance. This method performs JPEG decompression + but leaves out the color conversion step, so a planar YUV image is + generated instead of an RGB or grayscale image. This method cannot be + used to decompress JPEG source images with the CMYK or YCCK colorspace. <P> <DD><DL> -<DT><B>Parameters:</B><DD><CODE>dstBuf</CODE> - buffer that will receive the YUV planar image. Use - <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#bufSizeYUV(int, int, int, int)"><CODE>TJ.bufSizeYUV(int, int, int, int)</CODE></A> to determine the appropriate size for this buffer - based on the image width, height, and level of chrominance subsampling.<DD><CODE>desiredWidth</CODE> - desired width (in pixels) of the YUV image. If the - desired image dimensions are different than the dimensions of the JPEG - image being decompressed, then TurboJPEG will use scaling in the JPEG - decompressor to generate the largest possible image that will fit within - the desired dimensions. Setting this to 0 is the same as setting it to - the width of the JPEG image (in other words, the width will not be - considered when determining the scaled image size.)<DD><CODE>pad</CODE> - the width of each line in each plane of the YUV image will be - padded to the nearest multiple of this number of bytes (must be a power of - 2.)<DD><CODE>desiredHeight</CODE> - desired height (in pixels) of the YUV image. If the - desired image dimensions are different than the dimensions of the JPEG - image being decompressed, then TurboJPEG will use scaling in the JPEG - decompressor to generate the largest possible image that will fit within - the desired dimensions. Setting this to 0 is the same as setting it to - the height of the JPEG image (in other words, the height will not be - considered when determining the scaled image size.)<DD><CODE>flags</CODE> - the bitwise OR of one or more of <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><CODE>TJ.FLAG_*</CODE></A> +<DT><B>Parameters:</B><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 + image. The level of subsampling specified in this <code>YUVImage</code> + instance must match that of the JPEG image, and the width and height + specified in the <code>YUVImage</code> instance must match one of the + scaled image sizes that TurboJPEG is capable of generating from the JPEG + source image.<DD><CODE>flags</CODE> - the bitwise OR of one or more of + <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP"><CODE>TJ.FLAG_*</CODE></A> <DT><B>Throws:</B> <DD><CODE>java.lang.Exception</CODE></DL> </DD> @@ -952,8 +1097,7 @@ decompressToYUV</H3> int flags) throws java.lang.Exception</PRE> <DL> -<DD><B>Deprecated.</B> <I>Use <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(byte[], int, int, int, int)"><CODE>decompressToYUV(byte[], int, int, int, int)</CODE></A> - instead.</I> +<DD><B>Deprecated.</B> <I>Use <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(org.libjpegturbo.turbojpeg.YUVImage, int)"><CODE>decompressToYUV(YUVImage, int)</CODE></A> instead.</I> <P> <DD><DL> @@ -966,20 +1110,38 @@ decompressToYUV</H3> <A NAME="decompressToYUV(int, int, int, int)"><!-- --></A><H3> decompressToYUV</H3> <PRE> -public byte[] <B>decompressToYUV</B>(int desiredWidth, - int pad, - int desiredHeight, - int flags) - throws java.lang.Exception</PRE> +public <A HREF="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</A> <B>decompressToYUV</B>(int desiredWidth, + int pad, + int desiredHeight, + int flags) + throws java.lang.Exception</PRE> <DL> <DD>Decompress the JPEG source image associated with this decompressor - instance and return a buffer containing a YUV planar image. See <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(byte[], int, int, int, int)"><CODE>decompressToYUV(byte[], int, int, int, int)</CODE></A> for more detail. + instance into a YUV planar image and return a <code>YUVImage</code> + instance containing the decompressed image. This method performs JPEG + decompression but leaves out the color conversion step, so a planar YUV + image is generated instead of an RGB or grayscale image. This method + cannot be used to decompress JPEG source images with the CMYK or YCCK + colorspace. <P> <DD><DL> -<DT><B>Parameters:</B><DD><CODE>desiredWidth</CODE> - see - <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(byte[], int, int, int, int)"><CODE>decompressToYUV(byte[], int, int, int, int)</CODE></A> for description<DD><CODE>pad</CODE> - see <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(byte[], int, int, int, int)"><CODE>decompressToYUV(byte[], int, int, int, int)</CODE></A> for - description<DD><CODE>desiredHeight</CODE> - see <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(byte[], int, int, int, int)"><CODE>decompressToYUV(byte[], int, int, int, int)</CODE></A> for description<DD><CODE>flags</CODE> - the bitwise OR of one or more of <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><CODE>TJ.FLAG_*</CODE></A> -<DT><B>Returns:</B><DD>a buffer containing a YUV planar image +<DT><B>Parameters:</B><DD><CODE>desiredWidth</CODE> - desired width (in pixels) of the YUV image. If the + desired image dimensions are different than the dimensions of the JPEG + image being decompressed, then TurboJPEG will use scaling in the JPEG + decompressor to generate the largest possible image that will fit within + the desired dimensions. Setting this to 0 is the same as setting it to + the width of the JPEG image (in other words, the width will not be + considered when determining the scaled image size.)<DD><CODE>pad</CODE> - the width of each line in each plane of the YUV image will be + padded to the nearest multiple of this number of bytes (must be a power of + 2.)<DD><CODE>desiredHeight</CODE> - desired height (in pixels) of the YUV image. If the + desired image dimensions are different than the dimensions of the JPEG + image being decompressed, then TurboJPEG will use scaling in the JPEG + decompressor to generate the largest possible image that will fit within + the desired dimensions. Setting this to 0 is the same as setting it to + the height of the JPEG image (in other words, the height will not be + considered when determining the scaled image size.)<DD><CODE>flags</CODE> - the bitwise OR of one or more of + <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP"><CODE>TJ.FLAG_*</CODE></A> +<DT><B>Returns:</B><DD>a YUV planar image <DT><B>Throws:</B> <DD><CODE>java.lang.Exception</CODE></DL> </DD> @@ -1016,40 +1178,52 @@ public void <B>decompress</B>(int[] dstBuf, int flags) throws java.lang.Exception</PRE> <DL> -<DD>Decompress the JPEG source image associated with this decompressor - instance and output a decompressed image to the given destination buffer. +<DD>Decompress the JPEG source image or decode the YUV source image associated + with this decompressor instance and output a grayscale, RGB, or CMYK image + to the given destination buffer. <P> <DD><DL> -<DT><B>Parameters:</B><DD><CODE>dstBuf</CODE> - buffer that will receive the decompressed image. This - buffer should normally be <code>stride * scaledHeight</code> pixels in - size, where <code>scaledHeight</code> can be determined by calling <code> +<DT><B>Parameters:</B><DD><CODE>dstBuf</CODE> - buffer that will receive the decompressed/decoded image. + If the source image is a JPEG image, then this buffer should normally be + <code>stride * scaledHeight</code> pixels in size, where + <code>scaledHeight</code> can be determined by calling <code> scalingFactor.<A HREF="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html#getScaled(int)"><CODE>getScaled</CODE></A>(jpegHeight) - </code> with one of the scaling factors returned from <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#getScalingFactors()"><CODE>TJ.getScalingFactors()</CODE></A> or by calling <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getScaledHeight(int, int)"><CODE>getScaledHeight(int, int)</CODE></A>. However, - the buffer may also be larger than the dimensions of the JPEG image, in - which case the <code>x</code>, <code>y</code>, and <code>stride</code> - parameters can be used to specify the region into which the JPEG image - should be decompressed.<DD><CODE>x</CODE> - x offset (in pixels) of the region into which the JPEG image - should be decompressed, relative to the start of <code>dstBuf</code>.<DD><CODE>y</CODE> - y offset (in pixels) of the region into which the JPEG image - should be decompressed, relative to the start of <code>dstBuf</code>.<DD><CODE>desiredWidth</CODE> - desired width (in pixels) of the decompressed image - (or image region.) If the desired image dimensions are different than the - dimensions of the JPEG image being decompressed, then TurboJPEG will use - scaling in the JPEG decompressor to generate the largest possible image - that will fit within the desired dimensions. Setting this to 0 is the - same as setting it to the width of the JPEG image (in other words, the - width will not be considered when determining the scaled image size.)<DD><CODE>stride</CODE> - pixels per line of the destination image. Normally, this + </code> with one of the scaling factors returned from <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#getScalingFactors()"><CODE>TJ.getScalingFactors()</CODE></A> or by calling <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getScaledHeight(int, int)"><CODE>getScaledHeight(int, int)</CODE></A>. If the + source image is a YUV image, then this buffer should normally be + <code>stride * height</code> pixels in size, where <code>height</code> is + the height of the YUV image. However, the buffer may also be larger than + the dimensions of the JPEG image, in which case the <code>x</code>, + <code>y</code>, and <code>stride</code> parameters can be used to specify + the region into which the source image should be decompressed.<DD><CODE>x</CODE> - x offset (in pixels) of the region in the destination image into + which the source image should be decompressed/decoded<DD><CODE>y</CODE> - y offset (in pixels) of the region in the destination image into + which the source image should be decompressed/decoded<DD><CODE>desiredWidth</CODE> - If the source image is a JPEG image, then this + specifies the desired width (in pixels) of the decompressed image (or + image region.) If the desired destination image dimensions are different + than the source image dimensions, then TurboJPEG will use scaling in the + JPEG decompressor to generate the largest possible image that will fit + within the desired dimensions. Setting this to 0 is the same as setting + it to the width of the JPEG image (in other words, the width will not be + considered when determining the scaled image size.) This parameter is + ignored if the source image is a YUV image.<DD><CODE>stride</CODE> - pixels per line of the destination image. Normally, this should be set to <code>scaledWidth</code>, but you can use this to, for instance, decompress the JPEG image into a region of a larger image. - NOTE: <code>scaledWidth</code> can be determined by calling <code> + NOTE: if the source image is a JPEG image, then <code>scaledWidth</code> + can be determined by calling <code> scalingFactor.<A HREF="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html#getScaled(int)"><CODE>getScaled</CODE></A>(jpegWidth) - </code> or by calling <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getScaledWidth(int, int)"><CODE>getScaledWidth(int, int)</CODE></A>. Setting this parameter to - 0 is the equivalent of setting it to <code>scaledWidth</code>.<DD><CODE>desiredHeight</CODE> - desired height (in pixels) of the decompressed image - (or image region.) If the desired image dimensions are different than the - dimensions of the JPEG image being decompressed, then TurboJPEG will use - scaling in the JPEG decompressor to generate the largest possible image - that will fit within the desired dimensions. Setting this to 0 is the - same as setting it to the height of the JPEG image (in other words, the - height will not be considered when determining the scaled image size.)<DD><CODE>pixelFormat</CODE> - pixel format of the decompressed image (one of - <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><CODE>TJ.PF_*</CODE></A>)<DD><CODE>flags</CODE> - the bitwise OR of one or more of <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><CODE>TJ.FLAG_*</CODE></A> + </code> or by calling <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getScaledWidth(int, int)"><CODE>getScaledWidth(int, int)</CODE></A>. If the source image is a + YUV image, then <code>scaledWidth</code> is the width of the YUV image. + Setting this parameter to 0 is the equivalent of setting it to + <code>scaledWidth</code>.<DD><CODE>desiredHeight</CODE> - If the source image is a JPEG image, then this + specifies the desired height (in pixels) of the decompressed image (or + image region.) If the desired destination image dimensions are different + than the source image dimensions, then TurboJPEG will use scaling in the + JPEG decompressor to generate the largest possible image that will fit + within the desired dimensions. Setting this to 0 is the same as setting + it to the height of the JPEG image (in other words, the height will not be + considered when determining the scaled image size.) This parameter is + ignored if the source image is a YUV image.<DD><CODE>pixelFormat</CODE> - pixel format of the decompressed image (one of + <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_RGB"><CODE>TJ.PF_*</CODE></A>)<DD><CODE>flags</CODE> - the bitwise OR of one or more of + <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP"><CODE>TJ.FLAG_*</CODE></A> <DT><B>Throws:</B> <DD><CODE>java.lang.Exception</CODE></DL> </DD> @@ -1063,13 +1237,19 @@ public void <B>decompress</B>(java.awt.image.BufferedImage dstImage, int flags) throws java.lang.Exception</PRE> <DL> -<DD>Decompress the JPEG source image associated with this decompressor - instance and output a decompressed image to the given - <code>BufferedImage</code> instance. +<DD>Decompress the JPEG source image or decode the YUV source image associated + with this decompressor instance and output a decompressed/decoded image to + the given <code>BufferedImage</code> instance. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>dstImage</CODE> - a <code>BufferedImage</code> instance that will receive - the decompressed image<DD><CODE>flags</CODE> - the bitwise OR of one or more of <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><CODE>TJ.FLAG_*</CODE></A> + the decompressed/decoded image. If the source image is a JPEG image, then + the width and height of the <code>BufferedImage</code> instance must match + one of the scaled image sizes that TurboJPEG is capable of generating from + the JPEG image. If the source image is a YUV image, then the width and + height of the <code>BufferedImage</code> instance must match the width and + height of the YUV image.<DD><CODE>flags</CODE> - the bitwise OR of one or more of + <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP"><CODE>TJ.FLAG_*</CODE></A> <DT><B>Throws:</B> <DD><CODE>java.lang.Exception</CODE></DL> </DD> @@ -1085,20 +1265,21 @@ public java.awt.image.BufferedImage <B>decompress</B>(int desiredWidth, int flags) throws java.lang.Exception</PRE> <DL> -<DD>Decompress the JPEG source image associated with this decompressor - instance and return a <code>BufferedImage</code> instance containing the - decompressed image. +<DD>Decompress the JPEG source image or decode the YUV source image associated + with this decompressor instance and return a <code>BufferedImage</code> + instance containing the decompressed/decoded image. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>desiredWidth</CODE> - see <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(byte[], int, int, int, int, int, int, int)"><CODE>decompress(byte[], int, int, int, int, int, int, int)</CODE></A> for description<DD><CODE>desiredHeight</CODE> - see <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(byte[], int, int, int, int, int, int, int)"><CODE>decompress(byte[], int, int, int, int, int, int, int)</CODE></A> for - description<DD><CODE>bufferedImageType</CODE> - the image type of the newly-created - <code>BufferedImage</code> instance (for instance, - <code>BufferedImage.TYPE_INT_RGB</code>)<DD><CODE>flags</CODE> - the bitwise OR of one or more of <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><CODE>TJ.FLAG_*</CODE></A> + description<DD><CODE>bufferedImageType</CODE> - the image type of the <code>BufferedImage</code> + instance that will be created (for instance, + <code>BufferedImage.TYPE_INT_RGB</code>)<DD><CODE>flags</CODE> - the bitwise OR of one or more of + <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP"><CODE>TJ.FLAG_*</CODE></A> <DT><B>Returns:</B><DD>a <code>BufferedImage</code> instance containing the - decompressed image + decompressed/decoded image <DT><B>Throws:</B> <DD><CODE>java.lang.Exception</CODE></DL> </DD> diff --git a/java/doc/org/libjpegturbo/turbojpeg/TJTransformer.html b/java/doc/org/libjpegturbo/turbojpeg/TJTransformer.html index 0811b51..75fedf7 100644 --- a/java/doc/org/libjpegturbo/turbojpeg/TJTransformer.html +++ b/java/doc/org/libjpegturbo/turbojpeg/TJTransformer.html @@ -52,7 +52,7 @@ function windowTitle() <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg"><B>PREV CLASS</B></A> - NEXT CLASS</FONT></TD> + <A HREF="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html?org/libjpegturbo/turbojpeg/TJTransformer.html" target="_top"><B>FRAMES</B></A> <A HREF="TJTransformer.html" target="_top"><B>NO FRAMES</B></A> @@ -120,7 +120,7 @@ TurboJPEG lossless transformer <TH ALIGN="left"><B>Fields inherited from class org.libjpegturbo.turbojpeg.<A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</A></B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE><A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#handle">handle</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#jpegBuf">jpegBuf</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#jpegBufSize">jpegBufSize</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#jpegColorspace">jpegColorspace</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#jpegHeight">jpegHeight</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#jpegSubsamp">jpegSubsamp</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#jpegWidth">jpegWidth</A></CODE></TD> +<TD><CODE><A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#handle">handle</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#jpegBuf">jpegBuf</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#jpegBufSize">jpegBufSize</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#srcColorspace">srcColorspace</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#srcHeight">srcHeight</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#srcSubsamp">srcSubsamp</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#srcWidth">srcWidth</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#yuvImage">yuvImage</A></CODE></TD> </TR> </TABLE> @@ -143,7 +143,7 @@ TurboJPEG lossless transformer <BR> Create a TurboJPEG lossless transformer instance and associate the JPEG - image stored in <code>jpegImage</code> with the newly-created instance.</TD> + image stored in <code>jpegImage</code> with the newly created instance.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#TJTransformer(byte[], int)">TJTransformer</A></B>(byte[] jpegImage, @@ -152,7 +152,7 @@ TurboJPEG lossless transformer <BR> Create a TurboJPEG lossless transformer instance and associate the JPEG image of length <code>imageSize</code> bytes stored in - <code>jpegImage</code> with the newly-created instance.</TD> + <code>jpegImage</code> with the newly created instance.</TD> </TR> </TABLE> @@ -170,8 +170,8 @@ TurboJPEG lossless transformer <TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#getTransformedSizes()">getTransformedSizes</A></B>()</CODE> <BR> - Returns an array containing the sizes of the transformed JPEG images from - the most recent call to <A HREF="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#transform(byte[][], org.libjpegturbo.turbojpeg.TJTransform[], int)"><CODE>transform()</CODE></A>.</TD> + Returns an array containing the sizes of the transformed JPEG images + generated by the most recent transform operation.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> @@ -203,7 +203,7 @@ TurboJPEG lossless transformer <TH ALIGN="left"><B>Methods inherited from class org.libjpegturbo.turbojpeg.<A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</A></B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE><A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#close()">close</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(java.awt.image.BufferedImage, int)">decompress</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(byte[], int, int, int, int, int)">decompress</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(byte[], int, int, int, int, int, int, int)">decompress</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(int[], int, int, int, int, int, int, int)">decompress</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(int, int, int, int)">decompress</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(int, int, int, int, int)">decompress</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(byte[], int)">decompressToYUV</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(byte[], int, int, int, int)">decompressToYUV</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(int)">decompressToYUV</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(int, int, int, int)">decompressToYUV</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#finalize()">finalize</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getColorspace()">getColorspace</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getHeight()">getHeight</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getJPEGBuf()">getJPEGBuf</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getJPEGSize()">getJPEGSize</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getScaledHeight(int, int)">getScaledHeight</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getScaledWidth(int, int)">getScaledWidth</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getSubsamp()">getSubsamp</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getWidth()">getWidth</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#setJPEGImage(byte[], int)">setJPEGImage</A></CODE></TD> +<TD><CODE><A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#close()">close</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(java.awt.image.BufferedImage, int)">decompress</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(byte[], int, int, int, int, int)">decompress</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(byte[], int, int, int, int, int, int, int)">decompress</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(int[], int, int, int, int, int, int, int)">decompress</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(int, int, int, int)">decompress</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(int, int, int, int, int)">decompress</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(byte[], int)">decompressToYUV</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(int)">decompressToYUV</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(int, int, int, int)">decompressToYUV</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(org.libjpegturbo.turbojpeg.YUVImage, int)">decompressToYUV</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#finalize()">finalize</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getColorspace()">getColorspace</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getHeight()">getHeight</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getJPEGBuf()">getJPEGBuf</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getJPEGSize()">getJPEGSize</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getScaledHeight(int, int)">getScaledHeight</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getScaledWidth(int, int)">getScaledWidth</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getSourceBuf()">getSourceBuf</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getSourceSize()">getSourceSize</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getSubsamp()">getSubsamp</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getWidth()">getWidth</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#setJPEGImage(byte[], int)">setJPEGImage</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#setSourceImage(byte[], int)">setSourceImage</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#setSourceImage(org.libjpegturbo.turbojpeg.YUVImage)">setSourceImage</A></CODE></TD> </TR> </TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> @@ -250,7 +250,7 @@ public <B>TJTransformer</B>(byte[] jpegImage) throws java.lang.Exception</PRE> <DL> <DD>Create a TurboJPEG lossless transformer instance and associate the JPEG - image stored in <code>jpegImage</code> with the newly-created instance. + image stored in <code>jpegImage</code> with the newly created instance. <P> <DL> <DT><B>Parameters:</B><DD><CODE>jpegImage</CODE> - JPEG image buffer (size of the JPEG image is assumed to @@ -269,7 +269,7 @@ public <B>TJTransformer</B>(byte[] jpegImage, <DL> <DD>Create a TurboJPEG lossless transformer instance and associate the JPEG image of length <code>imageSize</code> bytes stored in - <code>jpegImage</code> with the newly-created instance. + <code>jpegImage</code> with the newly created instance. <P> <DL> <DT><B>Parameters:</B><DD><CODE>jpegImage</CODE> - JPEG image buffer<DD><CODE>imageSize</CODE> - size of the JPEG image (in bytes) @@ -313,9 +313,10 @@ public void <B>transform</B>(byte[][] dstBufs, receive a JPEG image that has been transformed using the parameters in <code>transforms[i]</code>. Use <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#bufSize(int, int, int)"><CODE>TJ.bufSize(int, int, int)</CODE></A> to determine the maximum size for each buffer based on the transformed or cropped width and - height.<DD><CODE>transforms</CODE> - an array of <A HREF="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg"><CODE>TJTransform</CODE></A> instances, each of + height and the level of subsampling used in the source image.<DD><CODE>transforms</CODE> - an array of <A HREF="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg"><CODE>TJTransform</CODE></A> instances, each of which specifies the transform parameters and/or cropping region for the - corresponding transformed output image<DD><CODE>flags</CODE> - the bitwise OR of one or more of <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><CODE>TJ.FLAG_*</CODE></A> + corresponding transformed output image<DD><CODE>flags</CODE> - the bitwise OR of one or more of + <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP"><CODE>TJ.FLAG_*</CODE></A> <DT><B>Throws:</B> <DD><CODE>java.lang.Exception</CODE></DL> </DD> @@ -336,7 +337,8 @@ public <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title=" <DD><DL> <DT><B>Parameters:</B><DD><CODE>transforms</CODE> - an array of <A HREF="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg"><CODE>TJTransform</CODE></A> instances, each of which specifies the transform parameters and/or cropping region for the - corresponding transformed output image<DD><CODE>flags</CODE> - the bitwise OR of one or more of <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><CODE>TJ.FLAG_*</CODE></A> + corresponding transformed output image<DD><CODE>flags</CODE> - the bitwise OR of one or more of + <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP"><CODE>TJ.FLAG_*</CODE></A> <DT><B>Returns:</B><DD>an array of <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><CODE>TJDecompressor</CODE></A> instances, each of which has a transformed JPEG image associated with it <DT><B>Throws:</B> @@ -351,13 +353,13 @@ getTransformedSizes</H3> public int[] <B>getTransformedSizes</B>() throws java.lang.Exception</PRE> <DL> -<DD>Returns an array containing the sizes of the transformed JPEG images from - the most recent call to <A HREF="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#transform(byte[][], org.libjpegturbo.turbojpeg.TJTransform[], int)"><CODE>transform()</CODE></A>. +<DD>Returns an array containing the sizes of the transformed JPEG images + generated by the most recent transform operation. <P> <DD><DL> -<DT><B>Returns:</B><DD>an array containing the sizes of the transformed JPEG images from - the most recent call to <A HREF="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#transform(byte[][], org.libjpegturbo.turbojpeg.TJTransform[], int)"><CODE>transform()</CODE></A> +<DT><B>Returns:</B><DD>an array containing the sizes of the transformed JPEG images + generated by the most recent transform operation <DT><B>Throws:</B> <DD><CODE>java.lang.Exception</CODE></DL> </DD> @@ -392,7 +394,7 @@ public int[] <B>getTransformedSizes</B>() <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg"><B>PREV CLASS</B></A> - NEXT CLASS</FONT></TD> + <A HREF="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html?org/libjpegturbo/turbojpeg/TJTransformer.html" target="_top"><B>FRAMES</B></A> <A HREF="TJTransformer.html" target="_top"><B>NO FRAMES</B></A> diff --git a/java/doc/org/libjpegturbo/turbojpeg/package-frame.html b/java/doc/org/libjpegturbo/turbojpeg/package-frame.html index f160418..215bdea 100644 --- a/java/doc/org/libjpegturbo/turbojpeg/package-frame.html +++ b/java/doc/org/libjpegturbo/turbojpeg/package-frame.html @@ -42,7 +42,9 @@ Classes</FONT> <BR> <A HREF="TJTransform.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJTransform</A> <BR> -<A HREF="TJTransformer.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJTransformer</A></FONT></TD> +<A HREF="TJTransformer.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJTransformer</A> +<BR> +<A HREF="YUVImage.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">YUVImage</A></FONT></TD> </TR> </TABLE> diff --git a/java/doc/org/libjpegturbo/turbojpeg/package-summary.html b/java/doc/org/libjpegturbo/turbojpeg/package-summary.html index 505512c..12c047b 100644 --- a/java/doc/org/libjpegturbo/turbojpeg/package-summary.html +++ b/java/doc/org/libjpegturbo/turbojpeg/package-summary.html @@ -122,6 +122,11 @@ Package org.libjpegturbo.turbojpeg <TD WIDTH="15%"><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJTransformer.html" title="class in org.libjpegturbo.turbojpeg">TJTransformer</A></B></TD> <TD>TurboJPEG lossless transformer</TD> </TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD WIDTH="15%"><B><A HREF="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</A></B></TD> +<TD>This class encapsulates a YUV planar image buffer and the metadata + associated with it.</TD> +</TR> </TABLE> diff --git a/java/doc/org/libjpegturbo/turbojpeg/package-tree.html b/java/doc/org/libjpegturbo/turbojpeg/package-tree.html index e13143d..5910278 100644 --- a/java/doc/org/libjpegturbo/turbojpeg/package-tree.html +++ b/java/doc/org/libjpegturbo/turbojpeg/package-tree.html @@ -95,7 +95,7 @@ Class Hierarchy </UL> <LI TYPE="circle">org.libjpegturbo.turbojpeg.<A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><B>TJ</B></A><LI TYPE="circle">org.libjpegturbo.turbojpeg.<A HREF="../../../org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg"><B>TJCompressor</B></A><LI TYPE="circle">org.libjpegturbo.turbojpeg.<A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><B>TJDecompressor</B></A><UL> <LI TYPE="circle">org.libjpegturbo.turbojpeg.<A HREF="../../../org/libjpegturbo/turbojpeg/TJTransformer.html" title="class in org.libjpegturbo.turbojpeg"><B>TJTransformer</B></A></UL> -<LI TYPE="circle">org.libjpegturbo.turbojpeg.<A HREF="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg"><B>TJScalingFactor</B></A></UL> +<LI TYPE="circle">org.libjpegturbo.turbojpeg.<A HREF="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg"><B>TJScalingFactor</B></A><LI TYPE="circle">org.libjpegturbo.turbojpeg.<A HREF="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><B>YUVImage</B></A></UL> </UL> <H2> Interface Hierarchy |