|
|
|
|
@@ -2,12 +2,12 @@
|
|
|
|
|
<!--NewPage-->
|
|
|
|
|
<HTML>
|
|
|
|
|
<HEAD>
|
|
|
|
|
<!-- Generated by javadoc (build 1.6.0_29) on Sun Dec 18 20:09:44 CST 2011 -->
|
|
|
|
|
<!-- Generated by javadoc (build 1.6.0_31) on Wed Jun 06 03:10:33 CDT 2012 -->
|
|
|
|
|
<TITLE>
|
|
|
|
|
TJDecompressor
|
|
|
|
|
</TITLE>
|
|
|
|
|
|
|
|
|
|
<META NAME="date" CONTENT="2011-12-18">
|
|
|
|
|
<META NAME="date" CONTENT="2012-06-06">
|
|
|
|
|
|
|
|
|
|
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
|
|
|
|
|
|
|
|
|
|
@@ -236,6 +236,38 @@ TurboJPEG decompressor
|
|
|
|
|
int pixelFormat,
|
|
|
|
|
int flags)</CODE>
|
|
|
|
|
|
|
|
|
|
<BR>
|
|
|
|
|
Decompress the JPEG source image associated with this decompressor
|
|
|
|
|
instance and output a decompressed image to the given destination buffer.</TD>
|
|
|
|
|
</TR>
|
|
|
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
|
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
|
|
|
<CODE> void</CODE></FONT></TD>
|
|
|
|
|
<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(byte[], int, int, int, int, int, int, int)">decompress</A></B>(byte[] dstBuf,
|
|
|
|
|
int x,
|
|
|
|
|
int y,
|
|
|
|
|
int desiredWidth,
|
|
|
|
|
int pitch,
|
|
|
|
|
int desiredHeight,
|
|
|
|
|
int pixelFormat,
|
|
|
|
|
int flags)</CODE>
|
|
|
|
|
|
|
|
|
|
<BR>
|
|
|
|
|
Decompress the JPEG source image associated with this decompressor
|
|
|
|
|
instance and output a decompressed image to the given destination buffer.</TD>
|
|
|
|
|
</TR>
|
|
|
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
|
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
|
|
|
<CODE> void</CODE></FONT></TD>
|
|
|
|
|
<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(int[], int, int, int, int, int, int, int)">decompress</A></B>(int[] dstBuf,
|
|
|
|
|
int x,
|
|
|
|
|
int y,
|
|
|
|
|
int desiredWidth,
|
|
|
|
|
int stride,
|
|
|
|
|
int desiredHeight,
|
|
|
|
|
int pixelFormat,
|
|
|
|
|
int flags)</CODE>
|
|
|
|
|
|
|
|
|
|
<BR>
|
|
|
|
|
Decompress the JPEG source image associated with this decompressor
|
|
|
|
|
instance and output a decompressed image to the given destination buffer.</TD>
|
|
|
|
|
@@ -688,10 +720,12 @@ public int <B>getScaledHeight</B>(int desiredWidth,
|
|
|
|
|
</DL>
|
|
|
|
|
<HR>
|
|
|
|
|
|
|
|
|
|
<A NAME="decompress(byte[], int, int, int, int, int)"><!-- --></A><H3>
|
|
|
|
|
<A NAME="decompress(byte[], int, int, int, int, int, int, int)"><!-- --></A><H3>
|
|
|
|
|
decompress</H3>
|
|
|
|
|
<PRE>
|
|
|
|
|
public void <B>decompress</B>(byte[] dstBuf,
|
|
|
|
|
int x,
|
|
|
|
|
int y,
|
|
|
|
|
int desiredWidth,
|
|
|
|
|
int pitch,
|
|
|
|
|
int desiredHeight,
|
|
|
|
|
@@ -707,7 +741,13 @@ public void <B>decompress</B>(byte[] dstBuf,
|
|
|
|
|
buffer should normally be <code>pitch * scaledHeight</code> bytes in size,
|
|
|
|
|
where <code>scaledHeight</code> can be determined by calling <code>
|
|
|
|
|
scalingFactor.<A HREF="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html#getScaled(int)"><CODE>getScaled</CODE></A>(jpegHeight)
|
|
|
|
|
</code> with one of the scaling factors returned from <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#getScalingFactors()"><CODE>TJ.getScalingFactors()</CODE></A> or by calling <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getScaledHeight(int, int)"><CODE>getScaledHeight(int, int)</CODE></A>.<DD><CODE>desiredWidth</CODE> - desired width (in pixels) of the decompressed image.
|
|
|
|
|
</code> with one of the scaling factors returned from <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#getScalingFactors()"><CODE>TJ.getScalingFactors()</CODE></A> or by calling <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getScaledHeight(int, int)"><CODE>getScaledHeight(int, int)</CODE></A>. However,
|
|
|
|
|
the buffer may also be larger than the dimensions of the JPEG image, in
|
|
|
|
|
which case the <code>x</code>, <code>y</code>, and <code>pitch</code>
|
|
|
|
|
parameters can be used to specify the region into which the JPEG image
|
|
|
|
|
should be decompressed.<DD><CODE>x</CODE> - x offset (in pixels) of the region into which the JPEG image
|
|
|
|
|
should be decompressed, relative to the start of <code>dstBuf</code>.<DD><CODE>y</CODE> - y offset (in pixels) of the region into which the JPEG image
|
|
|
|
|
should be decompressed, relative to the start of <code>dstBuf</code>.<DD><CODE>desiredWidth</CODE> - desired width (in pixels) of the decompressed image.
|
|
|
|
|
If the desired image dimensions are smaller than the dimensions of the
|
|
|
|
|
JPEG image being decompressed, then TurboJPEG will use scaling in the JPEG
|
|
|
|
|
decompressor to generate the largest possible image that will fit within
|
|
|
|
|
@@ -716,7 +756,8 @@ public void <B>decompress</B>(byte[] dstBuf,
|
|
|
|
|
considered when determining the scaled image size.)<DD><CODE>pitch</CODE> - bytes per line of the destination image. Normally, this
|
|
|
|
|
should be set to <code>scaledWidth * TJ.pixelSize(pixelFormat)</code> if
|
|
|
|
|
the decompressed image is unpadded, but you can use this to, for instance,
|
|
|
|
|
pad each line of the decompressed image to a 4-byte boundary. NOTE:
|
|
|
|
|
pad each line of the decompressed image to a 4-byte boundary or to
|
|
|
|
|
decompress the JPEG image into a region of a larger image. NOTE:
|
|
|
|
|
<code>scaledWidth</code> can be determined by calling <code>
|
|
|
|
|
scalingFactor.<A HREF="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html#getScaled(int)"><CODE>getScaled</CODE></A>(jpegWidth)
|
|
|
|
|
</code> or by calling <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getScaledWidth(int, int)"><CODE>getScaledWidth(int, int)</CODE></A>. Setting this parameter to
|
|
|
|
|
@@ -735,6 +776,37 @@ public void <B>decompress</B>(byte[] dstBuf,
|
|
|
|
|
</DL>
|
|
|
|
|
<HR>
|
|
|
|
|
|
|
|
|
|
<A NAME="decompress(byte[], int, int, int, int, int)"><!-- --></A><H3>
|
|
|
|
|
decompress</H3>
|
|
|
|
|
<PRE>
|
|
|
|
|
public void <B>decompress</B>(byte[] dstBuf,
|
|
|
|
|
int desiredWidth,
|
|
|
|
|
int pitch,
|
|
|
|
|
int desiredHeight,
|
|
|
|
|
int pixelFormat,
|
|
|
|
|
int flags)
|
|
|
|
|
throws java.lang.Exception</PRE>
|
|
|
|
|
<DL>
|
|
|
|
|
<DD>Decompress the JPEG source image associated with this decompressor
|
|
|
|
|
instance and output a decompressed image to the given destination buffer.
|
|
|
|
|
<P>
|
|
|
|
|
<DD><DL>
|
|
|
|
|
<DT><B>Parameters:</B><DD><CODE>dstBuf</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>desiredWidth</CODE> - see
|
|
|
|
|
<A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(byte[], int, int, int, int, int, int, int)"><CODE>decompress(byte[], int, int, int, int, int, int, int)</CODE></A>
|
|
|
|
|
for description<DD><CODE>pitch</CODE> - see
|
|
|
|
|
<A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(byte[], int, int, int, int, int, int, int)"><CODE>decompress(byte[], int, int, int, int, int, int, int)</CODE></A>
|
|
|
|
|
for description<DD><CODE>desiredHeight</CODE> - see
|
|
|
|
|
<A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(byte[], int, int, int, int, int, int, int)"><CODE>decompress(byte[], int, int, int, int, int, int, int)</CODE></A>
|
|
|
|
|
for description<DD><CODE>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>
|
|
|
|
|
<DT><B>Throws:</B>
|
|
|
|
|
<DD><CODE>java.lang.Exception</CODE></DL>
|
|
|
|
|
</DD>
|
|
|
|
|
</DL>
|
|
|
|
|
<HR>
|
|
|
|
|
|
|
|
|
|
<A NAME="decompress(int, int, int, int, int)"><!-- --></A><H3>
|
|
|
|
|
decompress</H3>
|
|
|
|
|
<PRE>
|
|
|
|
|
@@ -750,9 +822,12 @@ public byte[] <B>decompress</B>(int desiredWidth,
|
|
|
|
|
<P>
|
|
|
|
|
<DD><DL>
|
|
|
|
|
<DT><B>Parameters:</B><DD><CODE>desiredWidth</CODE> - see
|
|
|
|
|
<A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(byte[], int, int, int, int, int)"><CODE>decompress(byte[], int, int, int, int, int)</CODE></A> for description<DD><CODE>pitch</CODE> - see
|
|
|
|
|
<A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(byte[], int, int, int, int, int)"><CODE>decompress(byte[], 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)"><CODE>decompress(byte[], 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/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>pitch</CODE> - see
|
|
|
|
|
<A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(byte[], int, int, int, int, int, int, int)"><CODE>decompress(byte[], int, int, int, int, int, int, int)</CODE></A>
|
|
|
|
|
for description<DD><CODE>desiredHeight</CODE> - see
|
|
|
|
|
<A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(byte[], int, int, int, int, int, int, int)"><CODE>decompress(byte[], int, int, int, int, int, int, int)</CODE></A>
|
|
|
|
|
for description<DD><CODE>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>
|
|
|
|
|
<DT><B>Returns:</B><DD>a buffer containing the decompressed image
|
|
|
|
|
<DT><B>Throws:</B>
|
|
|
|
|
@@ -806,6 +881,59 @@ public byte[] <B>decompressToYUV</B>(int flags)
|
|
|
|
|
</DL>
|
|
|
|
|
<HR>
|
|
|
|
|
|
|
|
|
|
<A NAME="decompress(int[], int, int, int, int, int, int, int)"><!-- --></A><H3>
|
|
|
|
|
decompress</H3>
|
|
|
|
|
<PRE>
|
|
|
|
|
public void <B>decompress</B>(int[] dstBuf,
|
|
|
|
|
int x,
|
|
|
|
|
int y,
|
|
|
|
|
int desiredWidth,
|
|
|
|
|
int stride,
|
|
|
|
|
int desiredHeight,
|
|
|
|
|
int pixelFormat,
|
|
|
|
|
int flags)
|
|
|
|
|
throws java.lang.Exception</PRE>
|
|
|
|
|
<DL>
|
|
|
|
|
<DD>Decompress the JPEG source image associated with this decompressor
|
|
|
|
|
instance and output a decompressed image to the given destination buffer.
|
|
|
|
|
<P>
|
|
|
|
|
<DD><DL>
|
|
|
|
|
<DT><B>Parameters:</B><DD><CODE>dstBuf</CODE> - buffer that will receive the decompressed image. This
|
|
|
|
|
buffer should normally be <code>stride * scaledHeight</code> pixels in
|
|
|
|
|
size, where <code>scaledHeight</code> can be determined by calling <code>
|
|
|
|
|
scalingFactor.<A HREF="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html#getScaled(int)"><CODE>getScaled</CODE></A>(jpegHeight)
|
|
|
|
|
</code> with one of the scaling factors returned from <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#getScalingFactors()"><CODE>TJ.getScalingFactors()</CODE></A> or by calling <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getScaledHeight(int, int)"><CODE>getScaledHeight(int, int)</CODE></A>. However,
|
|
|
|
|
the buffer may also be larger than the dimensions of the JPEG image, in
|
|
|
|
|
which case the <code>x</code>, <code>y</code>, and <code>stride</code>
|
|
|
|
|
parameters can be used to specify the region into which the JPEG image
|
|
|
|
|
should be decompressed.<DD><CODE>x</CODE> - x offset (in pixels) of the region into which the JPEG image
|
|
|
|
|
should be decompressed, relative to the start of <code>dstBuf</code>.<DD><CODE>y</CODE> - y offset (in pixels) of the region into which the JPEG image
|
|
|
|
|
should be decompressed, relative to the start of <code>dstBuf</code>.<DD><CODE>desiredWidth</CODE> - desired width (in pixels) of the decompressed image.
|
|
|
|
|
If the desired image dimensions are smaller than the dimensions of the
|
|
|
|
|
JPEG image being decompressed, then TurboJPEG will use scaling in the JPEG
|
|
|
|
|
decompressor to generate the largest possible image that will fit within
|
|
|
|
|
the desired dimensions. Setting this to 0 is the same as setting it to
|
|
|
|
|
the width of the JPEG image (in other words, the width will not be
|
|
|
|
|
considered when determining the scaled image size.)<DD><CODE>stride</CODE> - pixels per line of the destination image. Normally, this
|
|
|
|
|
should be set to <code>scaledWidth</code>, but you can use this to, for
|
|
|
|
|
instance, decompress the JPEG image into a region of a larger image.
|
|
|
|
|
NOTE: <code>scaledWidth</code> can be determined by calling <code>
|
|
|
|
|
scalingFactor.<A HREF="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html#getScaled(int)"><CODE>getScaled</CODE></A>(jpegWidth)
|
|
|
|
|
</code> or by calling <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getScaledWidth(int, int)"><CODE>getScaledWidth(int, int)</CODE></A>. Setting this parameter to
|
|
|
|
|
0 is the equivalent of setting it to <code>scaledWidth</code>.<DD><CODE>desiredHeight</CODE> - desired height (in pixels) of the decompressed image.
|
|
|
|
|
If the desired image dimensions are smaller than the dimensions of the
|
|
|
|
|
JPEG image being decompressed, then TurboJPEG will use scaling in the JPEG
|
|
|
|
|
decompressor to generate the largest possible image that will fit within
|
|
|
|
|
the desired dimensions. Setting this to 0 is the same as setting it to
|
|
|
|
|
the height of the JPEG image (in other words, the height will not be
|
|
|
|
|
considered when determining the scaled image size.)<DD><CODE>pixelFormat</CODE> - pixel format of the decompressed image (one of
|
|
|
|
|
<A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><CODE>TJ.PF_*</CODE></A>)<DD><CODE>flags</CODE> - the bitwise OR of one or more of <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><CODE>TJ.FLAG_*</CODE></A>
|
|
|
|
|
<DT><B>Throws:</B>
|
|
|
|
|
<DD><CODE>java.lang.Exception</CODE></DL>
|
|
|
|
|
</DD>
|
|
|
|
|
</DL>
|
|
|
|
|
<HR>
|
|
|
|
|
|
|
|
|
|
<A NAME="decompress(java.awt.image.BufferedImage, int)"><!-- --></A><H3>
|
|
|
|
|
decompress</H3>
|
|
|
|
|
<PRE>
|
|
|
|
|
@@ -841,8 +969,10 @@ public java.awt.image.BufferedImage <B>decompress</B>(int desiredWidth,
|
|
|
|
|
<P>
|
|
|
|
|
<DD><DL>
|
|
|
|
|
<DT><B>Parameters:</B><DD><CODE>desiredWidth</CODE> - see
|
|
|
|
|
<A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(byte[], int, int, int, int, int)"><CODE>decompress(byte[], 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)"><CODE>decompress(byte[], int, int, int, int, int)</CODE></A> for description<DD><CODE>bufferedImageType</CODE> - the image type of the newly-created
|
|
|
|
|
<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>
|
|
|
|
|
<DT><B>Returns:</B><DD>a <code>BufferedImage</code> instance containing the
|
|
|
|
|
|