Doc tweaks

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1173 632fc199-4ca6-4c93-a231-07263d6284db
This commit is contained in:
DRC
2014-03-16 18:43:42 +00:00
parent bcb5f02392
commit aa255e2946
7 changed files with 153 additions and 117 deletions

View File

@@ -300,8 +300,8 @@ Method in class org.libjpegturbo.turbojpeg.<A HREF="./org/libjpegturbo/turbojpeg
associated with this decompressor instance.
<DT><A HREF="./org/libjpegturbo/turbojpeg/TJTransformer.html#getTransformedSizes()"><B>getTransformedSizes()</B></A> -
Method in class org.libjpegturbo.turbojpeg.<A HREF="./org/libjpegturbo/turbojpeg/TJTransformer.html" title="class in org.libjpegturbo.turbojpeg">TJTransformer</A>
<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.
<DT><A HREF="./org/libjpegturbo/turbojpeg/TJDecompressor.html#getWidth()"><B>getWidth()</B></A> -
Method in class org.libjpegturbo.turbojpeg.<A HREF="./org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</A>
<DD>Returns the width of the JPEG image associated with this decompressor
@@ -502,7 +502,7 @@ Constructor for class org.libjpegturbo.turbojpeg.<A HREF="./org/libjpegturbo/tur
<DT><A HREF="./org/libjpegturbo/turbojpeg/TJCompressor.html#TJCompressor(byte[], int, int, int, int, int, int)"><B>TJCompressor(byte[], int, int, int, int, int, int)</B></A> -
Constructor for class org.libjpegturbo.turbojpeg.<A HREF="./org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg">TJCompressor</A>
<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.
<DT><A HREF="./org/libjpegturbo/turbojpeg/TJCompressor.html#TJCompressor(byte[], int, int, int, int)"><B>TJCompressor(byte[], int, int, int, int)</B></A> -
Constructor for class org.libjpegturbo.turbojpeg.<A HREF="./org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg">TJCompressor</A>
@@ -514,12 +514,12 @@ Constructor for class org.libjpegturbo.turbojpeg.<A HREF="./org/libjpegturbo/tur
<DT><A HREF="./org/libjpegturbo/turbojpeg/TJDecompressor.html#TJDecompressor(byte[])"><B>TJDecompressor(byte[])</B></A> -
Constructor for class org.libjpegturbo.turbojpeg.<A HREF="./org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</A>
<DD>Create a TurboJPEG decompressor instance and associate the JPEG image
stored in <code>jpegImage</code> with the newly-created instance.
stored in <code>jpegImage</code> with the newly created instance.
<DT><A HREF="./org/libjpegturbo/turbojpeg/TJDecompressor.html#TJDecompressor(byte[], int)"><B>TJDecompressor(byte[], int)</B></A> -
Constructor for class org.libjpegturbo.turbojpeg.<A HREF="./org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</A>
<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.
with the newly created instance.
<DT><A HREF="./org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg"><B>TJScalingFactor</B></A> - Class in <A HREF="./org/libjpegturbo/turbojpeg/package-summary.html">org.libjpegturbo.turbojpeg</A><DD>Fractional scaling factor<DT><A HREF="./org/libjpegturbo/turbojpeg/TJScalingFactor.html#TJScalingFactor(int, int)"><B>TJScalingFactor(int, int)</B></A> -
Constructor for class org.libjpegturbo.turbojpeg.<A HREF="./org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg">TJScalingFactor</A>
<DD>&nbsp;
@@ -538,12 +538,12 @@ Constructor for class org.libjpegturbo.turbojpeg.<A HREF="./org/libjpegturbo/tur
<DT><A HREF="./org/libjpegturbo/turbojpeg/TJTransformer.html#TJTransformer(byte[])"><B>TJTransformer(byte[])</B></A> -
Constructor for class org.libjpegturbo.turbojpeg.<A HREF="./org/libjpegturbo/turbojpeg/TJTransformer.html" title="class in org.libjpegturbo.turbojpeg">TJTransformer</A>
<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.
<DT><A HREF="./org/libjpegturbo/turbojpeg/TJTransformer.html#TJTransformer(byte[], int)"><B>TJTransformer(byte[], int)</B></A> -
Constructor for class org.libjpegturbo.turbojpeg.<A HREF="./org/libjpegturbo/turbojpeg/TJTransformer.html" title="class in org.libjpegturbo.turbojpeg">TJTransformer</A>
<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.
<DT><A HREF="./org/libjpegturbo/turbojpeg/TJTransformer.html#transform(byte[][], org.libjpegturbo.turbojpeg.TJTransform[], int)"><B>transform(byte[][], TJTransform[], int)</B></A> -
Method in class org.libjpegturbo.turbojpeg.<A HREF="./org/libjpegturbo/turbojpeg/TJTransformer.html" title="class in org.libjpegturbo.turbojpeg">TJTransformer</A>
<DD>Losslessly transform the JPEG image associated with this transformer

