Extend the TurboJPEG Java API to support generating YUV images with arbitrary padding and to support image scaling when decompressing to YUV
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@975 632fc199-4ca6-4c93-a231-07263d6284db
This commit is contained in:
@@ -2,12 +2,12 @@
|
||||
<!--NewPage-->
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<!-- Generated by javadoc (build 1.6.0_43) on Fri Apr 26 20:05:34 CDT 2013 -->
|
||||
<!-- Generated by javadoc (build 1.6.0_43) on Sat Apr 27 20:13:12 CDT 2013 -->
|
||||
<TITLE>
|
||||
TJDecompressor
|
||||
</TITLE>
|
||||
|
||||
<META NAME="date" CONTENT="2013-04-26">
|
||||
<META NAME="date" CONTENT="2013-04-27">
|
||||
|
||||
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
|
||||
|
||||
@@ -304,6 +304,19 @@ TurboJPEG decompressor
|
||||
<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(byte[], int)">decompressToYUV</A></B>(byte[] dstBuf,
|
||||
int flags)</CODE>
|
||||
|
||||
<BR>
|
||||
<B>Deprecated.</B> <I>Use <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(byte[], int, int, int, int)"><CODE>decompressToYUV(byte[], int, int, int, int)</CODE></A>
|
||||
instead.</I></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
<CODE> void</CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(byte[], int, int, int, int)">decompressToYUV</A></B>(byte[] dstBuf,
|
||||
int desiredWidth,
|
||||
int pad,
|
||||
int desiredHeight,
|
||||
int flags)</CODE>
|
||||
|
||||
<BR>
|
||||
Decompress the JPEG source image associated with this decompressor
|
||||
instance and output a YUV planar image to the given destination buffer.</TD>
|
||||
@@ -313,6 +326,17 @@ TurboJPEG decompressor
|
||||
<CODE> byte[]</CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(int)">decompressToYUV</A></B>(int flags)</CODE>
|
||||
|
||||
<BR>
|
||||
<B>Deprecated.</B> <I>Use <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(int, int, int, int)"><CODE>decompressToYUV(int, int, int, int)</CODE></A> instead.</I></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
<CODE> byte[]</CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(int, int, int, int)">decompressToYUV</A></B>(int desiredWidth,
|
||||
int pad,
|
||||
int desiredHeight,
|
||||
int flags)</CODE>
|
||||
|
||||
<BR>
|
||||
Decompress the JPEG source image associated with this decompressor
|
||||
instance and return a buffer containing a YUV planar image.</TD>
|
||||
@@ -779,12 +803,13 @@ public void <B>decompress</B>(byte[] dstBuf,
|
||||
<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)
|
||||
<FONT SIZE="-1">@Deprecated
|
||||
</FONT>public void <B>decompress</B>(byte[] dstBuf,
|
||||
int desiredWidth,
|
||||
int pitch,
|
||||
int desiredHeight,
|
||||
int pixelFormat,
|
||||
int flags)
|
||||
throws java.lang.Exception</PRE>
|
||||
<DL>
|
||||
<DD><B>Deprecated.</B> <I>Use
|
||||
@@ -827,10 +852,13 @@ public byte[] <B>decompress</B>(int desiredWidth,
|
||||
</DL>
|
||||
<HR>
|
||||
|
||||
<A NAME="decompressToYUV(byte[], int)"><!-- --></A><H3>
|
||||
<A NAME="decompressToYUV(byte[], int, int, int, int)"><!-- --></A><H3>
|
||||
decompressToYUV</H3>
|
||||
<PRE>
|
||||
public void <B>decompressToYUV</B>(byte[] dstBuf,
|
||||
int desiredWidth,
|
||||
int pad,
|
||||
int desiredHeight,
|
||||
int flags)
|
||||
throws java.lang.Exception</PRE>
|
||||
<DL>
|
||||
@@ -846,8 +874,64 @@ public void <B>decompressToYUV</B>(byte[] dstBuf,
|
||||
<P>
|
||||
<DD><DL>
|
||||
<DT><B>Parameters:</B><DD><CODE>dstBuf</CODE> - buffer that will receive the YUV planar image. Use
|
||||
<A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#bufSizeYUV(int, int, int)"><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>
|
||||
<A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#bufSizeYUV(int, int, int, int)"><CODE>TJ.bufSizeYUV(int, int, int, int)</CODE></A> to determine the appropriate size for this buffer
|
||||
based on the image width, height, and level of chrominance subsampling.<DD><CODE>desiredWidth</CODE> - desired width (in pixels) of the YUV image. If the
|
||||
desired image dimensions are different than the dimensions of the JPEG
|
||||
image being decompressed, then TurboJPEG will use scaling in the JPEG
|
||||
decompressor to generate the largest possible image that will fit within
|
||||
the desired dimensions. Setting this to 0 is the same as setting it to
|
||||
the width of the JPEG image (in other words, the width will not be
|
||||
considered when determining the scaled image size.)<DD><CODE>pad</CODE> - the width of each line in each plane of the YUV image will be
|
||||
padded to the nearest multiple of this number of bytes (must be a power of
|
||||
2.)<DD><CODE>desiredHeight</CODE> - desired height (in pixels) of the YUV image. If the
|
||||
desired image dimensions are different than the dimensions of the JPEG
|
||||
image being decompressed, then TurboJPEG will use scaling in the JPEG
|
||||
decompressor to generate the largest possible image that will fit within
|
||||
the desired dimensions. Setting this to 0 is the same as setting it to
|
||||
the height of the JPEG image (in other words, the height will not be
|
||||
considered when determining the scaled image size.)<DD><CODE>flags</CODE> - the bitwise OR of one or more of <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><CODE>TJ.FLAG_*</CODE></A>
|
||||
<DT><B>Throws:</B>
|
||||
<DD><CODE>java.lang.Exception</CODE></DL>
|
||||
</DD>
|
||||
</DL>
|
||||
<HR>
|
||||
|
||||
<A NAME="decompressToYUV(byte[], int)"><!-- --></A><H3>
|
||||
decompressToYUV</H3>
|
||||
<PRE>
|
||||
<FONT SIZE="-1">@Deprecated
|
||||
</FONT>public void <B>decompressToYUV</B>(byte[] dstBuf,
|
||||
int flags)
|
||||
throws java.lang.Exception</PRE>
|
||||
<DL>
|
||||
<DD><B>Deprecated.</B> <I>Use <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(byte[], int, int, int, int)"><CODE>decompressToYUV(byte[], int, int, int, int)</CODE></A>
|
||||
instead.</I>
|
||||
<P>
|
||||
<DD><DL>
|
||||
|
||||
<DT><B>Throws:</B>
|
||||
<DD><CODE>java.lang.Exception</CODE></DL>
|
||||
</DD>
|
||||
</DL>
|
||||
<HR>
|
||||
|
||||
<A NAME="decompressToYUV(int, int, int, int)"><!-- --></A><H3>
|
||||
decompressToYUV</H3>
|
||||
<PRE>
|
||||
public byte[] <B>decompressToYUV</B>(int desiredWidth,
|
||||
int pad,
|
||||
int desiredHeight,
|
||||
int flags)
|
||||
throws java.lang.Exception</PRE>
|
||||
<DL>
|
||||
<DD>Decompress the JPEG source image associated with this decompressor
|
||||
instance and return a buffer containing a YUV planar image. See <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(byte[], int, int, int, int)"><CODE>decompressToYUV(byte[], int, int, int, int)</CODE></A> for more detail.
|
||||
<P>
|
||||
<DD><DL>
|
||||
<DT><B>Parameters:</B><DD><CODE>desiredWidth</CODE> - see
|
||||
<A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(byte[], int, int, int, int)"><CODE>decompressToYUV(byte[], int, int, int, int)</CODE></A> for description<DD><CODE>pad</CODE> - see <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(byte[], int, int, int, int)"><CODE>decompressToYUV(byte[], int, int, int, int)</CODE></A> for
|
||||
description<DD><CODE>desiredHeight</CODE> - see <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(byte[], int, int, int, int)"><CODE>decompressToYUV(byte[], int, int, int, int)</CODE></A> for description<DD><CODE>flags</CODE> - the bitwise OR of one or more of <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><CODE>TJ.FLAG_*</CODE></A>
|
||||
<DT><B>Returns:</B><DD>a buffer containing a YUV planar image
|
||||
<DT><B>Throws:</B>
|
||||
<DD><CODE>java.lang.Exception</CODE></DL>
|
||||
</DD>
|
||||
@@ -857,15 +941,14 @@ public void <B>decompressToYUV</B>(byte[] dstBuf,
|
||||
<A NAME="decompressToYUV(int)"><!-- --></A><H3>
|
||||
decompressToYUV</H3>
|
||||
<PRE>
|
||||
public byte[] <B>decompressToYUV</B>(int flags)
|
||||
<FONT SIZE="-1">@Deprecated
|
||||
</FONT>public byte[] <B>decompressToYUV</B>(int flags)
|
||||
throws java.lang.Exception</PRE>
|
||||
<DL>
|
||||
<DD>Decompress the JPEG source image associated with this decompressor
|
||||
instance and return a buffer containing a YUV planar image. See <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(byte[], int)"><CODE>decompressToYUV(byte[], int)</CODE></A> for more detail.
|
||||
<DD><B>Deprecated.</B> <I>Use <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(int, int, int, int)"><CODE>decompressToYUV(int, int, int, int)</CODE></A> instead.</I>
|
||||
<P>
|
||||
<DD><DL>
|
||||
<DT><B>Parameters:</B><DD><CODE>flags</CODE> - the bitwise OR of one or more of <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><CODE>TJ.FLAG_*</CODE></A>
|
||||
<DT><B>Returns:</B><DD>a buffer containing a YUV planar image
|
||||
|
||||
<DT><B>Throws:</B>
|
||||
<DD><CODE>java.lang.Exception</CODE></DL>
|
||||
</DD>
|
||||
|
||||
Reference in New Issue
Block a user