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 29c00b45fa
commit e1ed715c47
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. associated with this decompressor instance.
<DT><A HREF="./org/libjpegturbo/turbojpeg/TJTransformer.html#getTransformedSizes()"><B>getTransformedSizes()</B></A> - <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> 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 <DD>Returns an array containing the sizes of the transformed JPEG images
the most recent call to <A HREF="./org/libjpegturbo/turbojpeg/TJTransformer.html#transform(byte[][], org.libjpegturbo.turbojpeg.TJTransform[], int)"><CODE>transform()</CODE></A>. generated by the most recent transform operation.
<DT><A HREF="./org/libjpegturbo/turbojpeg/TJDecompressor.html#getWidth()"><B>getWidth()</B></A> - <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> 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 <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> - <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> 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 <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. instance.
<DT><A HREF="./org/libjpegturbo/turbojpeg/TJCompressor.html#TJCompressor(byte[], int, int, int, int)"><B>TJCompressor(byte[], int, int, int, int)</B></A> - <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> 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> - <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> 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 <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> - <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> 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 <DD>Create a TurboJPEG decompressor instance and associate the JPEG image
of length <code>imageSize</code> bytes stored in <code>jpegImage</code> 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> - <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> Constructor for class org.libjpegturbo.turbojpeg.<A HREF="./org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg">TJScalingFactor</A>
<DD>&nbsp; <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> - <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> 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 <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> - <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> 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 <DD>Create a TurboJPEG lossless transformer instance and associate the JPEG
image of length <code>imageSize</code> bytes stored in 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> - <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> 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 <DD>Losslessly transform the JPEG image associated with this transformer

View File