View File

@@ -141,7 +141,7 @@ TurboJPEG compressor
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>
@@ -354,12 +354,12 @@ public <B>TJCompressor</B>(byte[]&nbsp;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>
@@ -411,19 +411,19 @@ public void <B>setSourceImage</B>(byte[]&nbsp;srcImage,
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>srcImage</CODE> - image buffer containing RGB or grayscale 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
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>
@@ -462,8 +462,9 @@ public void <B>setSubsamp</B>(int&nbsp;newSubsamp)
operations.
<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 operations (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>
@@ -500,7 +501,9 @@ public void <B>compress</B>(byte[]&nbsp;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>
@@ -517,7 +520,8 @@ public byte[] <B>compress</B>(int&nbsp;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>
@@ -541,7 +545,8 @@ public void <B>compress</B>(java.awt.image.BufferedImage&nbsp;srcImage,
<DT><B>Parameters:</B><DD><CODE>srcImage</CODE> - a <code>BufferedImage</code> instance containing RGB or
grayscale pixels to be compressed<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 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#FLAG_BOTTOMUP"><CODE>TJ.FLAG_*</CODE></A>
<DT><B>Throws:</B>
<DD><CODE>java.lang.Exception</CODE></DL>
</DD>
@@ -560,7 +565,8 @@ public byte[] <B>compress</B>(java.awt.image.BufferedImage&nbsp;srcImage,
<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>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>
grayscale pixels to be compressed<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>
@@ -597,7 +603,8 @@ public void <B>encodeYUV</B>(byte[]&nbsp;dstBuf,
<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)"><CODE>TJ.bufSizeYUV(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>
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#FLAG_BOTTOMUP"><CODE>TJ.FLAG_*</CODE></A>
<DT><B>Throws:</B>
<DD><CODE>java.lang.Exception</CODE></DL>
</DD>
@@ -615,7 +622,8 @@ public byte[] <B>encodeYUV</B>(int&nbsp;flags)
<A HREF="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(byte[], int)"><CODE>encodeYUV(byte[], int)</CODE></A> for more detail.
<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 YUV planar image
<DT><B>Throws:</B>
<DD><CODE>java.lang.Exception</CODE></DL>
@@ -639,7 +647,8 @@ public void <B>encodeYUV</B>(java.awt.image.BufferedImage&nbsp;srcImage,
<DT><B>Parameters:</B><DD><CODE>srcImage</CODE> - a <code>BufferedImage</code> instance containing RGB or
grayscale pixels to be encoded<DD><CODE>dstBuf</CODE> - buffer that will receive the YUV planar image. Use
<A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#bufSizeYUV(int, int, int)"><CODE>TJ.bufSizeYUV(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>
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#FLAG_BOTTOMUP"><CODE>TJ.FLAG_*</CODE></A>
<DT><B>Throws:</B>
<DD><CODE>java.lang.Exception</CODE></DL>
</DD>
@@ -659,7 +668,8 @@ public byte[] <B>encodeYUV</B>(java.awt.image.BufferedImage&nbsp;srcImage,
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>srcImage</CODE> - a <code>BufferedImage</code> instance containing RGB or
grayscale pixels to be encoded<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>
grayscale pixels to be encoded<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 YUV planar image
<DT><B>Throws:</B>
<DD><CODE>java.lang.Exception</CODE></DL>

View File

@@ -184,7 +184,7 @@ TurboJPEG decompressor
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a TurboJPEG decompressor instance and associate the JPEG image
stored in <code>jpegImage</code> with the newly-created instance.</TD>
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[]&nbsp;jpegImage,
@@ -193,7 +193,7 @@ TurboJPEG decompressor
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>
with the newly created instance.</TD>
</TR>
</TABLE>
&nbsp;
@@ -513,7 +513,7 @@ public <B>TJDecompressor</B>(byte[]&nbsp;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.
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
@@ -532,7 +532,7 @@ public <B>TJDecompressor</B>(byte[]&nbsp;jpegImage,
<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.
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)
@@ -766,8 +766,9 @@ public void <B>decompress</B>(byte[]&nbsp;dstBuf,
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>
height will not be considered when determining the scaled image size.)<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>
@@ -818,7 +819,8 @@ public byte[] <B>decompress</B>(int&nbsp;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>
@@ -838,10 +840,7 @@ public void <B>decompressToYUV</B>(byte[]&nbsp;dstBuf,
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.
images generated by <A HREF="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(byte[], int)"><CODE>TJCompressor.encodeYUV(byte[], int)</CODE></A>.
<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
@@ -850,7 +849,8 @@ public void <B>decompressToYUV</B>(byte[]&nbsp;dstBuf,
<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)"><CODE>TJ.bufSizeYUV(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>
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#FLAG_BOTTOMUP"><CODE>TJ.FLAG_*</CODE></A>
<DT><B>Throws:</B>
<DD><CODE>java.lang.Exception</CODE></DL>
</DD>
@@ -867,7 +867,8 @@ public byte[] <B>decompressToYUV</B>(int&nbsp;flags)
instance and return a buffer containing a YUV planar image. See <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(byte[], int)"><CODE>decompressToYUV(byte[], int)</CODE></A> for more detail.
<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 YUV planar image
<DT><B>Throws:</B>
<DD><CODE>java.lang.Exception</CODE></DL>
@@ -921,7 +922,8 @@ public void <B>decompress</B>(int[]&nbsp;dstBuf,
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>
<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>
@@ -941,7 +943,10 @@ public void <B>decompress</B>(java.awt.image.BufferedImage&nbsp;dstImage,
<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 image. 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.<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>
@@ -966,9 +971,10 @@ public java.awt.image.BufferedImage <B>decompress</B>(int&nbsp;desiredWidth,
<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
<DT><B>Throws:</B>

View File

@@ -143,7 +143,7 @@ TurboJPEG lossless transformer
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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[]&nbsp;jpegImage,
@@ -152,7 +152,7 @@ TurboJPEG lossless transformer
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>
&nbsp;
@@ -170,8 +170,8 @@ TurboJPEG lossless transformer
<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#getTransformedSizes()">getTransformedSizes</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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">
@@ -250,7 +250,7 @@ public <B>TJTransformer</B>(byte[]&nbsp;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[]&nbsp;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[][]&nbsp;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>

View File

@@ -48,7 +48,7 @@ public class TJCompressor {
/**
* 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.
*
* @param srcImage see {@link #setSourceImage} for description
@@ -64,7 +64,7 @@ public class TJCompressor {
* @param height see {@link #setSourceImage} for description
*
* @param pixelFormat pixel format of the source image (one of
* {@link TJ TJ.PF_*})
* {@link TJ#PF_RGB TJ.PF_*})
*/
public TJCompressor(byte[] srcImage, int x, int y, int width, int pitch,
int height, int pixelFormat) throws Exception {
@@ -85,31 +85,31 @@ public class TJCompressor {
* Associate an uncompressed source image with this compressor instance.
*
* @param srcImage image buffer containing RGB or grayscale pixels to be
* compressed
* compressed or encoded
*
* @param x x offset (in pixels) of the region from which the JPEG image
* should be compressed, relative to the start of <code>srcImage</code>.
* @param x x offset (in pixels) of the region in the source image from which
* the JPEG or YUV image should be compressed/encoded
*
* @param y y offset (in pixels) of the region from which the JPEG image
* should be compressed, relative to the start of <code>srcImage</code>.
* @param y y offset (in pixels) of the region in the source image from which
* the JPEG or YUV image should be compressed/encoded
*
* @param width width (in pixels) of the region in the source image from
* which the JPEG image should be compressed.
* which the JPEG or YUV image should be compressed/encoded
*
* @param pitch 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>.
* 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>.
*
* @param height height (in pixels) of the region in the source image from
* which the JPEG image should be compressed.
* which the JPEG or YUV image should be compressed/encoded
*
* @param pixelFormat pixel format of the source image (one of
* {@link TJ TJ.PF_*})
* {@link TJ#PF_RGB TJ.PF_*})
*/
public void setSourceImage(byte[] srcImage, int x, int y, int width,
int pitch, int height, int pixelFormat)
@@ -146,8 +146,9 @@ public class TJCompressor {
* Set the level of chrominance subsampling for subsequent compress/encode
* operations.
*
* @param newSubsamp the new level of chrominance subsampling (one of
* {@link TJ TJ.SAMP_*})
* @param newSubsamp the level of chrominance subsampling to use in
* subsequent compress/encode operations (one of
* {@link TJ#SAMP_444 TJ.SAMP_*})
*/
public void setSubsamp(int newSubsamp) throws Exception {
if (newSubsamp < 0 || newSubsamp >= TJ.NUMSAMP)
@@ -173,9 +174,11 @@ public class TJCompressor {
*
* @param dstBuf buffer that will receive the JPEG image. Use
* {@link TJ#bufSize} to determine the maximum size for this buffer based on
* the image width, height, and level of chrominance subsampling.
* the source image's width and height and the desired level of chrominance
* subsampling.
*
* @param flags the bitwise OR of one or more of {@link TJ TJ.FLAG_*}
* @param flags the bitwise OR of one or more of
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
*/
public void compress(byte[] dstBuf, int flags) throws Exception {
if (dstBuf == null || flags < 0)
@@ -200,7 +203,8 @@ public class TJCompressor {
* Compress the uncompressed source image associated with this compressor
* instance and return a buffer containing a JPEG image.
*
* @param flags the bitwise OR of one or more of {@link TJ TJ.FLAG_*}
* @param flags the bitwise OR of one or more of
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
*
* @return a buffer containing a JPEG image. The length of this buffer will
* not be equal to the size of the JPEG image. Use {@link
@@ -225,7 +229,8 @@ public class TJCompressor {
* {@link TJ#bufSize} to determine the maximum size for this buffer based on
* the image width, height, and level of chrominance subsampling.
*
* @param flags the bitwise OR of one or more of {@link TJ TJ.FLAG_*}
* @param flags the bitwise OR of one or more of
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
*/
public void compress(BufferedImage srcImage, byte[] dstBuf, int flags)
throws Exception {
@@ -306,7 +311,8 @@ public class TJCompressor {
* @param srcImage a <code>BufferedImage</code> instance containing RGB or
* grayscale pixels to be compressed
*
* @param flags the bitwise OR of one or more of {@link TJ TJ.FLAG_*}
* @param flags the bitwise OR of one or more of
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
*
* @return a buffer containing a JPEG image. The length of this buffer will
* not be equal to the size of the JPEG image. Use {@link
@@ -343,7 +349,8 @@ public class TJCompressor {
* {@link TJ#bufSizeYUV} to determine the appropriate size for this buffer
* based on the image width, height, and level of chrominance subsampling.
*
* @param flags the bitwise OR of one or more of {@link TJ TJ.FLAG_*}
* @param flags the bitwise OR of one or more of
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
*/
public void encodeYUV(byte[] dstBuf, int flags) throws Exception {
if (dstBuf == null || flags < 0)
@@ -362,7 +369,8 @@ public class TJCompressor {
* instance and return a buffer containing a YUV planar image. See
* {@link #encodeYUV(byte[], int)} for more detail.
*
* @param flags the bitwise OR of one or more of {@link TJ TJ.FLAG_*}
* @param flags the bitwise OR of one or more of
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
*
* @return a buffer containing a YUV planar image
*/
@@ -388,7 +396,8 @@ public class TJCompressor {
* {@link TJ#bufSizeYUV} to determine the appropriate size for this buffer
* based on the image width, height, and level of chrominance subsampling.
*
* @param flags the bitwise OR of one or more of {@link TJ TJ.FLAG_*}
* @param flags the bitwise OR of one or more of
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
*/
public void encodeYUV(BufferedImage srcImage, byte[] dstBuf, int flags)
throws Exception {
@@ -457,7 +466,8 @@ public class TJCompressor {
* @param srcImage a <code>BufferedImage</code> instance containing RGB or
* grayscale pixels to be encoded
*
* @param flags the bitwise OR of one or more of {@link TJ TJ.FLAG_*}
* @param flags the bitwise OR of one or more of
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
*
* @return a buffer containing a YUV planar image
*/

View File

@@ -48,7 +48,7 @@ public class TJDecompressor {
/**
* Create a TurboJPEG decompressor instance and associate the JPEG image
* stored in <code>jpegImage</code> with the newly-created instance.
* stored in <code>jpegImage</code> with the newly created instance.
*
* @param jpegImage JPEG image buffer (size of the JPEG image is assumed to
* be the length of the array)
@@ -61,7 +61,7 @@ public class TJDecompressor {
/**
* 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.
* with the newly created instance.
*
* @param jpegImage JPEG image buffer
*
@@ -154,7 +154,6 @@ public class TJDecompressor {
return jpegBufSize;
}
/**
* Returns the width of the largest scaled-down image that the TurboJPEG
* decompressor can generate without exceeding the desired image width and
@@ -287,10 +286,11 @@ public class TJDecompressor {
* 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.)
*
* @param pixelFormat pixel format of the decompressed image (one of
* {@link TJ TJ.PF_*})
* @param pixelFormat pixel format of the decompressed/decoded image (one of
* {@link TJ#PF_RGB TJ.PF_*})
*
* @param flags the bitwise OR of one or more of {@link TJ TJ.FLAG_*}
* @param flags the bitwise OR of one or more of
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
*/
public void decompress(byte[] dstBuf, int x, int y, int desiredWidth,
int pitch, int desiredHeight, int pixelFormat,
@@ -338,9 +338,10 @@ public class TJDecompressor {
* for description
*
* @param pixelFormat pixel format of the decompressed image (one of
* {@link TJ TJ.PF_*})
* {@link TJ#PF_RGB TJ.PF_*})
*
* @param flags the bitwise OR of one or more of {@link TJ TJ.FLAG_*}
* @param flags the bitwise OR of one or more of
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
*
* @return a buffer containing the decompressed image
*/
@@ -365,10 +366,7 @@ public class TJDecompressor {
* 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 {@link TJCompressor#encodeYUV(byte[], int)}. Note
* that, if the width or height of the image is not an even multiple of the
* MCU block size (see {@link TJ#getMCUWidth} and {@link TJ#getMCUHeight}),
* then an intermediate buffer copy will be performed within TurboJPEG.
* images generated by {@link TJCompressor#encodeYUV(byte[], int)}.
* <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
@@ -378,7 +376,8 @@ public class TJDecompressor {
* {@link TJ#bufSizeYUV} to determine the appropriate size for this buffer
* based on the image width, height, and level of chrominance subsampling.
*
* @param flags the bitwise OR of one or more of {@link TJ TJ.FLAG_*}
* @param flags the bitwise OR of one or more of
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
*/
public void decompressToYUV(byte[] dstBuf, int flags) throws Exception {
if (jpegBuf == null)
@@ -394,7 +393,8 @@ public class TJDecompressor {
* instance and return a buffer containing a YUV planar image. See {@link
* #decompressToYUV(byte[], int)} for more detail.
*
* @param flags the bitwise OR of one or more of {@link TJ TJ.FLAG_*}
* @param flags the bitwise OR of one or more of
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
*
* @return a buffer containing a YUV planar image
*/
@@ -456,9 +456,10 @@ public class TJDecompressor {
* height will not be considered when determining the scaled image size.)
*
* @param pixelFormat pixel format of the decompressed image (one of
* {@link TJ TJ.PF_*})
* {@link TJ#PF_RGB TJ.PF_*})
*
* @param flags the bitwise OR of one or more of {@link TJ TJ.FLAG_*}
* @param flags the bitwise OR of one or more of
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
*/
public void decompress(int[] dstBuf, int x, int y, int desiredWidth,
int stride, int desiredHeight, int pixelFormat,
@@ -479,9 +480,13 @@ public class TJDecompressor {
* <code>BufferedImage</code> instance.
*
* @param dstImage a <code>BufferedImage</code> instance that will receive
* the decompressed image
* the decompressed image. 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.
*
* @param flags the bitwise OR of one or more of {@link TJ TJ.FLAG_*}
*
* @param flags the bitwise OR of one or more of
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
*/
public void decompress(BufferedImage dstImage, int flags) throws Exception {
if (dstImage == null || flags < 0)
@@ -491,7 +496,7 @@ public class TJDecompressor {
int scaledWidth = getScaledWidth(desiredWidth, desiredHeight);
int scaledHeight = getScaledHeight(desiredWidth, desiredHeight);
if (scaledWidth != desiredWidth || scaledHeight != desiredHeight)
throw new Exception("BufferedImage dimensions do not match a scaled image size that TurboJPEG is capable of generating.");
throw new Exception("BufferedImage dimensions do not match one of the scaled image sizes that TurboJPEG is capable of generating.");
int pixelFormat; boolean intPixels = false;
if (byteOrder == null)
byteOrder = ByteOrder.nativeOrder();
@@ -562,11 +567,12 @@ public class TJDecompressor {
* {@link #decompress(byte[], int, int, int, int, int, int, int)} for
* description
*
* @param bufferedImageType the image type of the newly-created
* <code>BufferedImage</code> instance (for instance,
* @param bufferedImageType the image type of the <code>BufferedImage</code>
* instance that will be created (for instance,
* <code>BufferedImage.TYPE_INT_RGB</code>)
*
* @param flags the bitwise OR of one or more of {@link TJ TJ.FLAG_*}
* @param flags the bitwise OR of one or more of
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
*
* @return a <code>BufferedImage</code> instance containing the
* decompressed image

View File

@@ -42,7 +42,7 @@ public class TJTransformer extends TJDecompressor {
/**
* 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.
*
* @param jpegImage JPEG image buffer (size of the JPEG image is assumed to
* be the length of the array)
@@ -55,7 +55,7 @@ public class TJTransformer extends TJDecompressor {
/**
* 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.
*
* @param jpegImage JPEG image buffer
*
@@ -84,13 +84,14 @@ public class TJTransformer extends TJDecompressor {
* receive a JPEG image that has been transformed using the parameters in
* <code>transforms[i]</code>. Use {@link TJ#bufSize} to determine the
* maximum size for each buffer based on the transformed or cropped width and
* height.
* height and the level of subsampling used in the source image.
*
* @param transforms an array of {@link TJTransform} instances, each of
* which specifies the transform parameters and/or cropping region for the
* corresponding transformed output image
*
* @param flags the bitwise OR of one or more of {@link TJ TJ.FLAG_*}
* @param flags the bitwise OR of one or more of
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
*/
public void transform(byte[][] dstBufs, TJTransform[] transforms,
int flags) throws Exception {
@@ -112,7 +113,8 @@ public class TJTransformer extends TJDecompressor {
* @return an array of {@link TJDecompressor} instances, each of
* which has a transformed JPEG image associated with it
*
* @param flags the bitwise OR of one or more of {@link TJ TJ.FLAG_*}
* @param flags the bitwise OR of one or more of
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
*/
public TJDecompressor[] transform(TJTransform[] transforms, int flags)
throws Exception {
@@ -135,11 +137,11 @@ public class TJTransformer extends TJDecompressor {
}
/**
* Returns an array containing the sizes of the transformed JPEG images from
* the most recent call to {@link #transform transform()}.
* Returns an array containing the sizes of the transformed JPEG images
* generated by the most recent transform operation.
*
* @return an array containing the sizes of the transformed JPEG images from
* the most recent call to {@link #transform transform()}
* @return an array containing the sizes of the transformed JPEG images
* generated by the most recent transform operation
*/
public int[] getTransformedSizes() throws Exception {
if (transformedSizes == null)