|
|
|
|
@@ -2,12 +2,12 @@
|
|
|
|
|
<!--NewPage-->
|
|
|
|
|
<HTML>
|
|
|
|
|
<HEAD>
|
|
|
|
|
<!-- Generated by javadoc (build 1.6.0_33) on Fri Jun 29 18:36:27 CDT 2012 -->
|
|
|
|
|
<!-- Generated by javadoc (build 1.6.0_35) on Sun Sep 23 19:56:07 CDT 2012 -->
|
|
|
|
|
<TITLE>
|
|
|
|
|
TJCompressor
|
|
|
|
|
</TITLE>
|
|
|
|
|
|
|
|
|
|
<META NAME="date" CONTENT="2012-06-29">
|
|
|
|
|
<META NAME="date" CONTENT="2012-09-23">
|
|
|
|
|
|
|
|
|
|
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
|
|
|
|
|
|
|
|
|
|
@@ -128,6 +128,20 @@ TurboJPEG compressor
|
|
|
|
|
int height,
|
|
|
|
|
int pixelFormat)</CODE>
|
|
|
|
|
|
|
|
|
|
<BR>
|
|
|
|
|
Create a TurboJPEG compressor instance and associate the uncompressed
|
|
|
|
|
source image stored in <code>srcImage</code> with the newly-created
|
|
|
|
|
instance.</TD>
|
|
|
|
|
</TR>
|
|
|
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
|
|
|
<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#TJCompressor(byte[], int, int, int, int, int, int)">TJCompressor</A></B>(byte[] srcImage,
|
|
|
|
|
int x,
|
|
|
|
|
int y,
|
|
|
|
|
int width,
|
|
|
|
|
int pitch,
|
|
|
|
|
int height,
|
|
|
|
|
int pixelFormat)</CODE>
|
|
|
|
|
|
|
|
|
|
<BR>
|
|
|
|
|
Create a TurboJPEG compressor instance and associate the uncompressed
|
|
|
|
|
source image stored in <code>srcImage</code> with the newly-created
|
|
|
|
|
@@ -265,6 +279,20 @@ TurboJPEG compressor
|
|
|
|
|
int height,
|
|
|
|
|
int pixelFormat)</CODE>
|
|
|
|
|
|
|
|
|
|
<BR>
|
|
|
|
|
Associate an uncompressed source image with this compressor instance.</TD>
|
|
|
|
|
</TR>
|
|
|
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
|
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
|
|
|
<CODE> void</CODE></FONT></TD>
|
|
|
|
|
<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[], int, int, int, int, int, int)">setSourceImage</A></B>(byte[] srcImage,
|
|
|
|
|
int x,
|
|
|
|
|
int y,
|
|
|
|
|
int width,
|
|
|
|
|
int pitch,
|
|
|
|
|
int height,
|
|
|
|
|
int pixelFormat)</CODE>
|
|
|
|
|
|
|
|
|
|
<BR>
|
|
|
|
|
Associate an uncompressed source image with this compressor instance.</TD>
|
|
|
|
|
</TR>
|
|
|
|
|
@@ -330,7 +358,30 @@ public <B>TJCompressor</B>(byte[] srcImage,
|
|
|
|
|
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)"><CODE>setSourceImage(byte[], 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)"><CODE>setSourceImage(byte[], 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)"><CODE>setSourceImage(byte[], 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)"><CODE>setSourceImage(byte[], int, int, int, int)</CODE></A> for description<DD><CODE>pixelFormat</CODE> - see <A HREF="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[], int, int, int, int)"><CODE>setSourceImage(byte[], int, int, int, int)</CODE></A> for description
|
|
|
|
|
<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>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> - 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
|
|
|
|
|
<DT><B>Throws:</B>
|
|
|
|
|
<DD><CODE>java.lang.Exception</CODE></DL>
|
|
|
|
|
</DL>
|
|
|
|
|
<HR>
|
|
|
|
|
|
|
|
|
|
<A NAME="TJCompressor(byte[], int, int, int, int, int, int)"><!-- --></A><H3>
|
|
|
|
|
TJCompressor</H3>
|
|
|
|
|
<PRE>
|
|
|
|
|
public <B>TJCompressor</B>(byte[] srcImage,
|
|
|
|
|
int x,
|
|
|
|
|
int y,
|
|
|
|
|
int width,
|
|
|
|
|
int pitch,
|
|
|
|
|
int height,
|
|
|
|
|
int pixelFormat)
|
|
|
|
|
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
|
|
|
|
|
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> - 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
|
|
|
|
|
<DT><B>Throws:</B>
|
|
|
|
|
<DD><CODE>java.lang.Exception</CODE></DL>
|
|
|
|
|
</DL>
|
|
|
|
|
@@ -345,6 +396,41 @@ public <B>TJCompressor</B>(byte[] srcImage,
|
|
|
|
|
</TR>
|
|
|
|
|
</TABLE>
|
|
|
|
|
|
|
|
|
|
<A NAME="setSourceImage(byte[], int, int, int, int, int, int)"><!-- --></A><H3>
|
|
|
|
|
setSourceImage</H3>
|
|
|
|
|
<PRE>
|
|
|
|
|
public void <B>setSourceImage</B>(byte[] srcImage,
|
|
|
|
|
int x,
|
|
|
|
|
int y,
|
|
|
|
|
int width,
|
|
|
|
|
int pitch,
|
|
|
|
|
int height,
|
|
|
|
|
int pixelFormat)
|
|
|
|
|
throws java.lang.Exception</PRE>
|
|
|
|
|
<DL>
|
|
|
|
|
<DD>Associate an uncompressed source image with this compressor instance.
|
|
|
|
|
<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
|
|
|
|
|
<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>)
|
|
|
|
|
<DT><B>Throws:</B>
|
|
|
|
|
<DD><CODE>java.lang.Exception</CODE></DL>
|
|
|
|
|
</DD>
|
|
|
|
|
</DL>
|
|
|
|
|
<HR>
|
|
|
|
|
|
|
|
|
|
<A NAME="setSourceImage(byte[], int, int, int, int)"><!-- --></A><H3>
|
|
|
|
|
setSourceImage</H3>
|
|
|
|
|
<PRE>
|
|
|
|
|
@@ -358,15 +444,15 @@ public void <B>setSourceImage</B>(byte[] srcImage,
|
|
|
|
|
<DD>Associate an uncompressed source image with this compressor instance.
|
|
|
|
|
<P>
|
|
|
|
|
<DD><DL>
|
|
|
|
|
<DT><B>Parameters:</B><DD><CODE>srcImage</CODE> - image buffer containing RGB or grayscale pixels to be
|
|
|
|
|
compressed<DD><CODE>width</CODE> - width (in pixels) of the source image<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 4-byte boundaries, as is
|
|
|
|
|
the case for Windows bitmaps. 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 source image<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>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>)
|
|
|
|
|
<DT><B>Throws:</B>
|
|
|
|
|
<DD><CODE>java.lang.Exception</CODE></DL>
|
|
|
|
|
|