@@ -141,7 +141,7 @@ TurboJPEG compressor
<BR> <BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a TurboJPEG compressor instance and associate the uncompressed &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> instance.</TD>
</TR> </TR>
</TABLE> </TABLE>
@@ -354,12 +354,12 @@ public <B>TJCompressor</B>(byte[]&nbsp;srcImage,
throws java.lang.Exception</PRE> throws java.lang.Exception</PRE>
<DL> <DL>
<DD>Create a TurboJPEG compressor instance and associate the uncompressed <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. instance.
<P> <P>
<DL> <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 <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> <DT><B>Throws:</B>
<DD><CODE>java.lang.Exception</CODE></DL> <DD><CODE>java.lang.Exception</CODE></DL>
</DL> </DL>
@@ -411,19 +411,19 @@ public void <B>setSourceImage</B>(byte[]&nbsp;srcImage,
<P> <P>
<DD><DL> <DD><DL>
<DT><B>Parameters:</B><DD><CODE>srcImage</CODE> - image buffer containing RGB or grayscale pixels to be <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 compressed or encoded<DD><CODE>x</CODE> - x offset (in pixels) of the region in the source image from which
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 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
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 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 image should be compressed.<DD><CODE>pitch</CODE> - bytes per line of the source image. Normally, this should be 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 <code>width * TJ.pixelSize(pixelFormat)</code> if the source image is
unpadded, but you can use this parameter to, for instance, specify that 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 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 compress/encode a JPEG or YUV image from a region of a larger source
also be clever and use this parameter to skip lines, etc. Setting this image. You can also be clever and use this parameter to skip lines, etc.
parameter to 0 is the equivalent of setting it to <code>width * Setting this parameter to 0 is the equivalent of setting it to
TJ.pixelSize(pixelFormat)</code>.<DD><CODE>height</CODE> - height (in pixels) of the region in the source image from <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 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" 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> <DT><B>Throws:</B>
<DD><CODE>java.lang.Exception</CODE></DL> <DD><CODE>java.lang.Exception</CODE></DL>
</DD> </DD>
@@ -462,8 +462,9 @@ public void <B>setSubsamp</B>(int&nbsp;newSubsamp)
operations. operations.
<P> <P>
<DD><DL> <DD><DL>
<DT><B>Parameters:</B><DD><CODE>newSubsamp</CODE> - the new level of chrominance subsampling (one of <DT><B>Parameters:</B><DD><CODE>newSubsamp</CODE> - the level of chrominance subsampling to use in
<A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><CODE>TJ.SAMP_*</CODE></A>) subsequent compress/encode operations (one of
<A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_444"><CODE>TJ.SAMP_*</CODE></A>)
<DT><B>Throws:</B> <DT><B>Throws:</B>
<DD><CODE>java.lang.Exception</CODE></DL> <DD><CODE>java.lang.Exception</CODE></DL>
</DD> </DD>
@@ -500,7 +501,9 @@ public void <B>compress</B>(byte[]&nbsp;dstBuf,
<DD><DL> <DD><DL>
<DT><B>Parameters:</B><DD><CODE>dstBuf</CODE> - buffer that will receive the JPEG image. Use <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 <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> <DT><B>Throws:</B>
<DD><CODE>java.lang.Exception</CODE></DL> <DD><CODE>java.lang.Exception</CODE></DL>
</DD> </DD>
@@ -517,7 +520,8 @@ public byte[] <B>compress</B>(int&nbsp;flags)
instance and return a buffer containing a JPEG image. instance and return a buffer containing a JPEG image.
<P> <P>
<DD><DL> <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 <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. 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> <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 <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 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 <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> <DT><B>Throws:</B>
<DD><CODE>java.lang.Exception</CODE></DL> <DD><CODE>java.lang.Exception</CODE></DL>
</DD> </DD>
@@ -560,7 +565,8 @@ public byte[] <B>compress</B>(java.awt.image.BufferedImage&nbsp;srcImage,
<P> <P>
<DD><DL> <DD><DL>
<DT><B>Parameters:</B><DD><CODE>srcImage</CODE> - a <code>BufferedImage</code> instance containing RGB or <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 <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. 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> <DT><B>Throws:</B>
@@ -597,7 +603,8 @@ public void <B>encodeYUV</B>(byte[]&nbsp;dstBuf,
<DD><DL> <DD><DL>
<DT><B>Parameters:</B><DD><CODE>dstBuf</CODE> - buffer that will receive the YUV planar image. Use <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 <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> <DT><B>Throws:</B>
<DD><CODE>java.lang.Exception</CODE></DL> <DD><CODE>java.lang.Exception</CODE></DL>
</DD> </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. <A HREF="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(byte[], int)"><CODE>encodeYUV(byte[], int)</CODE></A> for more detail.
<P> <P>
<DD><DL> <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>Returns:</B><DD>a buffer containing a YUV planar image
<DT><B>Throws:</B> <DT><B>Throws:</B>
<DD><CODE>java.lang.Exception</CODE></DL> <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 <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 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 <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> <DT><B>Throws:</B>
<DD><CODE>java.lang.Exception</CODE></DL> <DD><CODE>java.lang.Exception</CODE></DL>
</DD> </DD>
@@ -659,7 +668,8 @@ public byte[] <B>encodeYUV</B>(java.awt.image.BufferedImage&nbsp;srcImage,
<P> <P>
<DD><DL> <DD><DL>
<DT><B>Parameters:</B><DD><CODE>srcImage</CODE> - a <code>BufferedImage</code> instance containing RGB or <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>Returns:</B><DD>a buffer containing a YUV planar image
<DT><B>Throws:</B> <DT><B>Throws:</B>
<DD><CODE>java.lang.Exception</CODE></DL> <DD><CODE>java.lang.Exception</CODE></DL>

View File

@@ -184,7 +184,7 @@ TurboJPEG decompressor
<BR> <BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a TurboJPEG decompressor instance and associate the JPEG image &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>
<TR BGCOLOR="white" CLASS="TableRowColor"> <TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#TJDecompressor(byte[], int)">TJDecompressor</A></B>(byte[]&nbsp;jpegImage, <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> <BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a TurboJPEG decompressor instance and associate the JPEG image &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> of length <code>imageSize</code> bytes stored in <code>jpegImage</code>
with the newly-created instance.</TD> with the newly created instance.</TD>
</TR> </TR>
</TABLE> </TABLE>
&nbsp; &nbsp;
@@ -513,7 +513,7 @@ public <B>TJDecompressor</B>(byte[]&nbsp;jpegImage)
throws java.lang.Exception</PRE> throws java.lang.Exception</PRE>
<DL> <DL>
<DD>Create a TurboJPEG decompressor instance and associate the JPEG image <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> <P>
<DL> <DL>
<DT><B>Parameters:</B><DD><CODE>jpegImage</CODE> - JPEG image buffer (size of the JPEG image is assumed to <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> <DL>
<DD>Create a TurboJPEG decompressor instance and associate the JPEG image <DD>Create a TurboJPEG decompressor instance and associate the JPEG image
of length <code>imageSize</code> bytes stored in <code>jpegImage</code> of length <code>imageSize</code> bytes stored in <code>jpegImage</code>
with the newly-created instance. with the newly created instance.
<P> <P>
<DL> <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>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 scaling in the JPEG decompressor to generate the largest possible image
that will fit within the desired dimensions. Setting this to 0 is the 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 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 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" 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> <DT><B>Throws:</B>
<DD><CODE>java.lang.Exception</CODE></DL> <DD><CODE>java.lang.Exception</CODE></DL>
</DD> </DD>
@@ -818,7 +819,8 @@ public byte[] <B>decompress</B>(int&nbsp;desiredWidth,
for description<DD><CODE>desiredHeight</CODE> - see 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> <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 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>Returns:</B><DD>a buffer containing the decompressed image
<DT><B>Throws:</B> <DT><B>Throws:</B>
<DD><CODE>java.lang.Exception</CODE></DL> <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 This method performs JPEG decompression but leaves out the color
conversion step, so a planar YUV image is generated instead of an RGB 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 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 images generated by <A HREF="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(byte[], int)"><CODE>TJCompressor.encodeYUV(byte[], int)</CODE></A>.
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> <p>
NOTE: Technically, the JPEG format uses the YCbCr colorspace, but per the NOTE: Technically, the JPEG format uses the YCbCr colorspace, but per the
convention of the digital video community, the TurboJPEG API uses "YUV" to 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> <DD><DL>
<DT><B>Parameters:</B><DD><CODE>dstBuf</CODE> - buffer that will receive the YUV planar image. Use <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 <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> <DT><B>Throws:</B>
<DD><CODE>java.lang.Exception</CODE></DL> <DD><CODE>java.lang.Exception</CODE></DL>
</DD> </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. 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> <P>
<DD><DL> <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>Returns:</B><DD>a buffer containing a YUV planar image
<DT><B>Throws:</B> <DT><B>Throws:</B>
<DD><CODE>java.lang.Exception</CODE></DL> <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 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 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 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> <DT><B>Throws:</B>
<DD><CODE>java.lang.Exception</CODE></DL> <DD><CODE>java.lang.Exception</CODE></DL>
</DD> </DD>
@@ -941,7 +943,10 @@ public void <B>decompress</B>(java.awt.image.BufferedImage&nbsp;dstImage,
<P> <P>
<DD><DL> <DD><DL>
<DT><B>Parameters:</B><DD><CODE>dstImage</CODE> - a <code>BufferedImage</code> instance that will receive <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> <DT><B>Throws:</B>
<DD><CODE>java.lang.Exception</CODE></DL> <DD><CODE>java.lang.Exception</CODE></DL>
</DD> </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 <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 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 <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 description<DD><CODE>bufferedImageType</CODE> - the image type of the <code>BufferedImage</code>
<code>BufferedImage</code> instance (for instance, 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" title="class in org.libjpegturbo.turbojpeg"><CODE>TJ.FLAG_*</CODE></A> <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 <DT><B>Returns:</B><DD>a <code>BufferedImage</code> instance containing the
decompressed image decompressed image
<DT><B>Throws:</B> <DT><B>Throws:</B>

View File

@@ -143,7 +143,7 @@ TurboJPEG lossless transformer
<BR> <BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a TurboJPEG lossless transformer instance and associate the JPEG &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>
<TR BGCOLOR="white" CLASS="TableRowColor"> <TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#TJTransformer(byte[], int)">TJTransformer</A></B>(byte[]&nbsp;jpegImage, <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> <BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a TurboJPEG lossless transformer instance and associate the JPEG &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 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> </TR>
</TABLE> </TABLE>
&nbsp; &nbsp;
@@ -170,8 +170,8 @@ TurboJPEG lossless transformer
<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#getTransformedSizes()">getTransformedSizes</A></B>()</CODE> <TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#getTransformedSizes()">getTransformedSizes</A></B>()</CODE>
<BR> <BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an array containing the sizes of the transformed JPEG images from &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an array containing the sizes of the transformed JPEG images
the most recent call to <A HREF="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#transform(byte[][], org.libjpegturbo.turbojpeg.TJTransform[], int)"><CODE>transform()</CODE></A>.</TD> generated by the most recent transform operation.</TD>
</TR> </TR>
<TR BGCOLOR="white" CLASS="TableRowColor"> <TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <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> throws java.lang.Exception</PRE>
<DL> <DL>
<DD>Create a TurboJPEG lossless transformer instance and associate the JPEG <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> <P>
<DL> <DL>
<DT><B>Parameters:</B><DD><CODE>jpegImage</CODE> - JPEG image buffer (size of the JPEG image is assumed to <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> <DL>
<DD>Create a TurboJPEG lossless transformer instance and associate the JPEG <DD>Create a TurboJPEG lossless transformer instance and associate the JPEG
image of length <code>imageSize</code> bytes stored in 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> <P>
<DL> <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>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 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 <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 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 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> <DT><B>Throws:</B>
<DD><CODE>java.lang.Exception</CODE></DL> <DD><CODE>java.lang.Exception</CODE></DL>
</DD> </DD>
@@ -336,7 +337,8 @@ public <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="
<DD><DL> <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 <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 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 <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 which has a transformed JPEG image associated with it
<DT><B>Throws:</B> <DT><B>Throws:</B>
@@ -351,13 +353,13 @@ getTransformedSizes</H3>
public int[] <B>getTransformedSizes</B>() public int[] <B>getTransformedSizes</B>()
throws java.lang.Exception</PRE> throws java.lang.Exception</PRE>
<DL> <DL>
<DD>Returns an array containing the sizes of the transformed JPEG images from <DD>Returns an array containing the sizes of the transformed JPEG images
the most recent call to <A HREF="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#transform(byte[][], org.libjpegturbo.turbojpeg.TJTransform[], int)"><CODE>transform()</CODE></A>. generated by the most recent transform operation.
<P> <P>
<DD><DL> <DD><DL>
<DT><B>Returns:</B><DD>an array containing the sizes of the transformed JPEG images from <DT><B>Returns:</B><DD>an array containing the sizes of the transformed JPEG images
the most recent call to <A HREF="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#transform(byte[][], org.libjpegturbo.turbojpeg.TJTransform[], int)"><CODE>transform()</CODE></A> generated by the most recent transform operation
<DT><B>Throws:</B> <DT><B>Throws:</B>
<DD><CODE>java.lang.Exception</CODE></DL> <DD><CODE>java.lang.Exception</CODE></DL>
</DD> </DD>

View File

@@ -48,7 +48,7 @@ public class TJCompressor {
/** /**
* Create a TurboJPEG compressor instance and associate the uncompressed * 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. * instance.
* *
* @param srcImage see {@link #setSourceImage} for description * @param srcImage see {@link #setSourceImage} for description
@@ -64,7 +64,7 @@ public class TJCompressor {
* @param height see {@link #setSourceImage} for description * @param height see {@link #setSourceImage} for description
* *
* @param pixelFormat pixel format of the source image (one of * @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, public TJCompressor(byte[] srcImage, int x, int y, int width, int pitch,
int height, int pixelFormat) throws Exception { int height, int pixelFormat) throws Exception {
@@ -85,31 +85,31 @@ public class TJCompressor {
* Associate an uncompressed source image with this compressor instance. * Associate an uncompressed source image with this compressor instance.
* *
* @param srcImage image buffer containing RGB or grayscale pixels to be * @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 * @param x x offset (in pixels) of the region in the source image from which
* should be compressed, relative to the start of <code>srcImage</code>. * the JPEG or YUV image should be compressed/encoded
* *
* @param y y offset (in pixels) of the region from which the JPEG image * @param y y offset (in pixels) of the region in the source image from which
* should be compressed, relative to the start of <code>srcImage</code>. * the JPEG or YUV image should be compressed/encoded
* *
* @param width width (in pixels) of the region in the source image from * @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 * @param pitch bytes per line of the source image. Normally, this should be
* <code>width * TJ.pixelSize(pixelFormat)</code> if the source image is * <code>width * TJ.pixelSize(pixelFormat)</code> if the source image is
* unpadded, but you can use this parameter to, for instance, specify that * 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 * 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 * compress/encode a JPEG or YUV image from a region of a larger source
* also be clever and use this parameter to skip lines, etc. Setting this * image. You can also be clever and use this parameter to skip lines, etc.
* parameter to 0 is the equivalent of setting it to <code>width * * Setting this parameter to 0 is the equivalent of setting it to
* TJ.pixelSize(pixelFormat)</code>. * <code>width * TJ.pixelSize(pixelFormat)</code>.
* *
* @param height height (in pixels) of the region in the source image from * @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 * @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, public void setSourceImage(byte[] srcImage, int x, int y, int width,
int pitch, int height, int pixelFormat) int pitch, int height, int pixelFormat)
@@ -146,8 +146,9 @@ public class TJCompressor {
* Set the level of chrominance subsampling for subsequent compress/encode * Set the level of chrominance subsampling for subsequent compress/encode
* operations. * operations.
* *
* @param newSubsamp the new level of chrominance subsampling (one of * @param newSubsamp the level of chrominance subsampling to use in
* {@link TJ TJ.SAMP_*}) * subsequent compress/encode operations (one of
* {@link TJ#SAMP_444 TJ.SAMP_*})
*/ */
public void setSubsamp(int newSubsamp) throws Exception { public void setSubsamp(int newSubsamp) throws Exception {
if (newSubsamp < 0 || newSubsamp >= TJ.NUMSAMP) if (newSubsamp < 0 || newSubsamp >= TJ.NUMSAMP)
@@ -173,9 +174,11 @@ public class TJCompressor {
* *
* @param dstBuf buffer that will receive the JPEG image. Use * @param dstBuf buffer that will receive the JPEG image. Use
* {@link TJ#bufSize} to determine the maximum size for this buffer based on * {@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 { public void compress(byte[] dstBuf, int flags) throws Exception {
if (dstBuf == null || flags < 0) if (dstBuf == null || flags < 0)
@@ -200,7 +203,8 @@ public class TJCompressor {
* Compress the uncompressed source image associated with this compressor * Compress the uncompressed source image associated with this compressor
* instance and return a buffer containing a JPEG image. * 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 * @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 * 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 * {@link TJ#bufSize} to determine the maximum size for this buffer based on
* the image width, height, and level of chrominance subsampling. * 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) public void compress(BufferedImage srcImage, byte[] dstBuf, int flags)
throws Exception { throws Exception {
@@ -306,7 +311,8 @@ public class TJCompressor {
* @param srcImage a <code>BufferedImage</code> instance containing RGB or * @param srcImage a <code>BufferedImage</code> instance containing RGB or
* grayscale pixels to be compressed * 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 * @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 * 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 * {@link TJ#bufSizeYUV} to determine the appropriate size for this buffer
* based on the image width, height, and level of chrominance subsampling. * 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 { public void encodeYUV(byte[] dstBuf, int flags) throws Exception {
if (dstBuf == null || flags < 0) if (dstBuf == null || flags < 0)
@@ -362,7 +369,8 @@ public class TJCompressor {
* instance and return a buffer containing a YUV planar image. See * instance and return a buffer containing a YUV planar image. See
* {@link #encodeYUV(byte[], int)} for more detail. * {@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 * @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 * {@link TJ#bufSizeYUV} to determine the appropriate size for this buffer
* based on the image width, height, and level of chrominance subsampling. * 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) public void encodeYUV(BufferedImage srcImage, byte[] dstBuf, int flags)
throws Exception { throws Exception {
@@ -457,7 +466,8 @@ public class TJCompressor {
* @param srcImage a <code>BufferedImage</code> instance containing RGB or * @param srcImage a <code>BufferedImage</code> instance containing RGB or
* grayscale pixels to be encoded * 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 * @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 * 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 * @param jpegImage JPEG image buffer (size of the JPEG image is assumed to
* be the length of the array) * be the length of the array)
@@ -61,7 +61,7 @@ public class TJDecompressor {
/** /**
* Create a TurboJPEG decompressor instance and associate the JPEG image * Create a TurboJPEG decompressor instance and associate the JPEG image
* of length <code>imageSize</code> bytes stored in <code>jpegImage</code> * 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 * @param jpegImage JPEG image buffer
* *
@@ -154,7 +154,6 @@ public class TJDecompressor {
return jpegBufSize; return jpegBufSize;
} }
/** /**
* Returns the width of the largest scaled-down image that the TurboJPEG * Returns the width of the largest scaled-down image that the TurboJPEG
* decompressor can generate without exceeding the desired image width and * 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 * 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.) * height will not be considered when determining the scaled image size.)
* *
* @param pixelFormat pixel format of the decompressed image (one of * @param pixelFormat pixel format of the decompressed/decoded 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(byte[] dstBuf, int x, int y, int desiredWidth, public void decompress(byte[] dstBuf, int x, int y, int desiredWidth,
int pitch, int desiredHeight, int pixelFormat, int pitch, int desiredHeight, int pixelFormat,
@@ -338,9 +338,10 @@ public class TJDecompressor {
* for description * for description
* *
* @param pixelFormat pixel format of the decompressed image (one of * @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 * @return a buffer containing the decompressed image
*/ */
@@ -365,10 +366,7 @@ public class TJDecompressor {
* This method performs JPEG decompression but leaves out the color * This method performs JPEG decompression but leaves out the color
* conversion step, so a planar YUV image is generated instead of an RGB * 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 * image. The padding of the planes in this image is the same as in the
* images generated by {@link TJCompressor#encodeYUV(byte[], int)}. Note * images generated by {@link TJCompressor#encodeYUV(byte[], int)}.
* 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.
* <p> * <p>
* NOTE: Technically, the JPEG format uses the YCbCr colorspace, but per the * NOTE: Technically, the JPEG format uses the YCbCr colorspace, but per the
* convention of the digital video community, the TurboJPEG API uses "YUV" to * 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 * {@link TJ#bufSizeYUV} to determine the appropriate size for this buffer
* based on the image width, height, and level of chrominance subsampling. * 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 { public void decompressToYUV(byte[] dstBuf, int flags) throws Exception {
if (jpegBuf == null) if (jpegBuf == null)
@@ -394,7 +393,8 @@ public class TJDecompressor {
* instance and return a buffer containing a YUV planar image. See {@link * instance and return a buffer containing a YUV planar image. See {@link
* #decompressToYUV(byte[], int)} for more detail. * #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 * @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.) * height will not be considered when determining the scaled image size.)
* *
* @param pixelFormat pixel format of the decompressed image (one of * @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, public void decompress(int[] dstBuf, int x, int y, int desiredWidth,
int stride, int desiredHeight, int pixelFormat, int stride, int desiredHeight, int pixelFormat,
@@ -479,9 +480,13 @@ public class TJDecompressor {
* <code>BufferedImage</code> instance. * <code>BufferedImage</code> instance.
* *
* @param dstImage a <code>BufferedImage</code> instance that will receive * @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 { public void decompress(BufferedImage dstImage, int flags) throws Exception {
if (dstImage == null || flags < 0) if (dstImage == null || flags < 0)
@@ -491,7 +496,7 @@ public class TJDecompressor {
int scaledWidth = getScaledWidth(desiredWidth, desiredHeight); int scaledWidth = getScaledWidth(desiredWidth, desiredHeight);
int scaledHeight = getScaledHeight(desiredWidth, desiredHeight); int scaledHeight = getScaledHeight(desiredWidth, desiredHeight);
if (scaledWidth != desiredWidth || scaledHeight != 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; int pixelFormat; boolean intPixels = false;
if (byteOrder == null) if (byteOrder == null)
byteOrder = ByteOrder.nativeOrder(); byteOrder = ByteOrder.nativeOrder();
@@ -562,11 +567,12 @@ public class TJDecompressor {
* {@link #decompress(byte[], int, int, int, int, int, int, int)} for * {@link #decompress(byte[], int, int, int, int, int, int, int)} for
* description * description
* *
* @param bufferedImageType the image type of the newly-created * @param bufferedImageType the image type of the <code>BufferedImage</code>
* <code>BufferedImage</code> instance (for instance, * instance that will be created (for instance,
* <code>BufferedImage.TYPE_INT_RGB</code>) * <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 * @return a <code>BufferedImage</code> instance containing the
* decompressed image * decompressed image

View File

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