Refactored YUVImage Java class so that it supports both unified YUV image buffers as well as separate YUV image planes; modified the JNI functions accordingly and added new helper functions to the TurboJPEG C API (tjPlaneWidth(), tjPlaneHeight(), tjPlaneSizeYUV()) to facilitate those modifications; changed potentially confusing "component width" and "component height" terms to "plane width" and "plane height" and modified variable names in turbojpeg.c to reflect this; numerous other documentation tweaks
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1360 632fc199-4ca6-4c93-a231-07263d6284db
This commit is contained in:
@@ -241,6 +241,15 @@ Functions</h2></td></tr>
|
|||||||
<tr class="memitem:gaf451664a62c1f6c7cc5a6401f32908c9"><td class="memItemLeft" align="right" valign="top">DLLEXPORT unsigned long DLLCALL </td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#gaf451664a62c1f6c7cc5a6401f32908c9">tjBufSizeYUV2</a> (int width, int pad, int height, int subsamp)</td></tr>
|
<tr class="memitem:gaf451664a62c1f6c7cc5a6401f32908c9"><td class="memItemLeft" align="right" valign="top">DLLEXPORT unsigned long DLLCALL </td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#gaf451664a62c1f6c7cc5a6401f32908c9">tjBufSizeYUV2</a> (int width, int pad, int height, int subsamp)</td></tr>
|
||||||
<tr class="memdesc:gaf451664a62c1f6c7cc5a6401f32908c9"><td class="mdescLeft"> </td><td class="mdescRight">The size of the buffer (in bytes) required to hold a YUV planar image with the given parameters. <a href="#gaf451664a62c1f6c7cc5a6401f32908c9">More...</a><br/></td></tr>
|
<tr class="memdesc:gaf451664a62c1f6c7cc5a6401f32908c9"><td class="mdescLeft"> </td><td class="mdescRight">The size of the buffer (in bytes) required to hold a YUV planar image with the given parameters. <a href="#gaf451664a62c1f6c7cc5a6401f32908c9">More...</a><br/></td></tr>
|
||||||
<tr class="separator:gaf451664a62c1f6c7cc5a6401f32908c9"><td class="memSeparator" colspan="2"> </td></tr>
|
<tr class="separator:gaf451664a62c1f6c7cc5a6401f32908c9"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
<tr class="memitem:ga6f98d977bfa9d167c97172e876ba61e2"><td class="memItemLeft" align="right" valign="top">DLLEXPORT unsigned long DLLCALL </td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#ga6f98d977bfa9d167c97172e876ba61e2">tjPlaneSizeYUV</a> (int componentID, int width, int stride, int height, int subsamp)</td></tr>
|
||||||
|
<tr class="memdesc:ga6f98d977bfa9d167c97172e876ba61e2"><td class="mdescLeft"> </td><td class="mdescRight">The size of the buffer (in bytes) required to hold a YUV image plane with the given parameters. <a href="#ga6f98d977bfa9d167c97172e876ba61e2">More...</a><br/></td></tr>
|
||||||
|
<tr class="separator:ga6f98d977bfa9d167c97172e876ba61e2"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
<tr class="memitem:ga63fb66bb1e36c74008c4634360becbb1"><td class="memItemLeft" align="right" valign="top">DLLEXPORT int </td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#ga63fb66bb1e36c74008c4634360becbb1">tjPlaneWidth</a> (int componentID, int width, int subsamp)</td></tr>
|
||||||
|
<tr class="memdesc:ga63fb66bb1e36c74008c4634360becbb1"><td class="mdescLeft"> </td><td class="mdescRight">The plane width of a YUV image plane with the given parameters. <a href="#ga63fb66bb1e36c74008c4634360becbb1">More...</a><br/></td></tr>
|
||||||
|
<tr class="separator:ga63fb66bb1e36c74008c4634360becbb1"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
<tr class="memitem:ga1a209696c6a80748f20e134b3c64789f"><td class="memItemLeft" align="right" valign="top">DLLEXPORT int </td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#ga1a209696c6a80748f20e134b3c64789f">tjPlaneHeight</a> (int componentID, int height, int subsamp)</td></tr>
|
||||||
|
<tr class="memdesc:ga1a209696c6a80748f20e134b3c64789f"><td class="mdescLeft"> </td><td class="mdescRight">The plane height of a YUV image plane with the given parameters. <a href="#ga1a209696c6a80748f20e134b3c64789f">More...</a><br/></td></tr>
|
||||||
|
<tr class="separator:ga1a209696c6a80748f20e134b3c64789f"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
<tr class="memitem:ga0a5ffbf7cb58a5b6a8201114fe889360"><td class="memItemLeft" align="right" valign="top">DLLEXPORT int DLLCALL </td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#ga0a5ffbf7cb58a5b6a8201114fe889360">tjEncodeYUV3</a> (<a class="el" href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> handle, unsigned char *srcBuf, int width, int pitch, int height, int pixelFormat, unsigned char *dstBuf, int pad, int subsamp, int flags)</td></tr>
|
<tr class="memitem:ga0a5ffbf7cb58a5b6a8201114fe889360"><td class="memItemLeft" align="right" valign="top">DLLEXPORT int DLLCALL </td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#ga0a5ffbf7cb58a5b6a8201114fe889360">tjEncodeYUV3</a> (<a class="el" href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> handle, unsigned char *srcBuf, int width, int pitch, int height, int pixelFormat, unsigned char *dstBuf, int pad, int subsamp, int flags)</td></tr>
|
||||||
<tr class="memdesc:ga0a5ffbf7cb58a5b6a8201114fe889360"><td class="mdescLeft"> </td><td class="mdescRight">Encode an RGB or grayscale image into a YUV planar image. <a href="#ga0a5ffbf7cb58a5b6a8201114fe889360">More...</a><br/></td></tr>
|
<tr class="memdesc:ga0a5ffbf7cb58a5b6a8201114fe889360"><td class="mdescLeft"> </td><td class="mdescRight">Encode an RGB or grayscale image into a YUV planar image. <a href="#ga0a5ffbf7cb58a5b6a8201114fe889360">More...</a><br/></td></tr>
|
||||||
<tr class="separator:ga0a5ffbf7cb58a5b6a8201114fe889360"><td class="memSeparator" colspan="2"> </td></tr>
|
<tr class="separator:ga0a5ffbf7cb58a5b6a8201114fe889360"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
@@ -317,7 +326,7 @@ Variables</h2></td></tr>
|
|||||||
<p><a class="anchor" id="YUVnotes"></a></p>
|
<p><a class="anchor" id="YUVnotes"></a></p>
|
||||||
<h2>YUV Image Format Notes</h2>
|
<h2>YUV Image Format Notes</h2>
|
||||||
<p>Technically, the JPEG format uses the YCbCr colorspace (which is technically not a colorspace but a color transform), but per the convention of the digital video community, the TurboJPEG API uses "YUV" to refer to an image format consisting of Y, Cb, and Cr image planes.</p>
|
<p>Technically, the JPEG format uses the YCbCr colorspace (which is technically not a colorspace but a color transform), but per the convention of the digital video community, the TurboJPEG API uses "YUV" to refer to an image format consisting of Y, Cb, and Cr image planes.</p>
|
||||||
<p>Each plane is simply a 2D array of bytes, each byte representing the value of one of the components (Y, Cb, or Cr) at a particular location in the image. The "component width" and "component height" of each plane are determined by the image width, height, and level of chrominance subsampling. For the luminance plane, the component width is the image width padded to the nearest multiple of the horizontal subsampling factor (2 in the case of 4:2:0 and 4:2:2, 4 in the case of 4:1:1, 1 in the case of 4:4:4 or grayscale.) Similarly, the component height of the luminance plane is the image height padded to the nearest multiple of the vertical subsampling factor (2 in the case of 4:2:0 or 4:4:0, 1 in the case of 4:4:4 or grayscale.) This is irrespective of any additional padding that may be specified as an argument to the various YUV functions. The component width of the chrominance planes is equal to the component width of the luminance plane divided by the horizontal subsampling factor, and the component height of the chrominance planes is equal to the component height of the luminance plane divided by the vertical subsampling factor.</p>
|
<p>Each plane is simply a 2D array of bytes, each byte representing the value of one of the components (Y, Cb, or Cr) at a particular location in the image. The width and height of each plane are determined by the image width, height, and level of chrominance subsampling. The luminance plane width is the image width padded to the nearest multiple of the horizontal subsampling factor (2 in the case of 4:2:0 and 4:2:2, 4 in the case of 4:1:1, 1 in the case of 4:4:4 or grayscale.) Similarly, the luminance plane height is the image height padded to the nearest multiple of the vertical subsampling factor (2 in the case of 4:2:0 or 4:4:0, 1 in the case of 4:4:4 or grayscale.) This is irrespective of any additional padding that may be specified as an argument to the various YUV functions. The chrominance plane width is equal to the luminance plane width divided by the horizontal subsampling factor, and the chrominance plane height is equal to the luminance plane height divided by the vertical subsampling factor.</p>
|
||||||
<p>For example, if the source image is 35 x 35 pixels and 4:2:2 subsampling is used, then the luminance plane would be 36 x 35 bytes, and each of the chrominance planes would be 18 x 35 bytes. If you specify a line padding of 4 bytes on top of this, then the luminance plane would be 36 x 35 bytes, and each of the chrominance planes would be 20 x 35 bytes. </p>
|
<p>For example, if the source image is 35 x 35 pixels and 4:2:2 subsampling is used, then the luminance plane would be 36 x 35 bytes, and each of the chrominance planes would be 18 x 35 bytes. If you specify a line padding of 4 bytes on top of this, then the luminance plane would be 36 x 35 bytes, and each of the chrominance planes would be 20 x 35 bytes. </p>
|
||||||
<h2 class="groupheader">Macro Definition Documentation</h2>
|
<h2 class="groupheader">Macro Definition Documentation</h2>
|
||||||
<a class="anchor" id="ga39f57a6fb02d9cf32e7b6890099b5a71"></a>
|
<a class="anchor" id="ga39f57a6fb02d9cf32e7b6890099b5a71"></a>
|
||||||
@@ -810,7 +819,7 @@ Variables</h2></td></tr>
|
|||||||
</table>
|
</table>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<dl class="section return"><dt>Returns</dt><dd>a pointer to a newly-allocated buffer with the specified number of bytes</dd></dl>
|
<dl class="section return"><dt>Returns</dt><dd>a pointer to a newly-allocated buffer with the specified number of bytes.</dd></dl>
|
||||||
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="group___turbo_j_p_e_g.html#ga8c4a1231dc06a450514c835f6471f137" title="Free an image buffer previously allocated by TurboJPEG.">tjFree()</a> </dd></dl>
|
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="group___turbo_j_p_e_g.html#ga8c4a1231dc06a450514c835f6471f137" title="Free an image buffer previously allocated by TurboJPEG.">tjFree()</a> </dd></dl>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -849,8 +858,8 @@ Variables</h2></td></tr>
|
|||||||
<p>The number of bytes returned by this function is larger than the size of the uncompressed source image. The reason for this is that the JPEG format uses 16-bit coefficients, and it is thus possible for a very high-quality JPEG image with very high-frequency content to expand rather than compress when converted to the JPEG format. Such images represent a very rare corner case, but since there is no way to predict the size of a JPEG image prior to compression, the corner case has to be handled.</p>
|
<p>The number of bytes returned by this function is larger than the size of the uncompressed source image. The reason for this is that the JPEG format uses 16-bit coefficients, and it is thus possible for a very high-quality JPEG image with very high-frequency content to expand rather than compress when converted to the JPEG format. Such images represent a very rare corner case, but since there is no way to predict the size of a JPEG image prior to compression, the corner case has to be handled.</p>
|
||||||
<dl class="params"><dt>Parameters</dt><dd>
|
<dl class="params"><dt>Parameters</dt><dd>
|
||||||
<table class="params">
|
<table class="params">
|
||||||
<tr><td class="paramname">width</td><td>width of the image (in pixels)</td></tr>
|
<tr><td class="paramname">width</td><td>width (in pixels) of the image</td></tr>
|
||||||
<tr><td class="paramname">height</td><td>height of the image (in pixels)</td></tr>
|
<tr><td class="paramname">height</td><td>height (in pixels) of the image</td></tr>
|
||||||
<tr><td class="paramname">jpegSubsamp</td><td>the level of chrominance subsampling to be used when generating the JPEG image (see <a class="el" href="group___turbo_j_p_e_g.html#ga1d047060ea80bb9820d540bb928e9074">Chrominance subsampling options</a>.)</td></tr>
|
<tr><td class="paramname">jpegSubsamp</td><td>the level of chrominance subsampling to be used when generating the JPEG image (see <a class="el" href="group___turbo_j_p_e_g.html#ga1d047060ea80bb9820d540bb928e9074">Chrominance subsampling options</a>.)</td></tr>
|
||||||
</table>
|
</table>
|
||||||
</dd>
|
</dd>
|
||||||
@@ -898,9 +907,9 @@ Variables</h2></td></tr>
|
|||||||
<p>The size of the buffer (in bytes) required to hold a YUV planar image with the given parameters. </p>
|
<p>The size of the buffer (in bytes) required to hold a YUV planar image with the given parameters. </p>
|
||||||
<dl class="params"><dt>Parameters</dt><dd>
|
<dl class="params"><dt>Parameters</dt><dd>
|
||||||
<table class="params">
|
<table class="params">
|
||||||
<tr><td class="paramname">width</td><td>width of the image (in pixels)</td></tr>
|
<tr><td class="paramname">width</td><td>width (in pixels) of the image</td></tr>
|
||||||
<tr><td class="paramname">pad</td><td>the width of each line in each plane of the image is padded to the nearest multiple of this number of bytes (must be a power of 2.)</td></tr>
|
<tr><td class="paramname">pad</td><td>the width of each line in each plane of the image is padded to the nearest multiple of this number of bytes (must be a power of 2.)</td></tr>
|
||||||
<tr><td class="paramname">height</td><td>height of the image (in pixels)</td></tr>
|
<tr><td class="paramname">height</td><td>height (in pixels) of the image</td></tr>
|
||||||
<tr><td class="paramname">subsamp</td><td>level of chrominance subsampling in the image (see <a class="el" href="group___turbo_j_p_e_g.html#ga1d047060ea80bb9820d540bb928e9074">Chrominance subsampling options</a>.)</td></tr>
|
<tr><td class="paramname">subsamp</td><td>level of chrominance subsampling in the image (see <a class="el" href="group___turbo_j_p_e_g.html#ga1d047060ea80bb9820d540bb928e9074">Chrominance subsampling options</a>.)</td></tr>
|
||||||
</table>
|
</table>
|
||||||
</dd>
|
</dd>
|
||||||
@@ -993,7 +1002,7 @@ Variables</h2></td></tr>
|
|||||||
<tr><td class="paramname">handle</td><td>a handle to a TurboJPEG compressor or transformer instance</td></tr>
|
<tr><td class="paramname">handle</td><td>a handle to a TurboJPEG compressor or transformer instance</td></tr>
|
||||||
<tr><td class="paramname">srcBuf</td><td>pointer to an image buffer containing RGB, grayscale, or CMYK pixels to be compressed</td></tr>
|
<tr><td class="paramname">srcBuf</td><td>pointer to an image buffer containing RGB, grayscale, or CMYK pixels to be compressed</td></tr>
|
||||||
<tr><td class="paramname">width</td><td>width (in pixels) of the source image</td></tr>
|
<tr><td class="paramname">width</td><td>width (in pixels) of the source image</td></tr>
|
||||||
<tr><td class="paramname">pitch</td><td>bytes per line of the source image. Normally, this should be <code>width * <a class="el" href="group___turbo_j_p_e_g.html#gad77cf8fe5b2bfd3cb3f53098146abb4c" title="Pixel size (in bytes) for a given pixel format.">tjPixelSize</a>[pixelFormat]</code> if the image is unpadded, or <code><a class="el" href="group___turbo_j_p_e_g.html#ga0aba955473315e405295d978f0c16511" title="Pad the given width to the nearest 32-bit boundary.">TJPAD</a>(width * <a class="el" href="group___turbo_j_p_e_g.html#gad77cf8fe5b2bfd3cb3f53098146abb4c" title="Pixel size (in bytes) for a given pixel format.">tjPixelSize</a>[pixelFormat])</code> if each line of the image is padded to the nearest 32-bit boundary, 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 * <a class="el" href="group___turbo_j_p_e_g.html#gad77cf8fe5b2bfd3cb3f53098146abb4c" title="Pixel size (in bytes) for a given pixel format.">tjPixelSize</a>[pixelFormat]</code>.</td></tr>
|
<tr><td class="paramname">pitch</td><td>bytes per line in the source image. Normally, this should be <code>width * <a class="el" href="group___turbo_j_p_e_g.html#gad77cf8fe5b2bfd3cb3f53098146abb4c" title="Pixel size (in bytes) for a given pixel format.">tjPixelSize</a>[pixelFormat]</code> if the image is unpadded, or <code><a class="el" href="group___turbo_j_p_e_g.html#ga0aba955473315e405295d978f0c16511" title="Pad the given width to the nearest 32-bit boundary.">TJPAD</a>(width * <a class="el" href="group___turbo_j_p_e_g.html#gad77cf8fe5b2bfd3cb3f53098146abb4c" title="Pixel size (in bytes) for a given pixel format.">tjPixelSize</a>[pixelFormat])</code> if each line of the image is padded to the nearest 32-bit boundary, 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 * <a class="el" href="group___turbo_j_p_e_g.html#gad77cf8fe5b2bfd3cb3f53098146abb4c" title="Pixel size (in bytes) for a given pixel format.">tjPixelSize</a>[pixelFormat]</code>.</td></tr>
|
||||||
<tr><td class="paramname">height</td><td>height (in pixels) of the source image</td></tr>
|
<tr><td class="paramname">height</td><td>height (in pixels) of the source image</td></tr>
|
||||||
<tr><td class="paramname">pixelFormat</td><td>pixel format of the source image (see <a class="el" href="group___turbo_j_p_e_g.html#gac916144e26c3817ac514e64ae5d12e2a">Pixel formats</a>.)</td></tr>
|
<tr><td class="paramname">pixelFormat</td><td>pixel format of the source image (see <a class="el" href="group___turbo_j_p_e_g.html#gac916144e26c3817ac514e64ae5d12e2a">Pixel formats</a>.)</td></tr>
|
||||||
<tr><td class="paramname">jpegBuf</td><td>address of a pointer to an image buffer that will receive the JPEG image. TurboJPEG has the ability to reallocate the JPEG buffer to accommodate the size of the JPEG image. Thus, you can choose to:<ol type="1">
|
<tr><td class="paramname">jpegBuf</td><td>address of a pointer to an image buffer that will receive the JPEG image. TurboJPEG has the ability to reallocate the JPEG buffer to accommodate the size of the JPEG image. Thus, you can choose to:<ol type="1">
|
||||||
@@ -1005,7 +1014,7 @@ If you choose option 1, <code>*jpegSize</code> should be set to the size of your
|
|||||||
<tr><td class="paramname">jpegSize</td><td>pointer to an unsigned long variable that holds the size of the JPEG image buffer. If <code>*jpegBuf</code> points to a pre-allocated buffer, then <code>*jpegSize</code> should be set to the size of the buffer. Upon return, <code>*jpegSize</code> will contain the size of the JPEG image (in bytes.)</td></tr>
|
<tr><td class="paramname">jpegSize</td><td>pointer to an unsigned long variable that holds the size of the JPEG image buffer. If <code>*jpegBuf</code> points to a pre-allocated buffer, then <code>*jpegSize</code> should be set to the size of the buffer. Upon return, <code>*jpegSize</code> will contain the size of the JPEG image (in bytes.)</td></tr>
|
||||||
<tr><td class="paramname">jpegSubsamp</td><td>the level of chrominance subsampling to be used when generating the JPEG image (see <a class="el" href="group___turbo_j_p_e_g.html#ga1d047060ea80bb9820d540bb928e9074">Chrominance subsampling options</a>.)</td></tr>
|
<tr><td class="paramname">jpegSubsamp</td><td>the level of chrominance subsampling to be used when generating the JPEG image (see <a class="el" href="group___turbo_j_p_e_g.html#ga1d047060ea80bb9820d540bb928e9074">Chrominance subsampling options</a>.)</td></tr>
|
||||||
<tr><td class="paramname">jpegQual</td><td>the image quality of the generated JPEG image (1 = worst, 100 = best)</td></tr>
|
<tr><td class="paramname">jpegQual</td><td>the image quality of the generated JPEG image (1 = worst, 100 = best)</td></tr>
|
||||||
<tr><td class="paramname">flags</td><td>the bitwise OR of one or more of the <a class="el" href="group___turbo_j_p_e_g.html#ga72ecf4ebe6eb702d3c6f5ca27455e1ec">flags</a>.</td></tr>
|
<tr><td class="paramname">flags</td><td>the bitwise OR of one or more of the <a class="el" href="group___turbo_j_p_e_g.html#ga72ecf4ebe6eb702d3c6f5ca27455e1ec">flags</a></td></tr>
|
||||||
</table>
|
</table>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
@@ -1102,7 +1111,7 @@ If you choose option 1, <code>*jpegSize</code> should be set to the size of your
|
|||||||
If you choose option 1, <code>*jpegSize</code> should be set to the size of your pre-allocated buffer. In any case, unless you have set <a class="el" href="group___turbo_j_p_e_g.html#ga8808d403c68b62aaa58a4c1e58e98963" title="Disable buffer (re)allocation.">TJFLAG_NOREALLOC</a>, you should always check <code>*jpegBuf</code> upon return from this function, as it may have changed.</td></tr>
|
If you choose option 1, <code>*jpegSize</code> should be set to the size of your pre-allocated buffer. In any case, unless you have set <a class="el" href="group___turbo_j_p_e_g.html#ga8808d403c68b62aaa58a4c1e58e98963" title="Disable buffer (re)allocation.">TJFLAG_NOREALLOC</a>, you should always check <code>*jpegBuf</code> upon return from this function, as it may have changed.</td></tr>
|
||||||
<tr><td class="paramname">jpegSize</td><td>pointer to an unsigned long variable that holds the size of the JPEG image buffer. If <code>*jpegBuf</code> points to a pre-allocated buffer, then <code>*jpegSize</code> should be set to the size of the buffer. Upon return, <code>*jpegSize</code> will contain the size of the JPEG image (in bytes.)</td></tr>
|
<tr><td class="paramname">jpegSize</td><td>pointer to an unsigned long variable that holds the size of the JPEG image buffer. If <code>*jpegBuf</code> points to a pre-allocated buffer, then <code>*jpegSize</code> should be set to the size of the buffer. Upon return, <code>*jpegSize</code> will contain the size of the JPEG image (in bytes.)</td></tr>
|
||||||
<tr><td class="paramname">jpegQual</td><td>the image quality of the generated JPEG image (1 = worst, 100 = best)</td></tr>
|
<tr><td class="paramname">jpegQual</td><td>the image quality of the generated JPEG image (1 = worst, 100 = best)</td></tr>
|
||||||
<tr><td class="paramname">flags</td><td>the bitwise OR of one or more of the <a class="el" href="group___turbo_j_p_e_g.html#ga72ecf4ebe6eb702d3c6f5ca27455e1ec">flags</a>.</td></tr>
|
<tr><td class="paramname">flags</td><td>the bitwise OR of one or more of the <a class="el" href="group___turbo_j_p_e_g.html#ga72ecf4ebe6eb702d3c6f5ca27455e1ec">flags</a></td></tr>
|
||||||
</table>
|
</table>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
@@ -1186,9 +1195,9 @@ If you choose option 1, <code>*jpegSize</code> should be set to the size of your
|
|||||||
<dl class="params"><dt>Parameters</dt><dd>
|
<dl class="params"><dt>Parameters</dt><dd>
|
||||||
<table class="params">
|
<table class="params">
|
||||||
<tr><td class="paramname">handle</td><td>a handle to a TurboJPEG compressor or transformer instance</td></tr>
|
<tr><td class="paramname">handle</td><td>a handle to a TurboJPEG compressor or transformer instance</td></tr>
|
||||||
<tr><td class="paramname">srcPlanes</td><td>an array of pointers to Y, U (Cb), and V (Cr) image planes (or just a Y plane, if compressing a grayscale image) that contain a YUV image to be compressed. These planes can be contiguous or non-contiguous in memory. Each plane should be at least <b><em>{component stride} * {component height}</em></b> bytes in size. (See below for a description of stride, and refer to <a class="el" href="group___turbo_j_p_e_g.html#YUVnotes">YUV Image Format Notes</a> for a description of component height.)</td></tr>
|
<tr><td class="paramname">srcPlanes</td><td>an array of pointers to Y, U (Cb), and V (Cr) image planes (or just a Y plane, if compressing a grayscale image) that contain a YUV image to be compressed. These planes can be contiguous or non-contiguous in memory. The size of each plane should match the value returned by <a class="el" href="group___turbo_j_p_e_g.html#ga6f98d977bfa9d167c97172e876ba61e2" title="The size of the buffer (in bytes) required to hold a YUV image plane with the given parameters...">tjPlaneSizeYUV()</a> for the given image width, height, strides, and level of chrominance subsampling. Refer to <a class="el" href="group___turbo_j_p_e_g.html#YUVnotes">YUV Image Format Notes</a> for more details.</td></tr>
|
||||||
<tr><td class="paramname">width</td><td>width (in pixels) of the source image. If the width is not an even multiple of the MCU block width (see <a class="el" href="group___turbo_j_p_e_g.html#ga9e61e7cd47a15a173283ba94e781308c" title="MCU block width (in pixels) for a given level of chrominance subsampling.">tjMCUWidth</a>), then an intermediate buffer copy will be performed within TurboJPEG.</td></tr>
|
<tr><td class="paramname">width</td><td>width (in pixels) of the source image. If the width is not an even multiple of the MCU block width (see <a class="el" href="group___turbo_j_p_e_g.html#ga9e61e7cd47a15a173283ba94e781308c" title="MCU block width (in pixels) for a given level of chrominance subsampling.">tjMCUWidth</a>), then an intermediate buffer copy will be performed within TurboJPEG.</td></tr>
|
||||||
<tr><td class="paramname">strides</td><td>an array of integers, each specifying the number of bytes per line in the corresponding plane of the YUV source image. Setting the stride for any plane to 0 is the same as setting it to the component width for the plane. If <code>strides</code> is NULL, then the strides for all planes will be set to their respective component widths. You can adjust the strides in order to specify an arbitrary amount of line padding in each plane or to create a JPEG image from a subregion of a larger YUV planar image.</td></tr>
|
<tr><td class="paramname">strides</td><td>an array of integers, each specifying the number of bytes per line in the corresponding plane of the YUV source image. Setting the stride for any plane to 0 is the same as setting it to the plane width (see <a class="el" href="group___turbo_j_p_e_g.html#YUVnotes">YUV Image Format Notes</a>.) If <code>strides</code> is NULL, then the strides for all planes will be set to their respective plane widths. You can adjust the strides in order to specify an arbitrary amount of line padding in each plane or to create a JPEG image from a subregion of a larger YUV planar image.</td></tr>
|
||||||
<tr><td class="paramname">height</td><td>height (in pixels) of the source image. If the height is not an even multiple of the MCU block height (see <a class="el" href="group___turbo_j_p_e_g.html#gabd247bb9fecb393eca57366feb8327bf" title="MCU block height (in pixels) for a given level of chrominance subsampling.">tjMCUHeight</a>), then an intermediate buffer copy will be performed within TurboJPEG.</td></tr>
|
<tr><td class="paramname">height</td><td>height (in pixels) of the source image. If the height is not an even multiple of the MCU block height (see <a class="el" href="group___turbo_j_p_e_g.html#gabd247bb9fecb393eca57366feb8327bf" title="MCU block height (in pixels) for a given level of chrominance subsampling.">tjMCUHeight</a>), then an intermediate buffer copy will be performed within TurboJPEG.</td></tr>
|
||||||
<tr><td class="paramname">subsamp</td><td>the level of chrominance subsampling used in the source image (see <a class="el" href="group___turbo_j_p_e_g.html#ga1d047060ea80bb9820d540bb928e9074">Chrominance subsampling options</a>.)</td></tr>
|
<tr><td class="paramname">subsamp</td><td>the level of chrominance subsampling used in the source image (see <a class="el" href="group___turbo_j_p_e_g.html#ga1d047060ea80bb9820d540bb928e9074">Chrominance subsampling options</a>.)</td></tr>
|
||||||
<tr><td class="paramname">jpegBuf</td><td>address of a pointer to an image buffer that will receive the JPEG image. TurboJPEG has the ability to reallocate the JPEG buffer to accommodate the size of the JPEG image. Thus, you can choose to:<ol type="1">
|
<tr><td class="paramname">jpegBuf</td><td>address of a pointer to an image buffer that will receive the JPEG image. TurboJPEG has the ability to reallocate the JPEG buffer to accommodate the size of the JPEG image. Thus, you can choose to:<ol type="1">
|
||||||
@@ -1199,7 +1208,7 @@ If you choose option 1, <code>*jpegSize</code> should be set to the size of your
|
|||||||
If you choose option 1, <code>*jpegSize</code> should be set to the size of your pre-allocated buffer. In any case, unless you have set <a class="el" href="group___turbo_j_p_e_g.html#ga8808d403c68b62aaa58a4c1e58e98963" title="Disable buffer (re)allocation.">TJFLAG_NOREALLOC</a>, you should always check <code>*jpegBuf</code> upon return from this function, as it may have changed.</td></tr>
|
If you choose option 1, <code>*jpegSize</code> should be set to the size of your pre-allocated buffer. In any case, unless you have set <a class="el" href="group___turbo_j_p_e_g.html#ga8808d403c68b62aaa58a4c1e58e98963" title="Disable buffer (re)allocation.">TJFLAG_NOREALLOC</a>, you should always check <code>*jpegBuf</code> upon return from this function, as it may have changed.</td></tr>
|
||||||
<tr><td class="paramname">jpegSize</td><td>pointer to an unsigned long variable that holds the size of the JPEG image buffer. If <code>*jpegBuf</code> points to a pre-allocated buffer, then <code>*jpegSize</code> should be set to the size of the buffer. Upon return, <code>*jpegSize</code> will contain the size of the JPEG image (in bytes.)</td></tr>
|
<tr><td class="paramname">jpegSize</td><td>pointer to an unsigned long variable that holds the size of the JPEG image buffer. If <code>*jpegBuf</code> points to a pre-allocated buffer, then <code>*jpegSize</code> should be set to the size of the buffer. Upon return, <code>*jpegSize</code> will contain the size of the JPEG image (in bytes.)</td></tr>
|
||||||
<tr><td class="paramname">jpegQual</td><td>the image quality of the generated JPEG image (1 = worst, 100 = best)</td></tr>
|
<tr><td class="paramname">jpegQual</td><td>the image quality of the generated JPEG image (1 = worst, 100 = best)</td></tr>
|
||||||
<tr><td class="paramname">flags</td><td>the bitwise OR of one or more of the <a class="el" href="group___turbo_j_p_e_g.html#ga72ecf4ebe6eb702d3c6f5ca27455e1ec">flags</a>.</td></tr>
|
<tr><td class="paramname">flags</td><td>the bitwise OR of one or more of the <a class="el" href="group___turbo_j_p_e_g.html#ga72ecf4ebe6eb702d3c6f5ca27455e1ec">flags</a></td></tr>
|
||||||
</table>
|
</table>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
@@ -1289,10 +1298,10 @@ If you choose option 1, <code>*jpegSize</code> should be set to the size of your
|
|||||||
<tr><td class="paramname">subsamp</td><td>the level of chrominance subsampling used in the YUV source image (see <a class="el" href="group___turbo_j_p_e_g.html#ga1d047060ea80bb9820d540bb928e9074">Chrominance subsampling options</a>.)</td></tr>
|
<tr><td class="paramname">subsamp</td><td>the level of chrominance subsampling used in the YUV source image (see <a class="el" href="group___turbo_j_p_e_g.html#ga1d047060ea80bb9820d540bb928e9074">Chrominance subsampling options</a>.)</td></tr>
|
||||||
<tr><td class="paramname">dstBuf</td><td>pointer to an image buffer that will receive the decoded image. This buffer should normally be <code>pitch * height</code> bytes in size, but the <code>dstBuf</code> pointer can also be used to decode into a specific region of a larger buffer.</td></tr>
|
<tr><td class="paramname">dstBuf</td><td>pointer to an image buffer that will receive the decoded image. This buffer should normally be <code>pitch * height</code> bytes in size, but the <code>dstBuf</code> pointer can also be used to decode into a specific region of a larger buffer.</td></tr>
|
||||||
<tr><td class="paramname">width</td><td>width (in pixels) of the source and destination images</td></tr>
|
<tr><td class="paramname">width</td><td>width (in pixels) of the source and destination images</td></tr>
|
||||||
<tr><td class="paramname">pitch</td><td>bytes per line of the destination image. Normally, this should be <code>width * <a class="el" href="group___turbo_j_p_e_g.html#gad77cf8fe5b2bfd3cb3f53098146abb4c" title="Pixel size (in bytes) for a given pixel format.">tjPixelSize</a>[pixelFormat]</code> if the destination image is unpadded, or <code><a class="el" href="group___turbo_j_p_e_g.html#ga0aba955473315e405295d978f0c16511" title="Pad the given width to the nearest 32-bit boundary.">TJPAD</a>(width * <a class="el" href="group___turbo_j_p_e_g.html#gad77cf8fe5b2bfd3cb3f53098146abb4c" title="Pixel size (in bytes) for a given pixel format.">tjPixelSize</a>[pixelFormat])</code> if each line of the destination image should be padded to the nearest 32-bit boundary, as is the case for Windows bitmaps. You can also be clever and use the pitch parameter to skip lines, etc. Setting this parameter to 0 is the equivalent of setting it to <code>width * <a class="el" href="group___turbo_j_p_e_g.html#gad77cf8fe5b2bfd3cb3f53098146abb4c" title="Pixel size (in bytes) for a given pixel format.">tjPixelSize</a>[pixelFormat]</code>.</td></tr>
|
<tr><td class="paramname">pitch</td><td>bytes per line in the destination image. Normally, this should be <code>width * <a class="el" href="group___turbo_j_p_e_g.html#gad77cf8fe5b2bfd3cb3f53098146abb4c" title="Pixel size (in bytes) for a given pixel format.">tjPixelSize</a>[pixelFormat]</code> if the destination image is unpadded, or <code><a class="el" href="group___turbo_j_p_e_g.html#ga0aba955473315e405295d978f0c16511" title="Pad the given width to the nearest 32-bit boundary.">TJPAD</a>(width * <a class="el" href="group___turbo_j_p_e_g.html#gad77cf8fe5b2bfd3cb3f53098146abb4c" title="Pixel size (in bytes) for a given pixel format.">tjPixelSize</a>[pixelFormat])</code> if each line of the destination image should be padded to the nearest 32-bit boundary, as is the case for Windows bitmaps. You can also be clever and use the pitch parameter to skip lines, etc. Setting this parameter to 0 is the equivalent of setting it to <code>width * <a class="el" href="group___turbo_j_p_e_g.html#gad77cf8fe5b2bfd3cb3f53098146abb4c" title="Pixel size (in bytes) for a given pixel format.">tjPixelSize</a>[pixelFormat]</code>.</td></tr>
|
||||||
<tr><td class="paramname">height</td><td>height (in pixels) of the source and destination images</td></tr>
|
<tr><td class="paramname">height</td><td>height (in pixels) of the source and destination images</td></tr>
|
||||||
<tr><td class="paramname">pixelFormat</td><td>pixel format of the destination image (see <a class="el" href="group___turbo_j_p_e_g.html#gac916144e26c3817ac514e64ae5d12e2a">Pixel formats</a>.)</td></tr>
|
<tr><td class="paramname">pixelFormat</td><td>pixel format of the destination image (see <a class="el" href="group___turbo_j_p_e_g.html#gac916144e26c3817ac514e64ae5d12e2a">Pixel formats</a>.)</td></tr>
|
||||||
<tr><td class="paramname">flags</td><td>the bitwise OR of one or more of the <a class="el" href="group___turbo_j_p_e_g.html#ga72ecf4ebe6eb702d3c6f5ca27455e1ec">flags</a>.</td></tr>
|
<tr><td class="paramname">flags</td><td>the bitwise OR of one or more of the <a class="el" href="group___turbo_j_p_e_g.html#ga72ecf4ebe6eb702d3c6f5ca27455e1ec">flags</a></td></tr>
|
||||||
</table>
|
</table>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
@@ -1377,15 +1386,15 @@ If you choose option 1, <code>*jpegSize</code> should be set to the size of your
|
|||||||
<dl class="params"><dt>Parameters</dt><dd>
|
<dl class="params"><dt>Parameters</dt><dd>
|
||||||
<table class="params">
|
<table class="params">
|
||||||
<tr><td class="paramname">handle</td><td>a handle to a TurboJPEG decompressor or transformer instance</td></tr>
|
<tr><td class="paramname">handle</td><td>a handle to a TurboJPEG decompressor or transformer instance</td></tr>
|
||||||
<tr><td class="paramname">srcPlanes</td><td>an array of pointers to Y, U (Cb), and V (Cr) image planes (or just a Y plane, if decoding a grayscale image) that contain a YUV image to be decoded. These planes can be contiguous or non-contiguous in memory. Each plane should be at least <b><em>{component stride} * {component height}</em></b> bytes in size. (See below for a description of stride, and refer to <a class="el" href="group___turbo_j_p_e_g.html#YUVnotes">YUV Image Format Notes</a> for a description of component height.)</td></tr>
|
<tr><td class="paramname">srcPlanes</td><td>an array of pointers to Y, U (Cb), and V (Cr) image planes (or just a Y plane, if decoding a grayscale image) that contain a YUV image to be decoded. These planes can be contiguous or non-contiguous in memory. The size of each plane should match the value returned by <a class="el" href="group___turbo_j_p_e_g.html#ga6f98d977bfa9d167c97172e876ba61e2" title="The size of the buffer (in bytes) required to hold a YUV image plane with the given parameters...">tjPlaneSizeYUV()</a> for the given image width, height, strides, and level of chrominance subsampling. Refer to <a class="el" href="group___turbo_j_p_e_g.html#YUVnotes">YUV Image Format Notes</a> for more details.</td></tr>
|
||||||
<tr><td class="paramname">strides</td><td>an array of integers, each specifying the number of bytes per line in the corresponding plane of the YUV source image. Setting the stride for any plane to 0 is the same as setting it to the component width for the plane. If <code>strides</code> is NULL, then the strides for all planes will be set to their respective component widths. You can adjust the strides in order to specify an arbitrary amount of line padding in each plane or to decode a subregion of a larger YUV planar image.</td></tr>
|
<tr><td class="paramname">strides</td><td>an array of integers, each specifying the number of bytes per line in the corresponding plane of the YUV source image. Setting the stride for any plane to 0 is the same as setting it to the plane width (see <a class="el" href="group___turbo_j_p_e_g.html#YUVnotes">YUV Image Format Notes</a>.) If <code>strides</code> is NULL, then the strides for all planes will be set to their respective plane widths. You can adjust the strides in order to specify an arbitrary amount of line padding in each plane or to decode a subregion of a larger YUV planar image.</td></tr>
|
||||||
<tr><td class="paramname">subsamp</td><td>the level of chrominance subsampling used in the YUV source image (see <a class="el" href="group___turbo_j_p_e_g.html#ga1d047060ea80bb9820d540bb928e9074">Chrominance subsampling options</a>.)</td></tr>
|
<tr><td class="paramname">subsamp</td><td>the level of chrominance subsampling used in the YUV source image (see <a class="el" href="group___turbo_j_p_e_g.html#ga1d047060ea80bb9820d540bb928e9074">Chrominance subsampling options</a>.)</td></tr>
|
||||||
<tr><td class="paramname">dstBuf</td><td>pointer to an image buffer that will receive the decoded image. This buffer should normally be <code>pitch * height</code> bytes in size, but the <code>dstBuf</code> pointer can also be used to decode into a specific region of a larger buffer.</td></tr>
|
<tr><td class="paramname">dstBuf</td><td>pointer to an image buffer that will receive the decoded image. This buffer should normally be <code>pitch * height</code> bytes in size, but the <code>dstBuf</code> pointer can also be used to decode into a specific region of a larger buffer.</td></tr>
|
||||||
<tr><td class="paramname">width</td><td>width (in pixels) of the source and destination images</td></tr>
|
<tr><td class="paramname">width</td><td>width (in pixels) of the source and destination images</td></tr>
|
||||||
<tr><td class="paramname">pitch</td><td>bytes per line of the destination image. Normally, this should be <code>width * <a class="el" href="group___turbo_j_p_e_g.html#gad77cf8fe5b2bfd3cb3f53098146abb4c" title="Pixel size (in bytes) for a given pixel format.">tjPixelSize</a>[pixelFormat]</code> if the destination image is unpadded, or <code><a class="el" href="group___turbo_j_p_e_g.html#ga0aba955473315e405295d978f0c16511" title="Pad the given width to the nearest 32-bit boundary.">TJPAD</a>(width * <a class="el" href="group___turbo_j_p_e_g.html#gad77cf8fe5b2bfd3cb3f53098146abb4c" title="Pixel size (in bytes) for a given pixel format.">tjPixelSize</a>[pixelFormat])</code> if each line of the destination image should be padded to the nearest 32-bit boundary, as is the case for Windows bitmaps. You can also be clever and use the pitch parameter to skip lines, etc. Setting this parameter to 0 is the equivalent of setting it to <code>width * <a class="el" href="group___turbo_j_p_e_g.html#gad77cf8fe5b2bfd3cb3f53098146abb4c" title="Pixel size (in bytes) for a given pixel format.">tjPixelSize</a>[pixelFormat]</code>.</td></tr>
|
<tr><td class="paramname">pitch</td><td>bytes per line in the destination image. Normally, this should be <code>width * <a class="el" href="group___turbo_j_p_e_g.html#gad77cf8fe5b2bfd3cb3f53098146abb4c" title="Pixel size (in bytes) for a given pixel format.">tjPixelSize</a>[pixelFormat]</code> if the destination image is unpadded, or <code><a class="el" href="group___turbo_j_p_e_g.html#ga0aba955473315e405295d978f0c16511" title="Pad the given width to the nearest 32-bit boundary.">TJPAD</a>(width * <a class="el" href="group___turbo_j_p_e_g.html#gad77cf8fe5b2bfd3cb3f53098146abb4c" title="Pixel size (in bytes) for a given pixel format.">tjPixelSize</a>[pixelFormat])</code> if each line of the destination image should be padded to the nearest 32-bit boundary, as is the case for Windows bitmaps. You can also be clever and use the pitch parameter to skip lines, etc. Setting this parameter to 0 is the equivalent of setting it to <code>width * <a class="el" href="group___turbo_j_p_e_g.html#gad77cf8fe5b2bfd3cb3f53098146abb4c" title="Pixel size (in bytes) for a given pixel format.">tjPixelSize</a>[pixelFormat]</code>.</td></tr>
|
||||||
<tr><td class="paramname">height</td><td>height (in pixels) of the source and destination images</td></tr>
|
<tr><td class="paramname">height</td><td>height (in pixels) of the source and destination images</td></tr>
|
||||||
<tr><td class="paramname">pixelFormat</td><td>pixel format of the destination image (see <a class="el" href="group___turbo_j_p_e_g.html#gac916144e26c3817ac514e64ae5d12e2a">Pixel formats</a>.)</td></tr>
|
<tr><td class="paramname">pixelFormat</td><td>pixel format of the destination image (see <a class="el" href="group___turbo_j_p_e_g.html#gac916144e26c3817ac514e64ae5d12e2a">Pixel formats</a>.)</td></tr>
|
||||||
<tr><td class="paramname">flags</td><td>the bitwise OR of one or more of the <a class="el" href="group___turbo_j_p_e_g.html#ga72ecf4ebe6eb702d3c6f5ca27455e1ec">flags</a>.</td></tr>
|
<tr><td class="paramname">flags</td><td>the bitwise OR of one or more of the <a class="el" href="group___turbo_j_p_e_g.html#ga72ecf4ebe6eb702d3c6f5ca27455e1ec">flags</a></td></tr>
|
||||||
</table>
|
</table>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
@@ -1467,10 +1476,10 @@ If you choose option 1, <code>*jpegSize</code> should be set to the size of your
|
|||||||
<tr><td class="paramname">jpegSize</td><td>size of the JPEG image (in bytes)</td></tr>
|
<tr><td class="paramname">jpegSize</td><td>size of the JPEG image (in bytes)</td></tr>
|
||||||
<tr><td class="paramname">dstBuf</td><td>pointer to an image buffer that will receive the decompressed image. This buffer should normally be <code>pitch * scaledHeight</code> bytes in size, where <code>scaledHeight</code> can be determined by calling <a class="el" href="group___turbo_j_p_e_g.html#ga84878bb65404204743aa18cac02781df" title="Compute the scaled value of dimension using the given scaling factor.">TJSCALED()</a> with the JPEG image height and one of the scaling factors returned by <a class="el" href="group___turbo_j_p_e_g.html#ga6449044b9af402999ccf52f401333be8" title="Returns a list of fractional scaling factors that the JPEG decompressor in this implementation of Tur...">tjGetScalingFactors()</a>. The <code>dstBuf</code> pointer may also be used to decompress into a specific region of a larger buffer.</td></tr>
|
<tr><td class="paramname">dstBuf</td><td>pointer to an image buffer that will receive the decompressed image. This buffer should normally be <code>pitch * scaledHeight</code> bytes in size, where <code>scaledHeight</code> can be determined by calling <a class="el" href="group___turbo_j_p_e_g.html#ga84878bb65404204743aa18cac02781df" title="Compute the scaled value of dimension using the given scaling factor.">TJSCALED()</a> with the JPEG image height and one of the scaling factors returned by <a class="el" href="group___turbo_j_p_e_g.html#ga6449044b9af402999ccf52f401333be8" title="Returns a list of fractional scaling factors that the JPEG decompressor in this implementation of Tur...">tjGetScalingFactors()</a>. The <code>dstBuf</code> pointer may also be used to decompress into a specific region of a larger buffer.</td></tr>
|
||||||
<tr><td class="paramname">width</td><td>desired width (in pixels) of the destination image. If this is different than the width 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 width. If <code>width</code> is set to 0, then only the height will be considered when determining the scaled image size.</td></tr>
|
<tr><td class="paramname">width</td><td>desired width (in pixels) of the destination image. If this is different than the width 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 width. If <code>width</code> is set to 0, then only the height will be considered when determining the scaled image size.</td></tr>
|
||||||
<tr><td class="paramname">pitch</td><td>bytes per line of the destination image. Normally, this is <code>scaledWidth * <a class="el" href="group___turbo_j_p_e_g.html#gad77cf8fe5b2bfd3cb3f53098146abb4c" title="Pixel size (in bytes) for a given pixel format.">tjPixelSize</a>[pixelFormat]</code> if the decompressed image is unpadded, else <code><a class="el" href="group___turbo_j_p_e_g.html#ga0aba955473315e405295d978f0c16511" title="Pad the given width to the nearest 32-bit boundary.">TJPAD</a>(scaledWidth * <a class="el" href="group___turbo_j_p_e_g.html#gad77cf8fe5b2bfd3cb3f53098146abb4c" title="Pixel size (in bytes) for a given pixel format.">tjPixelSize</a>[pixelFormat])</code> if each line of the decompressed image is padded to the nearest 32-bit boundary, as is the case for Windows bitmaps. (NOTE: <code>scaledWidth</code> can be determined by calling <a class="el" href="group___turbo_j_p_e_g.html#ga84878bb65404204743aa18cac02781df" title="Compute the scaled value of dimension using the given scaling factor.">TJSCALED()</a> with the JPEG image width and one of the scaling factors returned by <a class="el" href="group___turbo_j_p_e_g.html#ga6449044b9af402999ccf52f401333be8" title="Returns a list of fractional scaling factors that the JPEG decompressor in this implementation of Tur...">tjGetScalingFactors()</a>.) You can also be clever and use the pitch parameter to skip lines, etc. Setting this parameter to 0 is the equivalent of setting it to <code>scaledWidth * <a class="el" href="group___turbo_j_p_e_g.html#gad77cf8fe5b2bfd3cb3f53098146abb4c" title="Pixel size (in bytes) for a given pixel format.">tjPixelSize</a>[pixelFormat]</code>.</td></tr>
|
<tr><td class="paramname">pitch</td><td>bytes per line in the destination image. Normally, this is <code>scaledWidth * <a class="el" href="group___turbo_j_p_e_g.html#gad77cf8fe5b2bfd3cb3f53098146abb4c" title="Pixel size (in bytes) for a given pixel format.">tjPixelSize</a>[pixelFormat]</code> if the decompressed image is unpadded, else <code><a class="el" href="group___turbo_j_p_e_g.html#ga0aba955473315e405295d978f0c16511" title="Pad the given width to the nearest 32-bit boundary.">TJPAD</a>(scaledWidth * <a class="el" href="group___turbo_j_p_e_g.html#gad77cf8fe5b2bfd3cb3f53098146abb4c" title="Pixel size (in bytes) for a given pixel format.">tjPixelSize</a>[pixelFormat])</code> if each line of the decompressed image is padded to the nearest 32-bit boundary, as is the case for Windows bitmaps. (NOTE: <code>scaledWidth</code> can be determined by calling <a class="el" href="group___turbo_j_p_e_g.html#ga84878bb65404204743aa18cac02781df" title="Compute the scaled value of dimension using the given scaling factor.">TJSCALED()</a> with the JPEG image width and one of the scaling factors returned by <a class="el" href="group___turbo_j_p_e_g.html#ga6449044b9af402999ccf52f401333be8" title="Returns a list of fractional scaling factors that the JPEG decompressor in this implementation of Tur...">tjGetScalingFactors()</a>.) You can also be clever and use the pitch parameter to skip lines, etc. Setting this parameter to 0 is the equivalent of setting it to <code>scaledWidth * <a class="el" href="group___turbo_j_p_e_g.html#gad77cf8fe5b2bfd3cb3f53098146abb4c" title="Pixel size (in bytes) for a given pixel format.">tjPixelSize</a>[pixelFormat]</code>.</td></tr>
|
||||||
<tr><td class="paramname">height</td><td>desired height (in pixels) of the destination image. If this is different than the height 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 height. If <code>height</code> is set to 0, then only the width will be considered when determining the scaled image size.</td></tr>
|
<tr><td class="paramname">height</td><td>desired height (in pixels) of the destination image. If this is different than the height 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 height. If <code>height</code> is set to 0, then only the width will be considered when determining the scaled image size.</td></tr>
|
||||||
<tr><td class="paramname">pixelFormat</td><td>pixel format of the destination image (see <a class="el" href="group___turbo_j_p_e_g.html#gac916144e26c3817ac514e64ae5d12e2a">Pixel formats</a>.)</td></tr>
|
<tr><td class="paramname">pixelFormat</td><td>pixel format of the destination image (see <a class="el" href="group___turbo_j_p_e_g.html#gac916144e26c3817ac514e64ae5d12e2a">Pixel formats</a>.)</td></tr>
|
||||||
<tr><td class="paramname">flags</td><td>the bitwise OR of one or more of the <a class="el" href="group___turbo_j_p_e_g.html#ga72ecf4ebe6eb702d3c6f5ca27455e1ec">flags</a>.</td></tr>
|
<tr><td class="paramname">flags</td><td>the bitwise OR of one or more of the <a class="el" href="group___turbo_j_p_e_g.html#ga72ecf4ebe6eb702d3c6f5ca27455e1ec">flags</a></td></tr>
|
||||||
</table>
|
</table>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
@@ -1540,7 +1549,7 @@ If you choose option 1, <code>*jpegSize</code> should be set to the size of your
|
|||||||
<tr><td class="paramname">jpegSize</td><td>size of the JPEG image (in bytes)</td></tr>
|
<tr><td class="paramname">jpegSize</td><td>size of the JPEG image (in bytes)</td></tr>
|
||||||
<tr><td class="paramname">width</td><td>pointer to an integer variable that will receive the width (in pixels) of the JPEG image</td></tr>
|
<tr><td class="paramname">width</td><td>pointer to an integer variable that will receive the width (in pixels) of the JPEG image</td></tr>
|
||||||
<tr><td class="paramname">height</td><td>pointer to an integer variable that will receive the height (in pixels) of the JPEG image</td></tr>
|
<tr><td class="paramname">height</td><td>pointer to an integer variable that will receive the height (in pixels) of the JPEG image</td></tr>
|
||||||
<tr><td class="paramname">jpegSubsamp</td><td>pointer to an integer variable that will receive the level of chrominance subsampling used when compressing the JPEG image (see <a class="el" href="group___turbo_j_p_e_g.html#ga1d047060ea80bb9820d540bb928e9074">Chrominance subsampling options</a>.)</td></tr>
|
<tr><td class="paramname">jpegSubsamp</td><td>pointer to an integer variable that will receive the level of chrominance subsampling used when the JPEG image was compressed (see <a class="el" href="group___turbo_j_p_e_g.html#ga1d047060ea80bb9820d540bb928e9074">Chrominance subsampling options</a>.)</td></tr>
|
||||||
<tr><td class="paramname">jpegColorspace</td><td>pointer to an integer variable that will receive one of the JPEG colorspace constants, indicating the colorspace of the JPEG image (see <a class="el" href="group___turbo_j_p_e_g.html#ga4f83ad3368e0e29d1957be0efa7c3720">JPEG colorspaces</a>.)</td></tr>
|
<tr><td class="paramname">jpegColorspace</td><td>pointer to an integer variable that will receive one of the JPEG colorspace constants, indicating the colorspace of the JPEG image (see <a class="el" href="group___turbo_j_p_e_g.html#ga4f83ad3368e0e29d1957be0efa7c3720">JPEG colorspaces</a>.)</td></tr>
|
||||||
</table>
|
</table>
|
||||||
</dd>
|
</dd>
|
||||||
@@ -1620,7 +1629,7 @@ If you choose option 1, <code>*jpegSize</code> should be set to the size of your
|
|||||||
<tr><td class="paramname">width</td><td>desired width (in pixels) of the YUV image. If this is different than the width 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 width. If <code>width</code> is set to 0, then only the height will be considered when determining the scaled image size. If the scaled width is not an even multiple of the MCU block width (see <a class="el" href="group___turbo_j_p_e_g.html#ga9e61e7cd47a15a173283ba94e781308c" title="MCU block width (in pixels) for a given level of chrominance subsampling.">tjMCUWidth</a>), then an intermediate buffer copy will be performed within TurboJPEG.</td></tr>
|
<tr><td class="paramname">width</td><td>desired width (in pixels) of the YUV image. If this is different than the width 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 width. If <code>width</code> is set to 0, then only the height will be considered when determining the scaled image size. If the scaled width is not an even multiple of the MCU block width (see <a class="el" href="group___turbo_j_p_e_g.html#ga9e61e7cd47a15a173283ba94e781308c" title="MCU block width (in pixels) for a given level of chrominance subsampling.">tjMCUWidth</a>), then an intermediate buffer copy will be performed within TurboJPEG.</td></tr>
|
||||||
<tr><td class="paramname">pad</td><td>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.) To generate images suitable for X Video, <code>pad</code> should be set to 4.</td></tr>
|
<tr><td class="paramname">pad</td><td>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.) To generate images suitable for X Video, <code>pad</code> should be set to 4.</td></tr>
|
||||||
<tr><td class="paramname">height</td><td>desired height (in pixels) of the YUV image. If this is different than the height 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 height. If <code>height</code> is set to 0, then only the width will be considered when determining the scaled image size. If the scaled height is not an even multiple of the MCU block height (see <a class="el" href="group___turbo_j_p_e_g.html#gabd247bb9fecb393eca57366feb8327bf" title="MCU block height (in pixels) for a given level of chrominance subsampling.">tjMCUHeight</a>), then an intermediate buffer copy will be performed within TurboJPEG.</td></tr>
|
<tr><td class="paramname">height</td><td>desired height (in pixels) of the YUV image. If this is different than the height 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 height. If <code>height</code> is set to 0, then only the width will be considered when determining the scaled image size. If the scaled height is not an even multiple of the MCU block height (see <a class="el" href="group___turbo_j_p_e_g.html#gabd247bb9fecb393eca57366feb8327bf" title="MCU block height (in pixels) for a given level of chrominance subsampling.">tjMCUHeight</a>), then an intermediate buffer copy will be performed within TurboJPEG.</td></tr>
|
||||||
<tr><td class="paramname">flags</td><td>the bitwise OR of one or more of the <a class="el" href="group___turbo_j_p_e_g.html#ga72ecf4ebe6eb702d3c6f5ca27455e1ec">flags</a>.</td></tr>
|
<tr><td class="paramname">flags</td><td>the bitwise OR of one or more of the <a class="el" href="group___turbo_j_p_e_g.html#ga72ecf4ebe6eb702d3c6f5ca27455e1ec">flags</a></td></tr>
|
||||||
</table>
|
</table>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
@@ -1695,11 +1704,11 @@ If you choose option 1, <code>*jpegSize</code> should be set to the size of your
|
|||||||
<tr><td class="paramname">handle</td><td>a handle to a TurboJPEG decompressor or transformer instance</td></tr>
|
<tr><td class="paramname">handle</td><td>a handle to a TurboJPEG decompressor or transformer instance</td></tr>
|
||||||
<tr><td class="paramname">jpegBuf</td><td>pointer to a buffer containing the JPEG image to decompress</td></tr>
|
<tr><td class="paramname">jpegBuf</td><td>pointer to a buffer containing the JPEG image to decompress</td></tr>
|
||||||
<tr><td class="paramname">jpegSize</td><td>size of the JPEG image (in bytes)</td></tr>
|
<tr><td class="paramname">jpegSize</td><td>size of the JPEG image (in bytes)</td></tr>
|
||||||
<tr><td class="paramname">dstPlanes</td><td>an array of pointers to Y, U (Cb), and V (Cr) image planes (or just a Y plane, if decompressing a grayscale image) that will receive the YUV image. These planes can be contiguous or non-contiguous in memory. Each plane should be at least <b><em>{component stride} * {scaled component height}</em></b> bytes in size. (See below for a description of stride, and refer to <a class="el" href="group___turbo_j_p_e_g.html#YUVnotes">YUV Image Format Notes</a> for a description of component height.)</td></tr>
|
<tr><td class="paramname">dstPlanes</td><td>an array of pointers to Y, U (Cb), and V (Cr) image planes (or just a Y plane, if decompressing a grayscale image) that will receive the YUV image. These planes can be contiguous or non-contiguous in memory. Use <a class="el" href="group___turbo_j_p_e_g.html#ga6f98d977bfa9d167c97172e876ba61e2" title="The size of the buffer (in bytes) required to hold a YUV image plane with the given parameters...">tjPlaneSizeYUV()</a> to determine the appropriate size for each plane based on the scaled image width, scaled image height, strides, and level of chrominance subsampling. Refer to <a class="el" href="group___turbo_j_p_e_g.html#YUVnotes">YUV Image Format Notes</a> for more details.</td></tr>
|
||||||
<tr><td class="paramname">width</td><td>desired width (in pixels) of the YUV image. If this is different than the width 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 width. If <code>width</code> is set to 0, then only the height will be considered when determining the scaled image size. If the scaled width is not an even multiple of the MCU block width (see <a class="el" href="group___turbo_j_p_e_g.html#ga9e61e7cd47a15a173283ba94e781308c" title="MCU block width (in pixels) for a given level of chrominance subsampling.">tjMCUWidth</a>), then an intermediate buffer copy will be performed within TurboJPEG.</td></tr>
|
<tr><td class="paramname">width</td><td>desired width (in pixels) of the YUV image. If this is different than the width 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 width. If <code>width</code> is set to 0, then only the height will be considered when determining the scaled image size. If the scaled width is not an even multiple of the MCU block width (see <a class="el" href="group___turbo_j_p_e_g.html#ga9e61e7cd47a15a173283ba94e781308c" title="MCU block width (in pixels) for a given level of chrominance subsampling.">tjMCUWidth</a>), then an intermediate buffer copy will be performed within TurboJPEG.</td></tr>
|
||||||
<tr><td class="paramname">strides</td><td>an array of integers, each specifying the number of bytes per line in the corresponding plane of the output image. Setting the stride for any plane to 0 is the same as setting it to the scaled component width for the plane. If <code>strides</code> is NULL, then the strides for all planes will be set to their respective scaled component widths. You can adjust the strides in order to add an arbitrary amount of line padding to each plane or to decompress the JPEG image into a subregion of a larger YUV planar image.</td></tr>
|
<tr><td class="paramname">strides</td><td>an array of integers, each specifying the number of bytes per line in the corresponding plane of the output image. Setting the stride for any plane to 0 is the same as setting it to the scaled plane width (see <a class="el" href="group___turbo_j_p_e_g.html#YUVnotes">YUV Image Format Notes</a>.) If <code>strides</code> is NULL, then the strides for all planes will be set to their respective scaled plane widths. You can adjust the strides in order to add an arbitrary amount of line padding to each plane or to decompress the JPEG image into a subregion of a larger YUV planar image.</td></tr>
|
||||||
<tr><td class="paramname">height</td><td>desired height (in pixels) of the YUV image. If this is different than the height 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 height. If <code>height</code> is set to 0, then only the width will be considered when determining the scaled image size. If the scaled height is not an even multiple of the MCU block height (see <a class="el" href="group___turbo_j_p_e_g.html#gabd247bb9fecb393eca57366feb8327bf" title="MCU block height (in pixels) for a given level of chrominance subsampling.">tjMCUHeight</a>), then an intermediate buffer copy will be performed within TurboJPEG.</td></tr>
|
<tr><td class="paramname">height</td><td>desired height (in pixels) of the YUV image. If this is different than the height 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 height. If <code>height</code> is set to 0, then only the width will be considered when determining the scaled image size. If the scaled height is not an even multiple of the MCU block height (see <a class="el" href="group___turbo_j_p_e_g.html#gabd247bb9fecb393eca57366feb8327bf" title="MCU block height (in pixels) for a given level of chrominance subsampling.">tjMCUHeight</a>), then an intermediate buffer copy will be performed within TurboJPEG.</td></tr>
|
||||||
<tr><td class="paramname">flags</td><td>the bitwise OR of one or more of the <a class="el" href="group___turbo_j_p_e_g.html#ga72ecf4ebe6eb702d3c6f5ca27455e1ec">flags</a>.</td></tr>
|
<tr><td class="paramname">flags</td><td>the bitwise OR of one or more of the <a class="el" href="group___turbo_j_p_e_g.html#ga72ecf4ebe6eb702d3c6f5ca27455e1ec">flags</a></td></tr>
|
||||||
</table>
|
</table>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
@@ -1811,13 +1820,13 @@ If you choose option 1, <code>*jpegSize</code> should be set to the size of your
|
|||||||
<tr><td class="paramname">handle</td><td>a handle to a TurboJPEG compressor or transformer instance</td></tr>
|
<tr><td class="paramname">handle</td><td>a handle to a TurboJPEG compressor or transformer instance</td></tr>
|
||||||
<tr><td class="paramname">srcBuf</td><td>pointer to an image buffer containing RGB or grayscale pixels to be encoded</td></tr>
|
<tr><td class="paramname">srcBuf</td><td>pointer to an image buffer containing RGB or grayscale pixels to be encoded</td></tr>
|
||||||
<tr><td class="paramname">width</td><td>width (in pixels) of the source image</td></tr>
|
<tr><td class="paramname">width</td><td>width (in pixels) of the source image</td></tr>
|
||||||
<tr><td class="paramname">pitch</td><td>bytes per line of the source image. Normally, this should be <code>width * <a class="el" href="group___turbo_j_p_e_g.html#gad77cf8fe5b2bfd3cb3f53098146abb4c" title="Pixel size (in bytes) for a given pixel format.">tjPixelSize</a>[pixelFormat]</code> if the image is unpadded, or <code><a class="el" href="group___turbo_j_p_e_g.html#ga0aba955473315e405295d978f0c16511" title="Pad the given width to the nearest 32-bit boundary.">TJPAD</a>(width * <a class="el" href="group___turbo_j_p_e_g.html#gad77cf8fe5b2bfd3cb3f53098146abb4c" title="Pixel size (in bytes) for a given pixel format.">tjPixelSize</a>[pixelFormat])</code> if each line of the image is padded to the nearest 32-bit boundary, 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 * <a class="el" href="group___turbo_j_p_e_g.html#gad77cf8fe5b2bfd3cb3f53098146abb4c" title="Pixel size (in bytes) for a given pixel format.">tjPixelSize</a>[pixelFormat]</code>.</td></tr>
|
<tr><td class="paramname">pitch</td><td>bytes per line in the source image. Normally, this should be <code>width * <a class="el" href="group___turbo_j_p_e_g.html#gad77cf8fe5b2bfd3cb3f53098146abb4c" title="Pixel size (in bytes) for a given pixel format.">tjPixelSize</a>[pixelFormat]</code> if the image is unpadded, or <code><a class="el" href="group___turbo_j_p_e_g.html#ga0aba955473315e405295d978f0c16511" title="Pad the given width to the nearest 32-bit boundary.">TJPAD</a>(width * <a class="el" href="group___turbo_j_p_e_g.html#gad77cf8fe5b2bfd3cb3f53098146abb4c" title="Pixel size (in bytes) for a given pixel format.">tjPixelSize</a>[pixelFormat])</code> if each line of the image is padded to the nearest 32-bit boundary, 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 * <a class="el" href="group___turbo_j_p_e_g.html#gad77cf8fe5b2bfd3cb3f53098146abb4c" title="Pixel size (in bytes) for a given pixel format.">tjPixelSize</a>[pixelFormat]</code>.</td></tr>
|
||||||
<tr><td class="paramname">height</td><td>height (in pixels) of the source image</td></tr>
|
<tr><td class="paramname">height</td><td>height (in pixels) of the source image</td></tr>
|
||||||
<tr><td class="paramname">pixelFormat</td><td>pixel format of the source image (see <a class="el" href="group___turbo_j_p_e_g.html#gac916144e26c3817ac514e64ae5d12e2a">Pixel formats</a>.)</td></tr>
|
<tr><td class="paramname">pixelFormat</td><td>pixel format of the source image (see <a class="el" href="group___turbo_j_p_e_g.html#gac916144e26c3817ac514e64ae5d12e2a">Pixel formats</a>.)</td></tr>
|
||||||
<tr><td class="paramname">dstBuf</td><td>pointer to an image buffer that will receive the YUV image. Use <a class="el" href="group___turbo_j_p_e_g.html#gaf451664a62c1f6c7cc5a6401f32908c9" title="The size of the buffer (in bytes) required to hold a YUV planar image with the given parameters...">tjBufSizeYUV2()</a> to determine the appropriate size for this buffer based on the image width, height, padding, and level of chrominance subsampling. The Y, U (Cb), and V (Cr) image planes will be stored sequentially in the buffer (refer to <a class="el" href="group___turbo_j_p_e_g.html#YUVnotes">YUV Image Format Notes</a>.)</td></tr>
|
<tr><td class="paramname">dstBuf</td><td>pointer to an image buffer that will receive the YUV image. Use <a class="el" href="group___turbo_j_p_e_g.html#gaf451664a62c1f6c7cc5a6401f32908c9" title="The size of the buffer (in bytes) required to hold a YUV planar image with the given parameters...">tjBufSizeYUV2()</a> to determine the appropriate size for this buffer based on the image width, height, padding, and level of chrominance subsampling. The Y, U (Cb), and V (Cr) image planes will be stored sequentially in the buffer (refer to <a class="el" href="group___turbo_j_p_e_g.html#YUVnotes">YUV Image Format Notes</a>.)</td></tr>
|
||||||
<tr><td class="paramname">pad</td><td>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.) To generate images suitable for X Video, <code>pad</code> should be set to 4.</td></tr>
|
<tr><td class="paramname">pad</td><td>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.) To generate images suitable for X Video, <code>pad</code> should be set to 4.</td></tr>
|
||||||
<tr><td class="paramname">subsamp</td><td>the level of chrominance subsampling to be used when generating the YUV image (see <a class="el" href="group___turbo_j_p_e_g.html#ga1d047060ea80bb9820d540bb928e9074">Chrominance subsampling options</a>.) To generate images suitable for X Video, <code>subsamp</code> should be set to <a class="el" href="group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074a63085dbf683cfe39e513cdb6343e3737">TJSAMP_420</a>. This produces an image compatible with the I420 (AKA "YUV420P") format.</td></tr>
|
<tr><td class="paramname">subsamp</td><td>the level of chrominance subsampling to be used when generating the YUV image (see <a class="el" href="group___turbo_j_p_e_g.html#ga1d047060ea80bb9820d540bb928e9074">Chrominance subsampling options</a>.) To generate images suitable for X Video, <code>subsamp</code> should be set to <a class="el" href="group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074a63085dbf683cfe39e513cdb6343e3737">TJSAMP_420</a>. This produces an image compatible with the I420 (AKA "YUV420P") format.</td></tr>
|
||||||
<tr><td class="paramname">flags</td><td>the bitwise OR of one or more of the <a class="el" href="group___turbo_j_p_e_g.html#ga72ecf4ebe6eb702d3c6f5ca27455e1ec">flags</a>.</td></tr>
|
<tr><td class="paramname">flags</td><td>the bitwise OR of one or more of the <a class="el" href="group___turbo_j_p_e_g.html#ga72ecf4ebe6eb702d3c6f5ca27455e1ec">flags</a></td></tr>
|
||||||
</table>
|
</table>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
@@ -1904,13 +1913,13 @@ If you choose option 1, <code>*jpegSize</code> should be set to the size of your
|
|||||||
<tr><td class="paramname">handle</td><td>a handle to a TurboJPEG compressor or transformer instance</td></tr>
|
<tr><td class="paramname">handle</td><td>a handle to a TurboJPEG compressor or transformer instance</td></tr>
|
||||||
<tr><td class="paramname">srcBuf</td><td>pointer to an image buffer containing RGB or grayscale pixels to be encoded</td></tr>
|
<tr><td class="paramname">srcBuf</td><td>pointer to an image buffer containing RGB or grayscale pixels to be encoded</td></tr>
|
||||||
<tr><td class="paramname">width</td><td>width (in pixels) of the source image</td></tr>
|
<tr><td class="paramname">width</td><td>width (in pixels) of the source image</td></tr>
|
||||||
<tr><td class="paramname">pitch</td><td>bytes per line of the source image. Normally, this should be <code>width * <a class="el" href="group___turbo_j_p_e_g.html#gad77cf8fe5b2bfd3cb3f53098146abb4c" title="Pixel size (in bytes) for a given pixel format.">tjPixelSize</a>[pixelFormat]</code> if the image is unpadded, or <code><a class="el" href="group___turbo_j_p_e_g.html#ga0aba955473315e405295d978f0c16511" title="Pad the given width to the nearest 32-bit boundary.">TJPAD</a>(width * <a class="el" href="group___turbo_j_p_e_g.html#gad77cf8fe5b2bfd3cb3f53098146abb4c" title="Pixel size (in bytes) for a given pixel format.">tjPixelSize</a>[pixelFormat])</code> if each line of the image is padded to the nearest 32-bit boundary, 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 * <a class="el" href="group___turbo_j_p_e_g.html#gad77cf8fe5b2bfd3cb3f53098146abb4c" title="Pixel size (in bytes) for a given pixel format.">tjPixelSize</a>[pixelFormat]</code>.</td></tr>
|
<tr><td class="paramname">pitch</td><td>bytes per line in the source image. Normally, this should be <code>width * <a class="el" href="group___turbo_j_p_e_g.html#gad77cf8fe5b2bfd3cb3f53098146abb4c" title="Pixel size (in bytes) for a given pixel format.">tjPixelSize</a>[pixelFormat]</code> if the image is unpadded, or <code><a class="el" href="group___turbo_j_p_e_g.html#ga0aba955473315e405295d978f0c16511" title="Pad the given width to the nearest 32-bit boundary.">TJPAD</a>(width * <a class="el" href="group___turbo_j_p_e_g.html#gad77cf8fe5b2bfd3cb3f53098146abb4c" title="Pixel size (in bytes) for a given pixel format.">tjPixelSize</a>[pixelFormat])</code> if each line of the image is padded to the nearest 32-bit boundary, 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 * <a class="el" href="group___turbo_j_p_e_g.html#gad77cf8fe5b2bfd3cb3f53098146abb4c" title="Pixel size (in bytes) for a given pixel format.">tjPixelSize</a>[pixelFormat]</code>.</td></tr>
|
||||||
<tr><td class="paramname">height</td><td>height (in pixels) of the source image</td></tr>
|
<tr><td class="paramname">height</td><td>height (in pixels) of the source image</td></tr>
|
||||||
<tr><td class="paramname">pixelFormat</td><td>pixel format of the source image (see <a class="el" href="group___turbo_j_p_e_g.html#gac916144e26c3817ac514e64ae5d12e2a">Pixel formats</a>.)</td></tr>
|
<tr><td class="paramname">pixelFormat</td><td>pixel format of the source image (see <a class="el" href="group___turbo_j_p_e_g.html#gac916144e26c3817ac514e64ae5d12e2a">Pixel formats</a>.)</td></tr>
|
||||||
<tr><td class="paramname">dstPlanes</td><td>an array of pointers to Y, U (Cb), and V (Cr) image planes (or just a Y plane, if generating a grayscale image) that will receive the encoded image. These planes can be contiguous or non-contiguous in memory. Each plane should be at least <b><em>{component stride} * {component height}</em></b> bytes in size. (See below for a description of stride, and refer to <a class="el" href="group___turbo_j_p_e_g.html#YUVnotes">YUV Image Format Notes</a> for a description of component height.)</td></tr>
|
<tr><td class="paramname">dstPlanes</td><td>an array of pointers to Y, U (Cb), and V (Cr) image planes (or just a Y plane, if generating a grayscale image) that will receive the encoded image. These planes can be contiguous or non-contiguous in memory. Use <a class="el" href="group___turbo_j_p_e_g.html#ga6f98d977bfa9d167c97172e876ba61e2" title="The size of the buffer (in bytes) required to hold a YUV image plane with the given parameters...">tjPlaneSizeYUV()</a> to determine the appropriate size for each plane based on the image width, height, strides, and level of chrominance subsampling. Refer to <a class="el" href="group___turbo_j_p_e_g.html#YUVnotes">YUV Image Format Notes</a> for more details.</td></tr>
|
||||||
<tr><td class="paramname">strides</td><td>an array of integers, each specifying the number of bytes per line in the corresponding plane of the output image. Setting the stride for any plane to 0 is the same as setting it to the component width for the plane. If <code>strides</code> is NULL, then the strides for all planes will be set to their respective component widths. You can adjust the strides in order to add an arbitrary amount of line padding to each plane or to encode an RGB or grayscale image into a subregion of a larger YUV planar image.</td></tr>
|
<tr><td class="paramname">strides</td><td>an array of integers, each specifying the number of bytes per line in the corresponding plane of the output image. Setting the stride for any plane to 0 is the same as setting it to the plane width (see <a class="el" href="group___turbo_j_p_e_g.html#YUVnotes">YUV Image Format Notes</a>.) If <code>strides</code> is NULL, then the strides for all planes will be set to their respective plane widths. You can adjust the strides in order to add an arbitrary amount of line padding to each plane or to encode an RGB or grayscale image into a subregion of a larger YUV planar image.</td></tr>
|
||||||
<tr><td class="paramname">subsamp</td><td>the level of chrominance subsampling to be used when generating the YUV image (see <a class="el" href="group___turbo_j_p_e_g.html#ga1d047060ea80bb9820d540bb928e9074">Chrominance subsampling options</a>.) To generate images suitable for X Video, <code>subsamp</code> should be set to <a class="el" href="group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074a63085dbf683cfe39e513cdb6343e3737">TJSAMP_420</a>. This produces an image compatible with the I420 (AKA "YUV420P") format.</td></tr>
|
<tr><td class="paramname">subsamp</td><td>the level of chrominance subsampling to be used when generating the YUV image (see <a class="el" href="group___turbo_j_p_e_g.html#ga1d047060ea80bb9820d540bb928e9074">Chrominance subsampling options</a>.) To generate images suitable for X Video, <code>subsamp</code> should be set to <a class="el" href="group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074a63085dbf683cfe39e513cdb6343e3737">TJSAMP_420</a>. This produces an image compatible with the I420 (AKA "YUV420P") format.</td></tr>
|
||||||
<tr><td class="paramname">flags</td><td>the bitwise OR of one or more of the <a class="el" href="group___turbo_j_p_e_g.html#ga72ecf4ebe6eb702d3c6f5ca27455e1ec">flags</a>.</td></tr>
|
<tr><td class="paramname">flags</td><td>the bitwise OR of one or more of the <a class="el" href="group___turbo_j_p_e_g.html#ga72ecf4ebe6eb702d3c6f5ca27455e1ec">flags</a></td></tr>
|
||||||
</table>
|
</table>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
@@ -2043,6 +2052,151 @@ If you choose option 1, <code>*jpegSize</code> should be set to the size of your
|
|||||||
<p>Create a new TurboJPEG transformer instance. </p>
|
<p>Create a new TurboJPEG transformer instance. </p>
|
||||||
<dl class="section return"><dt>Returns</dt><dd>a handle to the newly-created instance, or NULL if an error occurred (see <a class="el" href="group___turbo_j_p_e_g.html#ga9af79c908ec131b1ae8d52fe40375abf" title="Returns a descriptive error message explaining why the last command failed.">tjGetErrorStr()</a>.) </dd></dl>
|
<dl class="section return"><dt>Returns</dt><dd>a handle to the newly-created instance, or NULL if an error occurred (see <a class="el" href="group___turbo_j_p_e_g.html#ga9af79c908ec131b1ae8d52fe40375abf" title="Returns a descriptive error message explaining why the last command failed.">tjGetErrorStr()</a>.) </dd></dl>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<a class="anchor" id="ga1a209696c6a80748f20e134b3c64789f"></a>
|
||||||
|
<div class="memitem">
|
||||||
|
<div class="memproto">
|
||||||
|
<table class="memname">
|
||||||
|
<tr>
|
||||||
|
<td class="memname">DLLEXPORT int tjPlaneHeight </td>
|
||||||
|
<td>(</td>
|
||||||
|
<td class="paramtype">int </td>
|
||||||
|
<td class="paramname"><em>componentID</em>, </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="paramkey"></td>
|
||||||
|
<td></td>
|
||||||
|
<td class="paramtype">int </td>
|
||||||
|
<td class="paramname"><em>height</em>, </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="paramkey"></td>
|
||||||
|
<td></td>
|
||||||
|
<td class="paramtype">int </td>
|
||||||
|
<td class="paramname"><em>subsamp</em> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td></td>
|
||||||
|
<td>)</td>
|
||||||
|
<td></td><td></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div><div class="memdoc">
|
||||||
|
|
||||||
|
<p>The plane height of a YUV image plane with the given parameters. </p>
|
||||||
|
<p>Refer to <a class="el" href="group___turbo_j_p_e_g.html#YUVnotes">YUV Image Format Notes</a> for a description of plane height.</p>
|
||||||
|
<dl class="params"><dt>Parameters</dt><dd>
|
||||||
|
<table class="params">
|
||||||
|
<tr><td class="paramname">componentID</td><td>ID number of the image plane (0 = Y, 1 = U/Cb, 2 = V/Cr)</td></tr>
|
||||||
|
<tr><td class="paramname">height</td><td>height (in pixels) of the YUV image</td></tr>
|
||||||
|
<tr><td class="paramname">subsamp</td><td>level of chrominance subsampling in the image (see <a class="el" href="group___turbo_j_p_e_g.html#ga1d047060ea80bb9820d540bb928e9074">Chrominance subsampling options</a>.)</td></tr>
|
||||||
|
</table>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
<dl class="section return"><dt>Returns</dt><dd>the plane height of a YUV image plane with the given parameters, or -1 if the arguments are out of bounds. </dd></dl>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<a class="anchor" id="ga6f98d977bfa9d167c97172e876ba61e2"></a>
|
||||||
|
<div class="memitem">
|
||||||
|
<div class="memproto">
|
||||||
|
<table class="memname">
|
||||||
|
<tr>
|
||||||
|
<td class="memname">DLLEXPORT unsigned long DLLCALL tjPlaneSizeYUV </td>
|
||||||
|
<td>(</td>
|
||||||
|
<td class="paramtype">int </td>
|
||||||
|
<td class="paramname"><em>componentID</em>, </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="paramkey"></td>
|
||||||
|
<td></td>
|
||||||
|
<td class="paramtype">int </td>
|
||||||
|
<td class="paramname"><em>width</em>, </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="paramkey"></td>
|
||||||
|
<td></td>
|
||||||
|
<td class="paramtype">int </td>
|
||||||
|
<td class="paramname"><em>stride</em>, </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="paramkey"></td>
|
||||||
|
<td></td>
|
||||||
|
<td class="paramtype">int </td>
|
||||||
|
<td class="paramname"><em>height</em>, </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="paramkey"></td>
|
||||||
|
<td></td>
|
||||||
|
<td class="paramtype">int </td>
|
||||||
|
<td class="paramname"><em>subsamp</em> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td></td>
|
||||||
|
<td>)</td>
|
||||||
|
<td></td><td></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div><div class="memdoc">
|
||||||
|
|
||||||
|
<p>The size of the buffer (in bytes) required to hold a YUV image plane with the given parameters. </p>
|
||||||
|
<dl class="params"><dt>Parameters</dt><dd>
|
||||||
|
<table class="params">
|
||||||
|
<tr><td class="paramname">componentID</td><td>ID number of the image plane (0 = Y, 1 = U/Cb, 2 = V/Cr)</td></tr>
|
||||||
|
<tr><td class="paramname">width</td><td>width (in pixels) of the YUV image. NOTE: this is the width of the whole image, not the plane width.</td></tr>
|
||||||
|
<tr><td class="paramname">stride</td><td>bytes per line in the image plane. Setting this to 0 is the equivalent of setting it to the plane width.</td></tr>
|
||||||
|
<tr><td class="paramname">height</td><td>height (in pixels) of the YUV image. NOTE: this is the height of the whole image, not the plane height.</td></tr>
|
||||||
|
<tr><td class="paramname">subsamp</td><td>level of chrominance subsampling in the image (see <a class="el" href="group___turbo_j_p_e_g.html#ga1d047060ea80bb9820d540bb928e9074">Chrominance subsampling options</a>.)</td></tr>
|
||||||
|
</table>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
<dl class="section return"><dt>Returns</dt><dd>the size of the buffer (in bytes) required to hold the YUV image plane, or -1 if the arguments are out of bounds. </dd></dl>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<a class="anchor" id="ga63fb66bb1e36c74008c4634360becbb1"></a>
|
||||||
|
<div class="memitem">
|
||||||
|
<div class="memproto">
|
||||||
|
<table class="memname">
|
||||||
|
<tr>
|
||||||
|
<td class="memname">DLLEXPORT int tjPlaneWidth </td>
|
||||||
|
<td>(</td>
|
||||||
|
<td class="paramtype">int </td>
|
||||||
|
<td class="paramname"><em>componentID</em>, </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="paramkey"></td>
|
||||||
|
<td></td>
|
||||||
|
<td class="paramtype">int </td>
|
||||||
|
<td class="paramname"><em>width</em>, </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="paramkey"></td>
|
||||||
|
<td></td>
|
||||||
|
<td class="paramtype">int </td>
|
||||||
|
<td class="paramname"><em>subsamp</em> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td></td>
|
||||||
|
<td>)</td>
|
||||||
|
<td></td><td></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div><div class="memdoc">
|
||||||
|
|
||||||
|
<p>The plane width of a YUV image plane with the given parameters. </p>
|
||||||
|
<p>Refer to <a class="el" href="group___turbo_j_p_e_g.html#YUVnotes">YUV Image Format Notes</a> for a description of plane width.</p>
|
||||||
|
<dl class="params"><dt>Parameters</dt><dd>
|
||||||
|
<table class="params">
|
||||||
|
<tr><td class="paramname">componentID</td><td>ID number of the image plane (0 = Y, 1 = U/Cb, 2 = V/Cr)</td></tr>
|
||||||
|
<tr><td class="paramname">width</td><td>width (in pixels) of the YUV image</td></tr>
|
||||||
|
<tr><td class="paramname">subsamp</td><td>level of chrominance subsampling in the image (see <a class="el" href="group___turbo_j_p_e_g.html#ga1d047060ea80bb9820d540bb928e9074">Chrominance subsampling options</a>.)</td></tr>
|
||||||
|
</table>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
<dl class="section return"><dt>Returns</dt><dd>the plane width of a YUV image plane with the given parameters, or -1 if the arguments are out of bounds. </dd></dl>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a class="anchor" id="gae403193ceb4aafb7e0f56ab587b48616"></a>
|
<a class="anchor" id="gae403193ceb4aafb7e0f56ab587b48616"></a>
|
||||||
@@ -2106,12 +2260,12 @@ If you choose option 1, <code>*jpegSize</code> should be set to the size of your
|
|||||||
</div><div class="memdoc">
|
</div><div class="memdoc">
|
||||||
|
|
||||||
<p>Losslessly transform a JPEG image into another JPEG image. </p>
|
<p>Losslessly transform a JPEG image into another JPEG image. </p>
|
||||||
<p>Lossless transforms work by moving the raw coefficients from one JPEG image structure to another without altering the values of the coefficients. While this is typically faster than decompressing the image, transforming it, and re-compressing it, lossless transforms are not free. Each lossless transform requires reading and performing Huffman decoding on all of the coefficients in the source image, regardless of the size of the destination image. Thus, this function provides a means of generating multiple transformed images from the same source or applying multiple transformations simultaneously, in order to eliminate the need to read the source coefficients multiple times.</p>
|
<p>Lossless transforms work by moving the raw DCT coefficients from one JPEG image structure to another without altering the values of the coefficients. While this is typically faster than decompressing the image, transforming it, and re-compressing it, lossless transforms are not free. Each lossless transform requires reading and performing Huffman decoding on all of the coefficients in the source image, regardless of the size of the destination image. Thus, this function provides a means of generating multiple transformed images from the same source or applying multiple transformations simultaneously, in order to eliminate the need to read the source coefficients multiple times.</p>
|
||||||
<dl class="params"><dt>Parameters</dt><dd>
|
<dl class="params"><dt>Parameters</dt><dd>
|
||||||
<table class="params">
|
<table class="params">
|
||||||
<tr><td class="paramname">handle</td><td>a handle to a TurboJPEG transformer instance</td></tr>
|
<tr><td class="paramname">handle</td><td>a handle to a TurboJPEG transformer instance</td></tr>
|
||||||
<tr><td class="paramname">jpegBuf</td><td>pointer to a buffer containing the JPEG image to transform</td></tr>
|
<tr><td class="paramname">jpegBuf</td><td>pointer to a buffer containing the JPEG source image to transform</td></tr>
|
||||||
<tr><td class="paramname">jpegSize</td><td>size of the JPEG image (in bytes)</td></tr>
|
<tr><td class="paramname">jpegSize</td><td>size of the JPEG source image (in bytes)</td></tr>
|
||||||
<tr><td class="paramname">n</td><td>the number of transformed JPEG images to generate</td></tr>
|
<tr><td class="paramname">n</td><td>the number of transformed JPEG images to generate</td></tr>
|
||||||
<tr><td class="paramname">dstBufs</td><td>pointer to an array of n image buffers. <code>dstBufs[i]</code> will receive a JPEG image that has been transformed using the parameters in <code>transforms[i]</code>. TurboJPEG has the ability to reallocate the JPEG buffer to accommodate the size of the JPEG image. Thus, you can choose to:<ol type="1">
|
<tr><td class="paramname">dstBufs</td><td>pointer to an array of n image buffers. <code>dstBufs[i]</code> will receive a JPEG image that has been transformed using the parameters in <code>transforms[i]</code>. TurboJPEG has the ability to reallocate the JPEG buffer to accommodate the size of the JPEG image. Thus, you can choose to:<ol type="1">
|
||||||
<li>pre-allocate the JPEG buffer with an arbitrary size using <a class="el" href="group___turbo_j_p_e_g.html#ga5c9234bda6d993cdaffdd89bf81a00ff" title="Allocate an image buffer for use with TurboJPEG.">tjAlloc()</a> and let TurboJPEG grow the buffer as needed,</li>
|
<li>pre-allocate the JPEG buffer with an arbitrary size using <a class="el" href="group___turbo_j_p_e_g.html#ga5c9234bda6d993cdaffdd89bf81a00ff" title="Allocate an image buffer for use with TurboJPEG.">tjAlloc()</a> and let TurboJPEG grow the buffer as needed,</li>
|
||||||
@@ -2121,7 +2275,7 @@ If you choose option 1, <code>*jpegSize</code> should be set to the size of your
|
|||||||
If you choose option 1, <code>dstSizes[i]</code> should be set to the size of your pre-allocated buffer. In any case, unless you have set <a class="el" href="group___turbo_j_p_e_g.html#ga8808d403c68b62aaa58a4c1e58e98963" title="Disable buffer (re)allocation.">TJFLAG_NOREALLOC</a>, you should always check <code>dstBufs[i]</code> upon return from this function, as it may have changed.</td></tr>
|
If you choose option 1, <code>dstSizes[i]</code> should be set to the size of your pre-allocated buffer. In any case, unless you have set <a class="el" href="group___turbo_j_p_e_g.html#ga8808d403c68b62aaa58a4c1e58e98963" title="Disable buffer (re)allocation.">TJFLAG_NOREALLOC</a>, you should always check <code>dstBufs[i]</code> upon return from this function, as it may have changed.</td></tr>
|
||||||
<tr><td class="paramname">dstSizes</td><td>pointer to an array of n unsigned long variables that will receive the actual sizes (in bytes) of each transformed JPEG image. If <code>dstBufs[i]</code> points to a pre-allocated buffer, then <code>dstSizes[i]</code> should be set to the size of the buffer. Upon return, <code>dstSizes[i]</code> will contain the size of the JPEG image (in bytes.)</td></tr>
|
<tr><td class="paramname">dstSizes</td><td>pointer to an array of n unsigned long variables that will receive the actual sizes (in bytes) of each transformed JPEG image. If <code>dstBufs[i]</code> points to a pre-allocated buffer, then <code>dstSizes[i]</code> should be set to the size of the buffer. Upon return, <code>dstSizes[i]</code> will contain the size of the JPEG image (in bytes.)</td></tr>
|
||||||
<tr><td class="paramname">transforms</td><td>pointer to an array of n <a class="el" href="structtjtransform.html" title="Lossless transform.">tjtransform</a> structures, each of which specifies the transform parameters and/or cropping region for the corresponding transformed output image.</td></tr>
|
<tr><td class="paramname">transforms</td><td>pointer to an array of n <a class="el" href="structtjtransform.html" title="Lossless transform.">tjtransform</a> structures, each of which specifies the transform parameters and/or cropping region for the corresponding transformed output image.</td></tr>
|
||||||
<tr><td class="paramname">flags</td><td>the bitwise OR of one or more of the <a class="el" href="group___turbo_j_p_e_g.html#ga72ecf4ebe6eb702d3c6f5ca27455e1ec">flags</a>.</td></tr>
|
<tr><td class="paramname">flags</td><td>the bitwise OR of one or more of the <a class="el" href="group___turbo_j_p_e_g.html#ga72ecf4ebe6eb702d3c6f5ca27455e1ec">flags</a></td></tr>
|
||||||
</table>
|
</table>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|||||||
@@ -56,6 +56,9 @@ var searchData=
|
|||||||
['tjpf_5fxbgr',['TJPF_XBGR',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aaf6603b27147de47e212e75dac027b2af',1,'turbojpeg.h']]],
|
['tjpf_5fxbgr',['TJPF_XBGR',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aaf6603b27147de47e212e75dac027b2af',1,'turbojpeg.h']]],
|
||||||
['tjpf_5fxrgb',['TJPF_XRGB',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aadae996905efcfa3b42a0bb3bea7f9d84',1,'turbojpeg.h']]],
|
['tjpf_5fxrgb',['TJPF_XRGB',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aadae996905efcfa3b42a0bb3bea7f9d84',1,'turbojpeg.h']]],
|
||||||
['tjpixelsize',['tjPixelSize',['../group___turbo_j_p_e_g.html#gad77cf8fe5b2bfd3cb3f53098146abb4c',1,'turbojpeg.h']]],
|
['tjpixelsize',['tjPixelSize',['../group___turbo_j_p_e_g.html#gad77cf8fe5b2bfd3cb3f53098146abb4c',1,'turbojpeg.h']]],
|
||||||
|
['tjplaneheight',['tjPlaneHeight',['../group___turbo_j_p_e_g.html#ga1a209696c6a80748f20e134b3c64789f',1,'turbojpeg.h']]],
|
||||||
|
['tjplanesizeyuv',['tjPlaneSizeYUV',['../group___turbo_j_p_e_g.html#ga6f98d977bfa9d167c97172e876ba61e2',1,'turbojpeg.h']]],
|
||||||
|
['tjplanewidth',['tjPlaneWidth',['../group___turbo_j_p_e_g.html#ga63fb66bb1e36c74008c4634360becbb1',1,'turbojpeg.h']]],
|
||||||
['tjredoffset',['tjRedOffset',['../group___turbo_j_p_e_g.html#gadd9b446742ac8a3923f7992c7988fea8',1,'turbojpeg.h']]],
|
['tjredoffset',['tjRedOffset',['../group___turbo_j_p_e_g.html#gadd9b446742ac8a3923f7992c7988fea8',1,'turbojpeg.h']]],
|
||||||
['tjregion',['tjregion',['../structtjregion.html',1,'']]],
|
['tjregion',['tjregion',['../structtjregion.html',1,'']]],
|
||||||
['tjsamp',['TJSAMP',['../group___turbo_j_p_e_g.html#ga1d047060ea80bb9820d540bb928e9074',1,'turbojpeg.h']]],
|
['tjsamp',['TJSAMP',['../group___turbo_j_p_e_g.html#ga1d047060ea80bb9820d540bb928e9074',1,'turbojpeg.h']]],
|
||||||
@@ -67,7 +70,7 @@ var searchData=
|
|||||||
['tjsamp_5fgray',['TJSAMP_GRAY',['../group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074a3f1c9504842ddc7a48d0f690754b6248',1,'turbojpeg.h']]],
|
['tjsamp_5fgray',['TJSAMP_GRAY',['../group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074a3f1c9504842ddc7a48d0f690754b6248',1,'turbojpeg.h']]],
|
||||||
['tjscaled',['TJSCALED',['../group___turbo_j_p_e_g.html#ga84878bb65404204743aa18cac02781df',1,'turbojpeg.h']]],
|
['tjscaled',['TJSCALED',['../group___turbo_j_p_e_g.html#ga84878bb65404204743aa18cac02781df',1,'turbojpeg.h']]],
|
||||||
['tjscalingfactor',['tjscalingfactor',['../structtjscalingfactor.html',1,'']]],
|
['tjscalingfactor',['tjscalingfactor',['../structtjscalingfactor.html',1,'']]],
|
||||||
['tjtransform',['tjtransform',['../structtjtransform.html',1,'tjtransform'],['../group___turbo_j_p_e_g.html#gaa29f3189c41be12ec5dee7caec318a31',1,'tjtransform(): turbojpeg.h'],['../group___turbo_j_p_e_g.html#gae403193ceb4aafb7e0f56ab587b48616',1,'tjTransform(tjhandle handle, unsigned char *jpegBuf, unsigned long jpegSize, int n, unsigned char **dstBufs, unsigned long *dstSizes, tjtransform *transforms, int flags): turbojpeg.h']]],
|
['tjtransform',['tjtransform',['../structtjtransform.html',1,'tjtransform'],['../group___turbo_j_p_e_g.html#gae403193ceb4aafb7e0f56ab587b48616',1,'tjTransform(tjhandle handle, unsigned char *jpegBuf, unsigned long jpegSize, int n, unsigned char **dstBufs, unsigned long *dstSizes, tjtransform *transforms, int flags): turbojpeg.h'],['../group___turbo_j_p_e_g.html#gaa29f3189c41be12ec5dee7caec318a31',1,'tjtransform(): turbojpeg.h']]],
|
||||||
['tjxop',['TJXOP',['../group___turbo_j_p_e_g.html#ga2de531af4e7e6c4f124908376b354866',1,'turbojpeg.h']]],
|
['tjxop',['TJXOP',['../group___turbo_j_p_e_g.html#ga2de531af4e7e6c4f124908376b354866',1,'turbojpeg.h']]],
|
||||||
['tjxop_5fhflip',['TJXOP_HFLIP',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866aa0df69776caa30f0fa28e26332d311ce',1,'turbojpeg.h']]],
|
['tjxop_5fhflip',['TJXOP_HFLIP',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866aa0df69776caa30f0fa28e26332d311ce',1,'turbojpeg.h']]],
|
||||||
['tjxop_5fnone',['TJXOP_NONE',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866aad88c0366cd3f7d0eac9d7a3fa1c2c27',1,'turbojpeg.h']]],
|
['tjxop_5fnone',['TJXOP_NONE',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866aad88c0366cd3f7d0eac9d7a3fa1c2c27',1,'turbojpeg.h']]],
|
||||||
|
|||||||
@@ -21,5 +21,8 @@ var searchData=
|
|||||||
['tjinitcompress',['tjInitCompress',['../group___turbo_j_p_e_g.html#ga3d10c47fbe4a2489a2b30c931551d01a',1,'turbojpeg.h']]],
|
['tjinitcompress',['tjInitCompress',['../group___turbo_j_p_e_g.html#ga3d10c47fbe4a2489a2b30c931551d01a',1,'turbojpeg.h']]],
|
||||||
['tjinitdecompress',['tjInitDecompress',['../group___turbo_j_p_e_g.html#gae5408179d041e2a2f7199c8283cf649e',1,'turbojpeg.h']]],
|
['tjinitdecompress',['tjInitDecompress',['../group___turbo_j_p_e_g.html#gae5408179d041e2a2f7199c8283cf649e',1,'turbojpeg.h']]],
|
||||||
['tjinittransform',['tjInitTransform',['../group___turbo_j_p_e_g.html#ga3155b775bfbac9dbba869b95a0367902',1,'turbojpeg.h']]],
|
['tjinittransform',['tjInitTransform',['../group___turbo_j_p_e_g.html#ga3155b775bfbac9dbba869b95a0367902',1,'turbojpeg.h']]],
|
||||||
|
['tjplaneheight',['tjPlaneHeight',['../group___turbo_j_p_e_g.html#ga1a209696c6a80748f20e134b3c64789f',1,'turbojpeg.h']]],
|
||||||
|
['tjplanesizeyuv',['tjPlaneSizeYUV',['../group___turbo_j_p_e_g.html#ga6f98d977bfa9d167c97172e876ba61e2',1,'turbojpeg.h']]],
|
||||||
|
['tjplanewidth',['tjPlaneWidth',['../group___turbo_j_p_e_g.html#ga63fb66bb1e36c74008c4634360becbb1',1,'turbojpeg.h']]],
|
||||||
['tjtransform',['tjTransform',['../group___turbo_j_p_e_g.html#gae403193ceb4aafb7e0f56ab587b48616',1,'turbojpeg.h']]]
|
['tjtransform',['tjTransform',['../group___turbo_j_p_e_g.html#gae403193ceb4aafb7e0f56ab587b48616',1,'turbojpeg.h']]]
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -277,7 +277,7 @@ public class TJExample implements TJCustomFilter {
|
|||||||
scaleFactor.isOne()) {
|
scaleFactor.isOne()) {
|
||||||
file = new File(argv[1]);
|
file = new File(argv[1]);
|
||||||
FileOutputStream fos = new FileOutputStream(file);
|
FileOutputStream fos = new FileOutputStream(file);
|
||||||
fos.write(tjd.getSourceBuf(), 0, tjd.getSourceSize());
|
fos.write(tjd.getJPEGBuf(), 0, tjd.getJPEGSize());
|
||||||
fos.close();
|
fos.close();
|
||||||
System.exit(0);
|
System.exit(0);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -106,83 +106,73 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr class="altColor">
|
<tr class="altColor">
|
||||||
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJ.html#bufSizeYUV(int, int, int)">org.libjpegturbo.turbojpeg.TJ.bufSizeYUV(int, int, int)</a>
|
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJ.html#bufSizeYUV(int,%20int,%20int)">org.libjpegturbo.turbojpeg.TJ.bufSizeYUV(int, int, int)</a>
|
||||||
<div class="block"><i>Use <a href="org/libjpegturbo/turbojpeg/TJ.html#bufSizeYUV(int, int, int, int)"><code>TJ.bufSizeYUV(int, int, int, int)</code></a> instead.</i></div>
|
<div class="block"><i>Use <a href="org/libjpegturbo/turbojpeg/TJ.html#bufSizeYUV(int,%20int,%20int,%20int)"><code>TJ.bufSizeYUV(int, int, int, int)</code></a> instead.</i></div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="rowColor">
|
<tr class="rowColor">
|
||||||
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJCompressor.html#compress(java.awt.image.BufferedImage, byte[], int)">org.libjpegturbo.turbojpeg.TJCompressor.compress(BufferedImage, byte[], int)</a>
|
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJCompressor.html#compress(java.awt.image.BufferedImage,%20byte[],%20int)">org.libjpegturbo.turbojpeg.TJCompressor.compress(BufferedImage, byte[], int)</a>
|
||||||
<div class="block"><i>Use
|
<div class="block"><i>Use
|
||||||
<a href="org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(java.awt.image.BufferedImage, int, int, int, int)"><code>TJCompressor.setSourceImage(BufferedImage, int, int, int, int)</code></a> and
|
<a href="org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(java.awt.image.BufferedImage,%20int,%20int,%20int,%20int)"><code>TJCompressor.setSourceImage(BufferedImage, int, int, int, int)</code></a> and
|
||||||
<a href="org/libjpegturbo/turbojpeg/TJCompressor.html#compress(byte[], int)"><code>TJCompressor.compress(byte[], int)</code></a> instead.</i></div>
|
<a href="org/libjpegturbo/turbojpeg/TJCompressor.html#compress(byte[],%20int)"><code>TJCompressor.compress(byte[], int)</code></a> instead.</i></div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="altColor">
|
<tr class="altColor">
|
||||||
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJCompressor.html#compress(java.awt.image.BufferedImage, int)">org.libjpegturbo.turbojpeg.TJCompressor.compress(BufferedImage, int)</a>
|
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJCompressor.html#compress(java.awt.image.BufferedImage,%20int)">org.libjpegturbo.turbojpeg.TJCompressor.compress(BufferedImage, int)</a>
|
||||||
<div class="block"><i>Use
|
<div class="block"><i>Use
|
||||||
<a href="org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(java.awt.image.BufferedImage, int, int, int, int)"><code>TJCompressor.setSourceImage(BufferedImage, int, int, int, int)</code></a> and
|
<a href="org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(java.awt.image.BufferedImage,%20int,%20int,%20int,%20int)"><code>TJCompressor.setSourceImage(BufferedImage, int, int, int, int)</code></a> and
|
||||||
<a href="org/libjpegturbo/turbojpeg/TJCompressor.html#compress(int)"><code>TJCompressor.compress(int)</code></a> instead.</i></div>
|
<a href="org/libjpegturbo/turbojpeg/TJCompressor.html#compress(int)"><code>TJCompressor.compress(int)</code></a> instead.</i></div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="rowColor">
|
<tr class="rowColor">
|
||||||
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(byte[], int, int, int, int, int)">org.libjpegturbo.turbojpeg.TJDecompressor.decompress(byte[], int, int, int, int, int)</a>
|
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(byte[],%20int,%20int,%20int,%20int,%20int)">org.libjpegturbo.turbojpeg.TJDecompressor.decompress(byte[], int, int, int, int, int)</a>
|
||||||
<div class="block"><i>Use
|
<div class="block"><i>Use
|
||||||
<a href="org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(byte[], int, int, int, int, int, int, int)"><code>TJDecompressor.decompress(byte[], int, int, int, int, int, int, int)</code></a> instead.</i></div>
|
<a href="org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(byte[],%20int,%20int,%20int,%20int,%20int,%20int,%20int)"><code>TJDecompressor.decompress(byte[], int, int, int, int, int, int, int)</code></a> instead.</i></div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="altColor">
|
<tr class="altColor">
|
||||||
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(byte[], int)">org.libjpegturbo.turbojpeg.TJDecompressor.decompressToYUV(byte[], int)</a>
|
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(byte[],%20int)">org.libjpegturbo.turbojpeg.TJDecompressor.decompressToYUV(byte[], int)</a>
|
||||||
<div class="block"><i>Use <a href="org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(org.libjpegturbo.turbojpeg.YUVImage, int)"><code>TJDecompressor.decompressToYUV(YUVImage, int)</code></a> instead.</i></div>
|
<div class="block"><i>Use <a href="org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(org.libjpegturbo.turbojpeg.YUVImage,%20int)"><code>TJDecompressor.decompressToYUV(YUVImage, int)</code></a> instead.</i></div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="rowColor">
|
<tr class="rowColor">
|
||||||
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(int)">org.libjpegturbo.turbojpeg.TJDecompressor.decompressToYUV(int)</a>
|
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(int)">org.libjpegturbo.turbojpeg.TJDecompressor.decompressToYUV(int)</a>
|
||||||
<div class="block"><i>Use <a href="org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(int, int, int, int)"><code>TJDecompressor.decompressToYUV(int, int, int, int)</code></a> instead.</i></div>
|
<div class="block"><i>Use <a href="org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(int,%20int,%20int,%20int)"><code>TJDecompressor.decompressToYUV(int, int, int, int)</code></a> instead.</i></div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="altColor">
|
<tr class="altColor">
|
||||||
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(java.awt.image.BufferedImage, byte[], int)">org.libjpegturbo.turbojpeg.TJCompressor.encodeYUV(BufferedImage, byte[], int)</a>
|
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(java.awt.image.BufferedImage,%20byte[],%20int)">org.libjpegturbo.turbojpeg.TJCompressor.encodeYUV(BufferedImage, byte[], int)</a>
|
||||||
<div class="block"><i>Use
|
<div class="block"><i>Use
|
||||||
<a href="org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(java.awt.image.BufferedImage, int, int, int, int)"><code>TJCompressor.setSourceImage(BufferedImage, int, int, int, int)</code></a> and
|
<a href="org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(java.awt.image.BufferedImage,%20int,%20int,%20int,%20int)"><code>TJCompressor.setSourceImage(BufferedImage, int, int, int, int)</code></a> and
|
||||||
<a href="org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(byte[], int)"><code>TJCompressor.encodeYUV(byte[], int)</code></a> instead.</i></div>
|
<a href="org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(byte[],%20int)"><code>TJCompressor.encodeYUV(byte[], int)</code></a> instead.</i></div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="rowColor">
|
<tr class="rowColor">
|
||||||
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(java.awt.image.BufferedImage, int)">org.libjpegturbo.turbojpeg.TJCompressor.encodeYUV(BufferedImage, int)</a>
|
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(java.awt.image.BufferedImage,%20int)">org.libjpegturbo.turbojpeg.TJCompressor.encodeYUV(BufferedImage, int)</a>
|
||||||
<div class="block"><i>Use
|
<div class="block"><i>Use
|
||||||
<a href="org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(java.awt.image.BufferedImage, int, int, int, int)"><code>TJCompressor.setSourceImage(BufferedImage, int, int, int, int)</code></a> and
|
<a href="org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(java.awt.image.BufferedImage,%20int,%20int,%20int,%20int)"><code>TJCompressor.setSourceImage(BufferedImage, int, int, int, int)</code></a> and
|
||||||
<a href="org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(int)"><code>TJCompressor.encodeYUV(int)</code></a> instead.</i></div>
|
<a href="org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(int,%20int)"><code>TJCompressor.encodeYUV(int, int)</code></a> instead.</i></div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="altColor">
|
<tr class="altColor">
|
||||||
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(byte[], int)">org.libjpegturbo.turbojpeg.TJCompressor.encodeYUV(byte[], int)</a>
|
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(byte[],%20int)">org.libjpegturbo.turbojpeg.TJCompressor.encodeYUV(byte[], int)</a>
|
||||||
<div class="block"><i>Use <a href="org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(org.libjpegturbo.turbojpeg.YUVImage, int)"><code>TJCompressor.encodeYUV(YUVImage, int)</code></a> instead.</i></div>
|
<div class="block"><i>Use <a href="org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(org.libjpegturbo.turbojpeg.YUVImage,%20int)"><code>TJCompressor.encodeYUV(YUVImage, int)</code></a> instead.</i></div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="rowColor">
|
<tr class="rowColor">
|
||||||
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(int)">org.libjpegturbo.turbojpeg.TJCompressor.encodeYUV(int)</a>
|
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(int)">org.libjpegturbo.turbojpeg.TJCompressor.encodeYUV(int)</a>
|
||||||
<div class="block"><i>Use <a href="org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(int, int)"><code>TJCompressor.encodeYUV(int, int)</code></a> instead.</i></div>
|
<div class="block"><i>Use <a href="org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(int,%20int)"><code>TJCompressor.encodeYUV(int, int)</code></a> instead.</i></div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="altColor">
|
<tr class="altColor">
|
||||||
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJDecompressor.html#getJPEGBuf()">org.libjpegturbo.turbojpeg.TJDecompressor.getJPEGBuf()</a>
|
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJDecompressor.html#setJPEGImage(byte[],%20int)">org.libjpegturbo.turbojpeg.TJDecompressor.setJPEGImage(byte[], int)</a>
|
||||||
<div class="block"><i>Use <a href="org/libjpegturbo/turbojpeg/TJDecompressor.html#getSourceBuf()"><code>TJDecompressor.getSourceBuf()</code></a> instead.</i></div>
|
<div class="block"><i>Use <a href="org/libjpegturbo/turbojpeg/TJDecompressor.html#setSourceImage(byte[],%20int)"><code>TJDecompressor.setSourceImage(byte[], int)</code></a> instead.</i></div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="rowColor">
|
<tr class="rowColor">
|
||||||
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJDecompressor.html#getJPEGSize()">org.libjpegturbo.turbojpeg.TJDecompressor.getJPEGSize()</a>
|
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[],%20int,%20int,%20int,%20int)">org.libjpegturbo.turbojpeg.TJCompressor.setSourceImage(byte[], int, int, int, int)</a>
|
||||||
<div class="block"><i>Use <a href="org/libjpegturbo/turbojpeg/TJDecompressor.html#getSourceSize()"><code>TJDecompressor.getSourceSize()</code></a> instead.</i></div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr class="altColor">
|
|
||||||
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJDecompressor.html#setJPEGImage(byte[], int)">org.libjpegturbo.turbojpeg.TJDecompressor.setJPEGImage(byte[], int)</a>
|
|
||||||
<div class="block"><i>Use <a href="org/libjpegturbo/turbojpeg/TJDecompressor.html#setSourceImage(byte[], int)"><code>TJDecompressor.setSourceImage(byte[], int)</code></a> instead.</i></div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr class="rowColor">
|
|
||||||
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[], int, int, int, int)">org.libjpegturbo.turbojpeg.TJCompressor.setSourceImage(byte[], int, int, int, int)</a>
|
|
||||||
<div class="block"><i>Use
|
<div class="block"><i>Use
|
||||||
<a href="org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[], int, int, int, int, int, int)"><code>TJCompressor.setSourceImage(byte[], int, int, int, int, int, int)</code></a> instead.</i></div>
|
<a href="org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[],%20int,%20int,%20int,%20int,%20int,%20int)"><code>TJCompressor.setSourceImage(byte[], int, int, int, int, int, int)</code></a> instead.</i></div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
@@ -201,9 +191,9 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr class="altColor">
|
<tr class="altColor">
|
||||||
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJCompressor.html#TJCompressor(byte[], int, int, int, int)">org.libjpegturbo.turbojpeg.TJCompressor(byte[], int, int, int, int)</a>
|
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJCompressor.html#TJCompressor(byte[],%20int,%20int,%20int,%20int)">org.libjpegturbo.turbojpeg.TJCompressor(byte[], int, int, int, int)</a>
|
||||||
<div class="block"><i>Use
|
<div class="block"><i>Use
|
||||||
<a href="org/libjpegturbo/turbojpeg/TJCompressor.html#TJCompressor(byte[], int, int, int, int, int, int)"><code>TJCompressor.TJCompressor(byte[], int, int, int, int, int, int)</code></a> instead.</i></div>
|
<a href="org/libjpegturbo/turbojpeg/TJCompressor.html#TJCompressor(byte[],%20int,%20int,%20int,%20int,%20int,%20int)"><code>TJCompressor.TJCompressor(byte[], int, int, int, int, int, int)</code></a> instead.</i></div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|||||||
@@ -63,20 +63,20 @@
|
|||||||
</a>
|
</a>
|
||||||
<h2 class="title">B</h2>
|
<h2 class="title">B</h2>
|
||||||
<dl>
|
<dl>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJ.html#bufSize(int, int, int)">bufSize(int, int, int)</a></span> - Static method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg">TJ</a></dt>
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJ.html#bufSize(int,%20int,%20int)">bufSize(int, int, int)</a></span> - Static method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg">TJ</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<div class="block">Returns the maximum size of the buffer (in bytes) required to hold a JPEG
|
<div class="block">Returns the maximum size of the buffer (in bytes) required to hold a JPEG
|
||||||
image with the given width, height, and level of chrominance subsampling.</div>
|
image with the given width, height, and level of chrominance subsampling.</div>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJ.html#bufSizeYUV(int, int, int, int)">bufSizeYUV(int, int, int, int)</a></span> - Static method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg">TJ</a></dt>
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJ.html#bufSizeYUV(int,%20int,%20int,%20int)">bufSizeYUV(int, int, int, int)</a></span> - Static method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg">TJ</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<div class="block">Returns the size of the buffer (in bytes) required to hold a YUV planar
|
<div class="block">Returns the size of the buffer (in bytes) required to hold a YUV planar
|
||||||
image with the given width, height, and level of chrominance subsampling.</div>
|
image with the given width, height, and level of chrominance subsampling.</div>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJ.html#bufSizeYUV(int, int, int)">bufSizeYUV(int, int, int)</a></span> - Static method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg">TJ</a></dt>
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJ.html#bufSizeYUV(int,%20int,%20int)">bufSizeYUV(int, int, int)</a></span> - Static method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg">TJ</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<div class="block"><span class="strong">Deprecated.</span>
|
<div class="block"><span class="strong">Deprecated.</span>
|
||||||
<div class="block"><i>Use <a href="./org/libjpegturbo/turbojpeg/TJ.html#bufSizeYUV(int, int, int, int)"><code>TJ.bufSizeYUV(int, int, int, int)</code></a> instead.</i></div>
|
<div class="block"><i>Use <a href="./org/libjpegturbo/turbojpeg/TJ.html#bufSizeYUV(int,%20int,%20int,%20int)"><code>TJ.bufSizeYUV(int, int, int, int)</code></a> instead.</i></div>
|
||||||
</div>
|
</div>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
@@ -97,7 +97,7 @@
|
|||||||
<dd>
|
<dd>
|
||||||
<div class="block">Free the native structures associated with this decompressor instance.</div>
|
<div class="block">Free the native structures associated with this decompressor instance.</div>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJCompressor.html#compress(byte[], int)">compress(byte[], int)</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg">TJCompressor</a></dt>
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJCompressor.html#compress(byte[],%20int)">compress(byte[], int)</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg">TJCompressor</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<div class="block">Compress the uncompressed source image associated with this compressor
|
<div class="block">Compress the uncompressed source image associated with this compressor
|
||||||
instance and output a JPEG image to the given destination buffer.</div>
|
instance and output a JPEG image to the given destination buffer.</div>
|
||||||
@@ -107,19 +107,19 @@
|
|||||||
<div class="block">Compress the uncompressed source image associated with this compressor
|
<div class="block">Compress the uncompressed source image associated with this compressor
|
||||||
instance and return a buffer containing a JPEG image.</div>
|
instance and return a buffer containing a JPEG image.</div>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJCompressor.html#compress(java.awt.image.BufferedImage, byte[], int)">compress(BufferedImage, byte[], int)</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg">TJCompressor</a></dt>
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJCompressor.html#compress(java.awt.image.BufferedImage,%20byte[],%20int)">compress(BufferedImage, byte[], int)</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg">TJCompressor</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<div class="block"><span class="strong">Deprecated.</span>
|
<div class="block"><span class="strong">Deprecated.</span>
|
||||||
<div class="block"><i>Use
|
<div class="block"><i>Use
|
||||||
<a href="./org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(java.awt.image.BufferedImage, int, int, int, int)"><code>TJCompressor.setSourceImage(BufferedImage, int, int, int, int)</code></a> and
|
<a href="./org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(java.awt.image.BufferedImage,%20int,%20int,%20int,%20int)"><code>TJCompressor.setSourceImage(BufferedImage, int, int, int, int)</code></a> and
|
||||||
<a href="./org/libjpegturbo/turbojpeg/TJCompressor.html#compress(byte[], int)"><code>TJCompressor.compress(byte[], int)</code></a> instead.</i></div>
|
<a href="./org/libjpegturbo/turbojpeg/TJCompressor.html#compress(byte[],%20int)"><code>TJCompressor.compress(byte[], int)</code></a> instead.</i></div>
|
||||||
</div>
|
</div>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJCompressor.html#compress(java.awt.image.BufferedImage, int)">compress(BufferedImage, int)</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg">TJCompressor</a></dt>
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJCompressor.html#compress(java.awt.image.BufferedImage,%20int)">compress(BufferedImage, int)</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg">TJCompressor</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<div class="block"><span class="strong">Deprecated.</span>
|
<div class="block"><span class="strong">Deprecated.</span>
|
||||||
<div class="block"><i>Use
|
<div class="block"><i>Use
|
||||||
<a href="./org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(java.awt.image.BufferedImage, int, int, int, int)"><code>TJCompressor.setSourceImage(BufferedImage, int, int, int, int)</code></a> and
|
<a href="./org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(java.awt.image.BufferedImage,%20int,%20int,%20int,%20int)"><code>TJCompressor.setSourceImage(BufferedImage, int, int, int, int)</code></a> and
|
||||||
<a href="./org/libjpegturbo/turbojpeg/TJCompressor.html#compress(int)"><code>TJCompressor.compress(int)</code></a> instead.</i></div>
|
<a href="./org/libjpegturbo/turbojpeg/TJCompressor.html#compress(int)"><code>TJCompressor.compress(int)</code></a> instead.</i></div>
|
||||||
</div>
|
</div>
|
||||||
</dd>
|
</dd>
|
||||||
@@ -143,7 +143,7 @@
|
|||||||
<dd>
|
<dd>
|
||||||
<div class="block">YCCK colorspace.</div>
|
<div class="block">YCCK colorspace.</div>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJCustomFilter.html#customFilter(java.nio.ShortBuffer, java.awt.Rectangle, java.awt.Rectangle, int, int, org.libjpegturbo.turbojpeg.TJTransform)">customFilter(ShortBuffer, Rectangle, Rectangle, int, int, TJTransform)</a></span> - Method in interface org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJCustomFilter.html" title="interface in org.libjpegturbo.turbojpeg">TJCustomFilter</a></dt>
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJCustomFilter.html#customFilter(java.nio.ShortBuffer,%20java.awt.Rectangle,%20java.awt.Rectangle,%20int,%20int,%20org.libjpegturbo.turbojpeg.TJTransform)">customFilter(ShortBuffer, Rectangle, Rectangle, int, int, TJTransform)</a></span> - Method in interface org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJCustomFilter.html" title="interface in org.libjpegturbo.turbojpeg">TJCustomFilter</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<div class="block">A callback function that can be used to modify the DCT coefficients after
|
<div class="block">A callback function that can be used to modify the DCT coefficients after
|
||||||
they are losslessly transformed but before they are transcoded to a new
|
they are losslessly transformed but before they are transcoded to a new
|
||||||
@@ -155,64 +155,70 @@
|
|||||||
</a>
|
</a>
|
||||||
<h2 class="title">D</h2>
|
<h2 class="title">D</h2>
|
||||||
<dl>
|
<dl>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(byte[], int, int, int, int, int, int, int)">decompress(byte[], int, int, int, int, int, int, int)</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a></dt>
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(byte[],%20int,%20int,%20int,%20int,%20int,%20int,%20int)">decompress(byte[], int, int, int, int, int, int, int)</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<div class="block">Decompress the JPEG source image or decode the YUV source image associated
|
<div class="block">Decompress the JPEG source image or decode the YUV source image associated
|
||||||
with this decompressor instance and output a grayscale, RGB, or CMYK image
|
with this decompressor instance and output a grayscale, RGB, or CMYK image
|
||||||
to the given destination buffer.</div>
|
to the given destination buffer.</div>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(byte[], int, int, int, int, int)">decompress(byte[], int, int, int, int, int)</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a></dt>
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(byte[],%20int,%20int,%20int,%20int,%20int)">decompress(byte[], int, int, int, int, int)</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<div class="block"><span class="strong">Deprecated.</span>
|
<div class="block"><span class="strong">Deprecated.</span>
|
||||||
<div class="block"><i>Use
|
<div class="block"><i>Use
|
||||||
<a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(byte[], int, int, int, int, int, int, int)"><code>TJDecompressor.decompress(byte[], int, int, int, int, int, int, int)</code></a> instead.</i></div>
|
<a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(byte[],%20int,%20int,%20int,%20int,%20int,%20int,%20int)"><code>TJDecompressor.decompress(byte[], int, int, int, int, int, int, int)</code></a> instead.</i></div>
|
||||||
</div>
|
</div>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(int, int, int, int, int)">decompress(int, int, int, int, int)</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a></dt>
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(int,%20int,%20int,%20int,%20int)">decompress(int, int, int, int, int)</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<div class="block">Decompress the JPEG source image associated with this decompressor
|
<div class="block">Decompress the JPEG source image associated with this decompressor
|
||||||
instance and return a buffer containing the decompressed image.</div>
|
instance and return a buffer containing the decompressed image.</div>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(int[], int, int, int, int, int, int, int)">decompress(int[], int, int, int, int, int, int, int)</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a></dt>
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(int[],%20int,%20int,%20int,%20int,%20int,%20int,%20int)">decompress(int[], int, int, int, int, int, int, int)</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<div class="block">Decompress the JPEG source image or decode the YUV source image associated
|
<div class="block">Decompress the JPEG source image or decode the YUV source image associated
|
||||||
with this decompressor instance and output a grayscale, RGB, or CMYK image
|
with this decompressor instance and output a grayscale, RGB, or CMYK image
|
||||||
to the given destination buffer.</div>
|
to the given destination buffer.</div>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(java.awt.image.BufferedImage, int)">decompress(BufferedImage, int)</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a></dt>
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(java.awt.image.BufferedImage,%20int)">decompress(BufferedImage, int)</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<div class="block">Decompress the JPEG source image or decode the YUV source image associated
|
<div class="block">Decompress the JPEG source image or decode the YUV source image associated
|
||||||
with this decompressor instance and output a decompressed/decoded image to
|
with this decompressor instance and output a decompressed/decoded image to
|
||||||
the given <code>BufferedImage</code> instance.</div>
|
the given <code>BufferedImage</code> instance.</div>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(int, int, int, int)">decompress(int, int, int, int)</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a></dt>
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(int,%20int,%20int,%20int)">decompress(int, int, int, int)</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<div class="block">Decompress the JPEG source image or decode the YUV source image associated
|
<div class="block">Decompress the JPEG source image or decode the YUV source image associated
|
||||||
with this decompressor instance and return a <code>BufferedImage</code>
|
with this decompressor instance and return a <code>BufferedImage</code>
|
||||||
instance containing the decompressed/decoded image.</div>
|
instance containing the decompressed/decoded image.</div>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(org.libjpegturbo.turbojpeg.YUVImage, int)">decompressToYUV(YUVImage, int)</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a></dt>
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(org.libjpegturbo.turbojpeg.YUVImage,%20int)">decompressToYUV(YUVImage, int)</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<div class="block">Decompress the JPEG source image associated with this decompressor
|
<div class="block">Decompress the JPEG source image associated with this decompressor
|
||||||
instance into a YUV planar image and store it in the given
|
instance into a YUV planar image and store it in the given
|
||||||
<code>YUVImage</code> instance.</div>
|
<code>YUVImage</code> instance.</div>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(byte[], int)">decompressToYUV(byte[], int)</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a></dt>
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(byte[],%20int)">decompressToYUV(byte[], int)</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<div class="block"><span class="strong">Deprecated.</span>
|
<div class="block"><span class="strong">Deprecated.</span>
|
||||||
<div class="block"><i>Use <a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(org.libjpegturbo.turbojpeg.YUVImage, int)"><code>TJDecompressor.decompressToYUV(YUVImage, int)</code></a> instead.</i></div>
|
<div class="block"><i>Use <a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(org.libjpegturbo.turbojpeg.YUVImage,%20int)"><code>TJDecompressor.decompressToYUV(YUVImage, int)</code></a> instead.</i></div>
|
||||||
</div>
|
</div>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(int, int, int, int)">decompressToYUV(int, int, int, int)</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a></dt>
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(int,%20int[],%20int,%20int)">decompressToYUV(int, int[], int, int)</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<div class="block">Decompress the JPEG source image associated with this decompressor
|
<div class="block">Decompress the JPEG source image associated with this decompressor
|
||||||
instance into a YUV planar image and return a <code>YUVImage</code>
|
instance into a set of Y, U (Cb), and V (Cr) image planes and return a
|
||||||
instance containing the decompressed image.</div>
|
<code>YUVImage</code> instance containing the decompressed image planes.</div>
|
||||||
|
</dd>
|
||||||
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(int,%20int,%20int,%20int)">decompressToYUV(int, int, int, int)</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a></dt>
|
||||||
|
<dd>
|
||||||
|
<div class="block">Decompress the JPEG source image associated with this decompressor
|
||||||
|
instance into a unified YUV planar image buffer and return a
|
||||||
|
<code>YUVImage</code> instance containing the decompressed image.</div>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(int)">decompressToYUV(int)</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a></dt>
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(int)">decompressToYUV(int)</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<div class="block"><span class="strong">Deprecated.</span>
|
<div class="block"><span class="strong">Deprecated.</span>
|
||||||
<div class="block"><i>Use <a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(int, int, int, int)"><code>TJDecompressor.decompressToYUV(int, int, int, int)</code></a> instead.</i></div>
|
<div class="block"><i>Use <a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(int,%20int,%20int,%20int)"><code>TJDecompressor.decompressToYUV(int, int, int, int)</code></a> instead.</i></div>
|
||||||
</div>
|
</div>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
@@ -221,44 +227,50 @@
|
|||||||
</a>
|
</a>
|
||||||
<h2 class="title">E</h2>
|
<h2 class="title">E</h2>
|
||||||
<dl>
|
<dl>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(org.libjpegturbo.turbojpeg.YUVImage, int)">encodeYUV(YUVImage, int)</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg">TJCompressor</a></dt>
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(org.libjpegturbo.turbojpeg.YUVImage,%20int)">encodeYUV(YUVImage, int)</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg">TJCompressor</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<div class="block">Encode the uncompressed source image associated with this compressor
|
<div class="block">Encode the uncompressed source image associated with this compressor
|
||||||
instance into a YUV planar image and store it in the given
|
instance into a YUV planar image and store it in the given
|
||||||
<code>YUVImage</code> instance.</div>
|
<code>YUVImage</code> instance.</div>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(byte[], int)">encodeYUV(byte[], int)</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg">TJCompressor</a></dt>
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(byte[],%20int)">encodeYUV(byte[], int)</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg">TJCompressor</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<div class="block"><span class="strong">Deprecated.</span>
|
<div class="block"><span class="strong">Deprecated.</span>
|
||||||
<div class="block"><i>Use <a href="./org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(org.libjpegturbo.turbojpeg.YUVImage, int)"><code>TJCompressor.encodeYUV(YUVImage, int)</code></a> instead.</i></div>
|
<div class="block"><i>Use <a href="./org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(org.libjpegturbo.turbojpeg.YUVImage,%20int)"><code>TJCompressor.encodeYUV(YUVImage, int)</code></a> instead.</i></div>
|
||||||
</div>
|
</div>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(int, int)">encodeYUV(int, int)</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg">TJCompressor</a></dt>
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(int,%20int)">encodeYUV(int, int)</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg">TJCompressor</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<div class="block">Encode the uncompressed source image associated with this compressor
|
<div class="block">Encode the uncompressed source image associated with this compressor
|
||||||
instance into a YUV planar image and return a <code>YUVImage</code>
|
instance into a unified YUV planar image buffer and return a
|
||||||
instance containing the encoded image.</div>
|
<code>YUVImage</code> instance containing the encoded image.</div>
|
||||||
|
</dd>
|
||||||
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(int[],%20int)">encodeYUV(int[], int)</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg">TJCompressor</a></dt>
|
||||||
|
<dd>
|
||||||
|
<div class="block">Encode the uncompressed source image associated with this compressor
|
||||||
|
instance into separate Y, U (Cb), and V (Cr) image planes and return a
|
||||||
|
<code>YUVImage</code> instance containing the encoded image planes.</div>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(int)">encodeYUV(int)</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg">TJCompressor</a></dt>
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(int)">encodeYUV(int)</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg">TJCompressor</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<div class="block"><span class="strong">Deprecated.</span>
|
<div class="block"><span class="strong">Deprecated.</span>
|
||||||
<div class="block"><i>Use <a href="./org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(int, int)"><code>TJCompressor.encodeYUV(int, int)</code></a> instead.</i></div>
|
<div class="block"><i>Use <a href="./org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(int,%20int)"><code>TJCompressor.encodeYUV(int, int)</code></a> instead.</i></div>
|
||||||
</div>
|
</div>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(java.awt.image.BufferedImage, byte[], int)">encodeYUV(BufferedImage, byte[], int)</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg">TJCompressor</a></dt>
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(java.awt.image.BufferedImage,%20byte[],%20int)">encodeYUV(BufferedImage, byte[], int)</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg">TJCompressor</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<div class="block"><span class="strong">Deprecated.</span>
|
<div class="block"><span class="strong">Deprecated.</span>
|
||||||
<div class="block"><i>Use
|
<div class="block"><i>Use
|
||||||
<a href="./org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(java.awt.image.BufferedImage, int, int, int, int)"><code>TJCompressor.setSourceImage(BufferedImage, int, int, int, int)</code></a> and
|
<a href="./org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(java.awt.image.BufferedImage,%20int,%20int,%20int,%20int)"><code>TJCompressor.setSourceImage(BufferedImage, int, int, int, int)</code></a> and
|
||||||
<a href="./org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(byte[], int)"><code>TJCompressor.encodeYUV(byte[], int)</code></a> instead.</i></div>
|
<a href="./org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(byte[],%20int)"><code>TJCompressor.encodeYUV(byte[], int)</code></a> instead.</i></div>
|
||||||
</div>
|
</div>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(java.awt.image.BufferedImage, int)">encodeYUV(BufferedImage, int)</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg">TJCompressor</a></dt>
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(java.awt.image.BufferedImage,%20int)">encodeYUV(BufferedImage, int)</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg">TJCompressor</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<div class="block"><span class="strong">Deprecated.</span>
|
<div class="block"><span class="strong">Deprecated.</span>
|
||||||
<div class="block"><i>Use
|
<div class="block"><i>Use
|
||||||
<a href="./org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(java.awt.image.BufferedImage, int, int, int, int)"><code>TJCompressor.setSourceImage(BufferedImage, int, int, int, int)</code></a> and
|
<a href="./org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(java.awt.image.BufferedImage,%20int,%20int,%20int,%20int)"><code>TJCompressor.setSourceImage(BufferedImage, int, int, int, int)</code></a> and
|
||||||
<a href="./org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(int)"><code>TJCompressor.encodeYUV(int)</code></a> instead.</i></div>
|
<a href="./org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(int,%20int)"><code>TJCompressor.encodeYUV(int, int)</code></a> instead.</i></div>
|
||||||
</div>
|
</div>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJScalingFactor.html#equals(org.libjpegturbo.turbojpeg.TJScalingFactor)">equals(TJScalingFactor)</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg">TJScalingFactor</a></dt>
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJScalingFactor.html#equals(org.libjpegturbo.turbojpeg.TJScalingFactor)">equals(TJScalingFactor)</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg">TJScalingFactor</a></dt>
|
||||||
@@ -325,7 +337,8 @@
|
|||||||
</dd>
|
</dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/YUVImage.html#getBuf()">getBuf()</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a></dt>
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/YUVImage.html#getBuf()">getBuf()</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<div class="block">Returns the YUV image buffer</div>
|
<div class="block">Returns the YUV image buffer (if this image is stored in a unified
|
||||||
|
buffer rather than separate image planes.)</div>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html#getColorspace()">getColorspace()</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a></dt>
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html#getColorspace()">getColorspace()</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
@@ -335,7 +348,7 @@
|
|||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJCompressor.html#getCompressedSize()">getCompressedSize()</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg">TJCompressor</a></dt>
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJCompressor.html#getCompressedSize()">getCompressedSize()</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg">TJCompressor</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<div class="block">Returns the size of the image (in bytes) generated by the most recent
|
<div class="block">Returns the size of the image (in bytes) generated by the most recent
|
||||||
compress/encode operation.</div>
|
compress operation.</div>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJScalingFactor.html#getDenom()">getDenom()</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg">TJScalingFactor</a></dt>
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJScalingFactor.html#getDenom()">getDenom()</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg">TJScalingFactor</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
@@ -353,19 +366,16 @@
|
|||||||
</dd>
|
</dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/YUVImage.html#getHeight()">getHeight()</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a></dt>
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/YUVImage.html#getHeight()">getHeight()</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<div class="block">Returns the height of the YUV image.</div>
|
<div class="block">Returns the height of the YUV image (or subregion.)</div>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html#getJPEGBuf()">getJPEGBuf()</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a></dt>
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html#getJPEGBuf()">getJPEGBuf()</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<div class="block"><span class="strong">Deprecated.</span>
|
<div class="block">Returns the JPEG image buffer associated with this decompressor instance.</div>
|
||||||
<div class="block"><i>Use <a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html#getSourceBuf()"><code>TJDecompressor.getSourceBuf()</code></a> instead.</i></div>
|
|
||||||
</div>
|
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html#getJPEGSize()">getJPEGSize()</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a></dt>
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html#getJPEGSize()">getJPEGSize()</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<div class="block"><span class="strong">Deprecated.</span>
|
<div class="block">Returns the size of the JPEG image (in bytes) associated with this
|
||||||
<div class="block"><i>Use <a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html#getSourceSize()"><code>TJDecompressor.getSourceSize()</code></a> instead.</i></div>
|
decompressor instance.</div>
|
||||||
</div>
|
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJ.html#getMCUHeight(int)">getMCUHeight(int)</a></span> - Static method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg">TJ</a></dt>
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJ.html#getMCUHeight(int)">getMCUHeight(int)</a></span> - Static method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg">TJ</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
@@ -381,14 +391,24 @@
|
|||||||
<dd>
|
<dd>
|
||||||
<div class="block">Returns numerator</div>
|
<div class="block">Returns numerator</div>
|
||||||
</dd>
|
</dd>
|
||||||
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/YUVImage.html#getOffsets()">getOffsets()</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a></dt>
|
||||||
|
<dd>
|
||||||
|
<div class="block">Returns the offsets (in bytes) of each plane within the planes of a larger
|
||||||
|
YUV image.</div>
|
||||||
|
</dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/YUVImage.html#getPad()">getPad()</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a></dt>
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/YUVImage.html#getPad()">getPad()</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<div class="block">Returns the line padding used in the YUV image buffer.</div>
|
<div class="block">Returns the line padding used in the YUV image buffer (if this image is
|
||||||
|
stored in a unified buffer rather than separate image planes.)</div>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJ.html#getPixelSize(int)">getPixelSize(int)</a></span> - Static method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg">TJ</a></dt>
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJ.html#getPixelSize(int)">getPixelSize(int)</a></span> - Static method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg">TJ</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<div class="block">Returns the pixel size (in bytes) for the given pixel format.</div>
|
<div class="block">Returns the pixel size (in bytes) for the given pixel format.</div>
|
||||||
</dd>
|
</dd>
|
||||||
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/YUVImage.html#getPlanes()">getPlanes()</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a></dt>
|
||||||
|
<dd>
|
||||||
|
<div class="block">Returns the YUV image planes.</div>
|
||||||
|
</dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJ.html#getRedOffset(int)">getRedOffset(int)</a></span> - Static method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg">TJ</a></dt>
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJ.html#getRedOffset(int)">getRedOffset(int)</a></span> - Static method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg">TJ</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<div class="block">For the given pixel format, returns the number of bytes that the red
|
<div class="block">For the given pixel format, returns the number of bytes that the red
|
||||||
@@ -398,13 +418,13 @@
|
|||||||
<dd>
|
<dd>
|
||||||
<div class="block">Returns the scaled value of <code>dimension</code>.</div>
|
<div class="block">Returns the scaled value of <code>dimension</code>.</div>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html#getScaledHeight(int, int)">getScaledHeight(int, int)</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a></dt>
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html#getScaledHeight(int,%20int)">getScaledHeight(int, int)</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<div class="block">Returns the height of the largest scaled-down image that the TurboJPEG
|
<div class="block">Returns the height 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
|
||||||
height.</div>
|
height.</div>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html#getScaledWidth(int, int)">getScaledWidth(int, int)</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a></dt>
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html#getScaledWidth(int,%20int)">getScaledWidth(int, int)</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<div class="block">Returns the width of the largest scaled-down image that the TurboJPEG
|
<div class="block">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
|
||||||
@@ -417,17 +437,12 @@
|
|||||||
</dd>
|
</dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/YUVImage.html#getSize()">getSize()</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a></dt>
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/YUVImage.html#getSize()">getSize()</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<div class="block">Returns the size (in bytes) of the YUV image buffer</div>
|
<div class="block">Returns the size (in bytes) of the YUV image buffer (if this image is
|
||||||
|
stored in a unified buffer rather than separate image planes.)</div>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html#getSourceBuf()">getSourceBuf()</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a></dt>
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/YUVImage.html#getStrides()">getStrides()</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<div class="block">Returns the source image buffer associated with this decompressor
|
<div class="block">Returns the number of bytes per line of each plane in the YUV image.</div>
|
||||||
instance.</div>
|
|
||||||
</dd>
|
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html#getSourceSize()">getSourceSize()</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a></dt>
|
|
||||||
<dd>
|
|
||||||
<div class="block">Returns the size of the source image (in bytes) associated with this
|
|
||||||
decompressor instance.</div>
|
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html#getSubsamp()">getSubsamp()</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a></dt>
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html#getSubsamp()">getSubsamp()</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
@@ -450,7 +465,7 @@
|
|||||||
</dd>
|
</dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/YUVImage.html#getWidth()">getWidth()</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a></dt>
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/YUVImage.html#getWidth()">getWidth()</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<div class="block">Returns the width of the YUV image.</div>
|
<div class="block">Returns the width of the YUV image (or subregion.)</div>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<a name="_H_">
|
<a name="_H_">
|
||||||
@@ -483,6 +498,14 @@
|
|||||||
<dd> </dd>
|
<dd> </dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html#jpegBufSize">jpegBufSize</a></span> - Variable in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a></dt>
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html#jpegBufSize">jpegBufSize</a></span> - Variable in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a></dt>
|
||||||
<dd> </dd>
|
<dd> </dd>
|
||||||
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html#jpegColorspace">jpegColorspace</a></span> - Variable in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a></dt>
|
||||||
|
<dd> </dd>
|
||||||
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html#jpegHeight">jpegHeight</a></span> - Variable in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a></dt>
|
||||||
|
<dd> </dd>
|
||||||
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html#jpegSubsamp">jpegSubsamp</a></span> - Variable in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a></dt>
|
||||||
|
<dd> </dd>
|
||||||
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html#jpegWidth">jpegWidth</a></span> - Variable in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a></dt>
|
||||||
|
<dd> </dd>
|
||||||
</dl>
|
</dl>
|
||||||
<a name="_N_">
|
<a name="_N_">
|
||||||
<!-- -->
|
<!-- -->
|
||||||
@@ -559,12 +582,12 @@
|
|||||||
</dd>
|
</dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJTransform.html#OPT_NOOUTPUT">OPT_NOOUTPUT</a></span> - Static variable in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</a></dt>
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJTransform.html#OPT_NOOUTPUT">OPT_NOOUTPUT</a></span> - Static variable in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<div class="block">This option will prevent <a href="./org/libjpegturbo/turbojpeg/TJTransformer.html#transform(byte[][], org.libjpegturbo.turbojpeg.TJTransform[], int)"><code>TJTransformer.transform()</code></a> from outputting a JPEG image for this
|
<div class="block">This option will prevent <a href="./org/libjpegturbo/turbojpeg/TJTransformer.html#transform(byte[][],%20org.libjpegturbo.turbojpeg.TJTransform[],%20int)"><code>TJTransformer.transform()</code></a> from outputting a JPEG image for this
|
||||||
particular transform.</div>
|
particular transform.</div>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJTransform.html#OPT_PERFECT">OPT_PERFECT</a></span> - Static variable in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</a></dt>
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJTransform.html#OPT_PERFECT">OPT_PERFECT</a></span> - Static variable in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<div class="block">This option will cause <a href="./org/libjpegturbo/turbojpeg/TJTransformer.html#transform(byte[][], org.libjpegturbo.turbojpeg.TJTransform[], int)"><code>TJTransformer.transform()</code></a> to throw an exception if the transform is not
|
<div class="block">This option will cause <a href="./org/libjpegturbo/turbojpeg/TJTransformer.html#transform(byte[][],%20org.libjpegturbo.turbojpeg.TJTransform[],%20int)"><code>TJTransformer.transform()</code></a> to throw an exception if the transform is not
|
||||||
perfect.</div>
|
perfect.</div>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJTransform.html#OPT_TRIM">OPT_TRIM</a></span> - Static variable in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</a></dt>
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJTransform.html#OPT_TRIM">OPT_TRIM</a></span> - Static variable in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</a></dt>
|
||||||
@@ -632,6 +655,19 @@
|
|||||||
<dd>
|
<dd>
|
||||||
<div class="block">XRGB pixel format.</div>
|
<div class="block">XRGB pixel format.</div>
|
||||||
</dd>
|
</dd>
|
||||||
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJ.html#planeHeight(int,%20int,%20int)">planeHeight(int, int, int)</a></span> - Static method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg">TJ</a></dt>
|
||||||
|
<dd>
|
||||||
|
<div class="block">Returns the plane height of a YUV image plane with the given parameters.</div>
|
||||||
|
</dd>
|
||||||
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJ.html#planeSizeYUV(int,%20int,%20int,%20int,%20int)">planeSizeYUV(int, int, int, int, int)</a></span> - Static method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg">TJ</a></dt>
|
||||||
|
<dd>
|
||||||
|
<div class="block">Returns the size of the buffer (in bytes) required to hold a YUV image
|
||||||
|
plane with the given parameters.</div>
|
||||||
|
</dd>
|
||||||
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJ.html#planeWidth(int,%20int,%20int)">planeWidth(int, int, int)</a></span> - Static method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg">TJ</a></dt>
|
||||||
|
<dd>
|
||||||
|
<div class="block">Returns the plane width of a YUV image plane with the given parameters.</div>
|
||||||
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<a name="_S_">
|
<a name="_S_">
|
||||||
<!-- -->
|
<!-- -->
|
||||||
@@ -662,34 +698,37 @@
|
|||||||
<dd>
|
<dd>
|
||||||
<div class="block">Grayscale.</div>
|
<div class="block">Grayscale.</div>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/YUVImage.html#setBuf(byte[], int, int, int, int)">setBuf(byte[], int, int, int, int)</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a></dt>
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/YUVImage.html#setBuf(byte[][],%20int[],%20int,%20int[],%20int,%20int)">setBuf(byte[][], int[], int, int[], int, int)</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<div class="block">Assign an existing YUV planar image buffer to this <code>YUVImage</code>
|
<div class="block">Assign a set of image planes to this <code>YUVImage</code> instance.</div>
|
||||||
instance.</div>
|
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html#setJPEGImage(byte[], int)">setJPEGImage(byte[], int)</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a></dt>
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/YUVImage.html#setBuf(byte[],%20int,%20int,%20int,%20int)">setBuf(byte[], int, int, int, int)</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a></dt>
|
||||||
|
<dd>
|
||||||
|
<div class="block">Assign a unified image buffer to this <code>YUVImage</code> instance.</div>
|
||||||
|
</dd>
|
||||||
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html#setJPEGImage(byte[],%20int)">setJPEGImage(byte[], int)</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<div class="block"><span class="strong">Deprecated.</span>
|
<div class="block"><span class="strong">Deprecated.</span>
|
||||||
<div class="block"><i>Use <a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html#setSourceImage(byte[], int)"><code>TJDecompressor.setSourceImage(byte[], int)</code></a> instead.</i></div>
|
<div class="block"><i>Use <a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html#setSourceImage(byte[],%20int)"><code>TJDecompressor.setSourceImage(byte[], int)</code></a> instead.</i></div>
|
||||||
</div>
|
</div>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJCompressor.html#setJPEGQuality(int)">setJPEGQuality(int)</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg">TJCompressor</a></dt>
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJCompressor.html#setJPEGQuality(int)">setJPEGQuality(int)</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg">TJCompressor</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<div class="block">Set the JPEG image quality level for subsequent compress operations.</div>
|
<div class="block">Set the JPEG image quality level for subsequent compress operations.</div>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[], int, int, int, int, int, int)">setSourceImage(byte[], int, int, int, int, int, int)</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg">TJCompressor</a></dt>
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[],%20int,%20int,%20int,%20int,%20int,%20int)">setSourceImage(byte[], int, int, int, int, int, int)</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg">TJCompressor</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<div class="block">Associate an uncompressed RGB, grayscale, or CMYK source image with this
|
<div class="block">Associate an uncompressed RGB, grayscale, or CMYK source image with this
|
||||||
compressor instance.</div>
|
compressor instance.</div>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[], int, int, int, int)">setSourceImage(byte[], int, int, int, int)</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg">TJCompressor</a></dt>
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[],%20int,%20int,%20int,%20int)">setSourceImage(byte[], int, int, int, int)</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg">TJCompressor</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<div class="block"><span class="strong">Deprecated.</span>
|
<div class="block"><span class="strong">Deprecated.</span>
|
||||||
<div class="block"><i>Use
|
<div class="block"><i>Use
|
||||||
<a href="./org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[], int, int, int, int, int, int)"><code>TJCompressor.setSourceImage(byte[], int, int, int, int, int, int)</code></a> instead.</i></div>
|
<a href="./org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[],%20int,%20int,%20int,%20int,%20int,%20int)"><code>TJCompressor.setSourceImage(byte[], int, int, int, int, int, int)</code></a> instead.</i></div>
|
||||||
</div>
|
</div>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(java.awt.image.BufferedImage, int, int, int, int)">setSourceImage(BufferedImage, int, int, int, int)</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg">TJCompressor</a></dt>
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(java.awt.image.BufferedImage,%20int,%20int,%20int,%20int)">setSourceImage(BufferedImage, int, int, int, int)</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg">TJCompressor</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<div class="block">Associate an uncompressed RGB or grayscale source image with this
|
<div class="block">Associate an uncompressed RGB or grayscale source image with this
|
||||||
compressor instance.</div>
|
compressor instance.</div>
|
||||||
@@ -699,10 +738,10 @@
|
|||||||
<div class="block">Associate an uncompressed YUV planar source image with this compressor
|
<div class="block">Associate an uncompressed YUV planar source image with this compressor
|
||||||
instance.</div>
|
instance.</div>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html#setSourceImage(byte[], int)">setSourceImage(byte[], int)</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a></dt>
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html#setSourceImage(byte[],%20int)">setSourceImage(byte[], int)</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<div class="block">Associate the JPEG image of length <code>imageSize</code> bytes stored in
|
<div class="block">Associate the JPEG image of length <code>imageSize</code> bytes stored in
|
||||||
<code>srcImage</code> with this decompressor instance.</div>
|
<code>jpegImage</code> with this decompressor instance.</div>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html#setSourceImage(org.libjpegturbo.turbojpeg.YUVImage)">setSourceImage(YUVImage)</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a></dt>
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html#setSourceImage(org.libjpegturbo.turbojpeg.YUVImage)">setSourceImage(YUVImage)</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
@@ -714,14 +753,6 @@
|
|||||||
<div class="block">Set the level of chrominance subsampling for subsequent compress/encode
|
<div class="block">Set the level of chrominance subsampling for subsequent compress/encode
|
||||||
operations.</div>
|
operations.</div>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html#srcColorspace">srcColorspace</a></span> - Variable in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a></dt>
|
|
||||||
<dd> </dd>
|
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html#srcHeight">srcHeight</a></span> - Variable in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a></dt>
|
|
||||||
<dd> </dd>
|
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html#srcSubsamp">srcSubsamp</a></span> - Variable in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a></dt>
|
|
||||||
<dd> </dd>
|
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html#srcWidth">srcWidth</a></span> - Variable in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a></dt>
|
|
||||||
<dd> </dd>
|
|
||||||
</dl>
|
</dl>
|
||||||
<a name="_T_">
|
<a name="_T_">
|
||||||
<!-- -->
|
<!-- -->
|
||||||
@@ -742,20 +773,20 @@
|
|||||||
<dd>
|
<dd>
|
||||||
<div class="block">Create a TurboJPEG compressor instance.</div>
|
<div class="block">Create a TurboJPEG compressor instance.</div>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJCompressor.html#TJCompressor(byte[], int, int, int, int, int, int)">TJCompressor(byte[], int, int, int, int, int, int)</a></span> - Constructor for class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg">TJCompressor</a></dt>
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJCompressor.html#TJCompressor(byte[],%20int,%20int,%20int,%20int,%20int,%20int)">TJCompressor(byte[], int, int, int, int, int, int)</a></span> - Constructor for class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg">TJCompressor</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<div class="block">Create a TurboJPEG compressor instance and associate the uncompressed
|
<div class="block">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.</div>
|
instance.</div>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJCompressor.html#TJCompressor(byte[], int, int, int, int)">TJCompressor(byte[], int, int, int, int)</a></span> - Constructor for class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg">TJCompressor</a></dt>
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJCompressor.html#TJCompressor(byte[],%20int,%20int,%20int,%20int)">TJCompressor(byte[], int, int, int, int)</a></span> - Constructor for class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg">TJCompressor</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<div class="block"><span class="strong">Deprecated.</span>
|
<div class="block"><span class="strong">Deprecated.</span>
|
||||||
<div class="block"><i>Use
|
<div class="block"><i>Use
|
||||||
<a href="./org/libjpegturbo/turbojpeg/TJCompressor.html#TJCompressor(byte[], int, int, int, int, int, int)"><code>TJCompressor.TJCompressor(byte[], int, int, int, int, int, int)</code></a> instead.</i></div>
|
<a href="./org/libjpegturbo/turbojpeg/TJCompressor.html#TJCompressor(byte[],%20int,%20int,%20int,%20int,%20int,%20int)"><code>TJCompressor.TJCompressor(byte[], int, int, int, int, int, int)</code></a> instead.</i></div>
|
||||||
</div>
|
</div>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJCompressor.html#TJCompressor(java.awt.image.BufferedImage, int, int, int, int)">TJCompressor(BufferedImage, int, int, int, int)</a></span> - Constructor for class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg">TJCompressor</a></dt>
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJCompressor.html#TJCompressor(java.awt.image.BufferedImage,%20int,%20int,%20int,%20int)">TJCompressor(BufferedImage, int, int, int, int)</a></span> - Constructor for class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg">TJCompressor</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<div class="block">Create a TurboJPEG compressor instance and associate the uncompressed
|
<div class="block">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
|
||||||
@@ -778,7 +809,7 @@
|
|||||||
<div class="block">Create a TurboJPEG decompressor instance and associate the JPEG source
|
<div class="block">Create a TurboJPEG decompressor instance and associate the JPEG source
|
||||||
image stored in <code>jpegImage</code> with the newly created instance.</div>
|
image stored in <code>jpegImage</code> with the newly created instance.</div>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html#TJDecompressor(byte[], int)">TJDecompressor(byte[], int)</a></span> - Constructor for class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a></dt>
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html#TJDecompressor(byte[],%20int)">TJDecompressor(byte[], int)</a></span> - Constructor for class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<div class="block">Create a TurboJPEG decompressor instance and associate the JPEG source
|
<div class="block">Create a TurboJPEG decompressor instance and associate the JPEG source
|
||||||
image of length <code>imageSize</code> bytes stored in
|
image of length <code>imageSize</code> bytes stored in
|
||||||
@@ -794,7 +825,7 @@
|
|||||||
<dd>
|
<dd>
|
||||||
<div class="block">Fractional scaling factor</div>
|
<div class="block">Fractional scaling factor</div>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJScalingFactor.html#TJScalingFactor(int, int)">TJScalingFactor(int, int)</a></span> - Constructor for class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg">TJScalingFactor</a></dt>
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJScalingFactor.html#TJScalingFactor(int,%20int)">TJScalingFactor(int, int)</a></span> - Constructor for class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg">TJScalingFactor</a></dt>
|
||||||
<dd> </dd>
|
<dd> </dd>
|
||||||
<dt><a href="./org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">TJTransform</span></a> - Class in <a href="./org/libjpegturbo/turbojpeg/package-summary.html">org.libjpegturbo.turbojpeg</a></dt>
|
<dt><a href="./org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">TJTransform</span></a> - Class in <a href="./org/libjpegturbo/turbojpeg/package-summary.html">org.libjpegturbo.turbojpeg</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
@@ -804,11 +835,11 @@
|
|||||||
<dd>
|
<dd>
|
||||||
<div class="block">Create a new lossless transform instance.</div>
|
<div class="block">Create a new lossless transform instance.</div>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJTransform.html#TJTransform(int, int, int, int, int, int, org.libjpegturbo.turbojpeg.TJCustomFilter)">TJTransform(int, int, int, int, int, int, TJCustomFilter)</a></span> - Constructor for class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</a></dt>
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJTransform.html#TJTransform(int,%20int,%20int,%20int,%20int,%20int,%20org.libjpegturbo.turbojpeg.TJCustomFilter)">TJTransform(int, int, int, int, int, int, TJCustomFilter)</a></span> - Constructor for class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<div class="block">Create a new lossless transform instance with the given parameters.</div>
|
<div class="block">Create a new lossless transform instance with the given parameters.</div>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJTransform.html#TJTransform(java.awt.Rectangle, int, int, org.libjpegturbo.turbojpeg.TJCustomFilter)">TJTransform(Rectangle, int, int, TJCustomFilter)</a></span> - Constructor for class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</a></dt>
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJTransform.html#TJTransform(java.awt.Rectangle,%20int,%20int,%20org.libjpegturbo.turbojpeg.TJCustomFilter)">TJTransform(Rectangle, int, int, TJCustomFilter)</a></span> - Constructor for class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<div class="block">Create a new lossless transform instance with the given parameters.</div>
|
<div class="block">Create a new lossless transform instance with the given parameters.</div>
|
||||||
</dd>
|
</dd>
|
||||||
@@ -825,19 +856,19 @@
|
|||||||
<div class="block">Create a TurboJPEG lossless transformer instance and associate the JPEG
|
<div class="block">Create a TurboJPEG lossless transformer instance and associate the JPEG
|
||||||
image stored in <code>jpegImage</code> with the newly created instance.</div>
|
image stored in <code>jpegImage</code> with the newly created instance.</div>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJTransformer.html#TJTransformer(byte[], int)">TJTransformer(byte[], int)</a></span> - Constructor for class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJTransformer.html" title="class in org.libjpegturbo.turbojpeg">TJTransformer</a></dt>
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJTransformer.html#TJTransformer(byte[],%20int)">TJTransformer(byte[], int)</a></span> - Constructor for class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJTransformer.html" title="class in org.libjpegturbo.turbojpeg">TJTransformer</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<div class="block">Create a TurboJPEG lossless transformer instance and associate the JPEG
|
<div class="block">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.</div>
|
<code>jpegImage</code> with the newly created instance.</div>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJTransformer.html#transform(byte[][], org.libjpegturbo.turbojpeg.TJTransform[], int)">transform(byte[][], TJTransform[], int)</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJTransformer.html" title="class in org.libjpegturbo.turbojpeg">TJTransformer</a></dt>
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJTransformer.html#transform(byte[][],%20org.libjpegturbo.turbojpeg.TJTransform[],%20int)">transform(byte[][], TJTransform[], int)</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJTransformer.html" title="class in org.libjpegturbo.turbojpeg">TJTransformer</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<div class="block">Losslessly transform the JPEG image associated with this transformer
|
<div class="block">Losslessly transform the JPEG image associated with this transformer
|
||||||
instance into one or more JPEG images stored in the given destination
|
instance into one or more JPEG images stored in the given destination
|
||||||
buffers.</div>
|
buffers.</div>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJTransformer.html#transform(org.libjpegturbo.turbojpeg.TJTransform[], int)">transform(TJTransform[], int)</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJTransformer.html" title="class in org.libjpegturbo.turbojpeg">TJTransformer</a></dt>
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJTransformer.html#transform(org.libjpegturbo.turbojpeg.TJTransform[],%20int)">transform(TJTransform[], int)</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJTransformer.html" title="class in org.libjpegturbo.turbojpeg">TJTransformer</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<div class="block">Losslessly transform the JPEG image associated with this transformer
|
<div class="block">Losslessly transform the JPEG image associated with this transformer
|
||||||
instance and return an array of <a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><code>TJDecompressor</code></a> instances, each of
|
instance and return an array of <a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><code>TJDecompressor</code></a> instances, each of
|
||||||
@@ -849,8 +880,6 @@
|
|||||||
</a>
|
</a>
|
||||||
<h2 class="title">Y</h2>
|
<h2 class="title">Y</h2>
|
||||||
<dl>
|
<dl>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/YUVImage.html#yuvBuf">yuvBuf</a></span> - Variable in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a></dt>
|
|
||||||
<dd> </dd>
|
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/YUVImage.html#yuvHeight">yuvHeight</a></span> - Variable in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a></dt>
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/YUVImage.html#yuvHeight">yuvHeight</a></span> - Variable in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a></dt>
|
||||||
<dd> </dd>
|
<dd> </dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html#yuvImage">yuvImage</a></span> - Variable in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a></dt>
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html#yuvImage">yuvImage</a></span> - Variable in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a></dt>
|
||||||
@@ -860,17 +889,34 @@
|
|||||||
<div class="block">This class encapsulates a YUV planar image and the metadata
|
<div class="block">This class encapsulates a YUV planar image and the metadata
|
||||||
associated with it.</div>
|
associated with it.</div>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/YUVImage.html#YUVImage(int, int, int, int)">YUVImage(int, int, int, int)</a></span> - Constructor for class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a></dt>
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/YUVImage.html#YUVImage(int,%20int[],%20int,%20int)">YUVImage(int, int[], int, int)</a></span> - Constructor for class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<div class="block">Create a <code>YUVImage</code> instance with a new image buffer.</div>
|
<div class="block">Create a new <code>YUVImage</code> instance backed by separate image
|
||||||
|
planes, and allocate memory for the image planes.</div>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/YUVImage.html#YUVImage(byte[], int, int, int, int)">YUVImage(byte[], int, int, int, int)</a></span> - Constructor for class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a></dt>
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/YUVImage.html#YUVImage(int,%20int,%20int,%20int)">YUVImage(int, int, int, int)</a></span> - Constructor for class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<div class="block">Create a <code>YUVImage</code> instance from an existing YUV planar image
|
<div class="block">Create a new <code>YUVImage</code> instance backed by a unified image
|
||||||
|
buffer, and allocate memory for the image buffer.</div>
|
||||||
|
</dd>
|
||||||
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/YUVImage.html#YUVImage(byte[][],%20int[],%20int,%20int[],%20int,%20int)">YUVImage(byte[][], int[], int, int[], int, int)</a></span> - Constructor for class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a></dt>
|
||||||
|
<dd>
|
||||||
|
<div class="block">Create a new <code>YUVImage</code> instance from a set of existing image
|
||||||
|
planes.</div>
|
||||||
|
</dd>
|
||||||
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/YUVImage.html#YUVImage(byte[],%20int,%20int,%20int,%20int)">YUVImage(byte[], int, int, int, int)</a></span> - Constructor for class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a></dt>
|
||||||
|
<dd>
|
||||||
|
<div class="block">Create a new <code>YUVImage</code> instance from an existing unified image
|
||||||
buffer.</div>
|
buffer.</div>
|
||||||
</dd>
|
</dd>
|
||||||
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/YUVImage.html#yuvOffsets">yuvOffsets</a></span> - Variable in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a></dt>
|
||||||
|
<dd> </dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/YUVImage.html#yuvPad">yuvPad</a></span> - Variable in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a></dt>
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/YUVImage.html#yuvPad">yuvPad</a></span> - Variable in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a></dt>
|
||||||
<dd> </dd>
|
<dd> </dd>
|
||||||
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/YUVImage.html#yuvPlanes">yuvPlanes</a></span> - Variable in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a></dt>
|
||||||
|
<dd> </dd>
|
||||||
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/YUVImage.html#yuvStrides">yuvStrides</a></span> - Variable in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a></dt>
|
||||||
|
<dd> </dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/YUVImage.html#yuvSubsamp">yuvSubsamp</a></span> - Variable in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a></dt>
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/YUVImage.html#yuvSubsamp">yuvSubsamp</a></span> - Variable in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a></dt>
|
||||||
<dd> </dd>
|
<dd> </dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/YUVImage.html#yuvWidth">yuvWidth</a></span> - Variable in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a></dt>
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/YUVImage.html#yuvWidth">yuvWidth</a></span> - Variable in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a></dt>
|
||||||
|
|||||||
@@ -10,6 +10,12 @@
|
|||||||
if (targetPage.indexOf(":") != -1 || (targetPage != "" && !validURL(targetPage)))
|
if (targetPage.indexOf(":") != -1 || (targetPage != "" && !validURL(targetPage)))
|
||||||
targetPage = "undefined";
|
targetPage = "undefined";
|
||||||
function validURL(url) {
|
function validURL(url) {
|
||||||
|
try {
|
||||||
|
url = decodeURIComponent(url);
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
var pos = url.indexOf(".html");
|
var pos = url.indexOf(".html");
|
||||||
if (pos == -1 || pos != url.length - 5)
|
if (pos == -1 || pos != url.length - 5)
|
||||||
return false;
|
return false;
|
||||||
@@ -21,7 +27,8 @@
|
|||||||
if ('a' <= ch && ch <= 'z' ||
|
if ('a' <= ch && ch <= 'z' ||
|
||||||
'A' <= ch && ch <= 'Z' ||
|
'A' <= ch && ch <= 'Z' ||
|
||||||
ch == '$' ||
|
ch == '$' ||
|
||||||
ch == '_') {
|
ch == '_' ||
|
||||||
|
ch.charCodeAt(0) > 127) {
|
||||||
allowNumber = true;
|
allowNumber = true;
|
||||||
allowSep = true;
|
allowSep = true;
|
||||||
} else if ('0' <= ch && ch <= '9'
|
} else if ('0' <= ch && ch <= '9'
|
||||||
|
|||||||
@@ -355,7 +355,7 @@ extends java.lang.Object</pre>
|
|||||||
</tr>
|
</tr>
|
||||||
<tr class="altColor">
|
<tr class="altColor">
|
||||||
<td class="colFirst"><code>static int</code></td>
|
<td class="colFirst"><code>static int</code></td>
|
||||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#bufSize(int, int, int)">bufSize</a></strong>(int width,
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#bufSize(int,%20int,%20int)">bufSize</a></strong>(int width,
|
||||||
int height,
|
int height,
|
||||||
int jpegSubsamp)</code>
|
int jpegSubsamp)</code>
|
||||||
<div class="block">Returns the maximum size of the buffer (in bytes) required to hold a JPEG
|
<div class="block">Returns the maximum size of the buffer (in bytes) required to hold a JPEG
|
||||||
@@ -364,17 +364,17 @@ extends java.lang.Object</pre>
|
|||||||
</tr>
|
</tr>
|
||||||
<tr class="rowColor">
|
<tr class="rowColor">
|
||||||
<td class="colFirst"><code>static int</code></td>
|
<td class="colFirst"><code>static int</code></td>
|
||||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#bufSizeYUV(int, int, int)">bufSizeYUV</a></strong>(int width,
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#bufSizeYUV(int,%20int,%20int)">bufSizeYUV</a></strong>(int width,
|
||||||
int height,
|
int height,
|
||||||
int subsamp)</code>
|
int subsamp)</code>
|
||||||
<div class="block"><strong>Deprecated.</strong>
|
<div class="block"><strong>Deprecated.</strong>
|
||||||
<div class="block"><i>Use <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#bufSizeYUV(int, int, int, int)"><code>bufSizeYUV(int, int, int, int)</code></a> instead.</i></div>
|
<div class="block"><i>Use <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#bufSizeYUV(int,%20int,%20int,%20int)"><code>bufSizeYUV(int, int, int, int)</code></a> instead.</i></div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="altColor">
|
<tr class="altColor">
|
||||||
<td class="colFirst"><code>static int</code></td>
|
<td class="colFirst"><code>static int</code></td>
|
||||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#bufSizeYUV(int, int, int, int)">bufSizeYUV</a></strong>(int width,
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#bufSizeYUV(int,%20int,%20int,%20int)">bufSizeYUV</a></strong>(int width,
|
||||||
int pad,
|
int pad,
|
||||||
int height,
|
int height,
|
||||||
int subsamp)</code>
|
int subsamp)</code>
|
||||||
@@ -430,6 +430,33 @@ extends java.lang.Object</pre>
|
|||||||
this implementation of TurboJPEG supports.</div>
|
this implementation of TurboJPEG supports.</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr class="altColor">
|
||||||
|
<td class="colFirst"><code>static int</code></td>
|
||||||
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#planeHeight(int,%20int,%20int)">planeHeight</a></strong>(int componentID,
|
||||||
|
int height,
|
||||||
|
int subsamp)</code>
|
||||||
|
<div class="block">Returns the plane height of a YUV image plane with the given parameters.</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="rowColor">
|
||||||
|
<td class="colFirst"><code>static int</code></td>
|
||||||
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#planeSizeYUV(int,%20int,%20int,%20int,%20int)">planeSizeYUV</a></strong>(int componentID,
|
||||||
|
int width,
|
||||||
|
int stride,
|
||||||
|
int height,
|
||||||
|
int subsamp)</code>
|
||||||
|
<div class="block">Returns the size of the buffer (in bytes) required to hold a YUV image
|
||||||
|
plane with the given parameters.</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="altColor">
|
||||||
|
<td class="colFirst"><code>static int</code></td>
|
||||||
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#planeWidth(int,%20int,%20int)">planeWidth</a></strong>(int componentID,
|
||||||
|
int width,
|
||||||
|
int subsamp)</code>
|
||||||
|
<div class="block">Returns the plane width of a YUV image plane with the given parameters.</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<ul class="blockList">
|
<ul class="blockList">
|
||||||
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
|
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
|
||||||
@@ -962,7 +989,8 @@ public static final int FLAG_FORCESSE3</pre>
|
|||||||
subsampling.</div>
|
subsampling.</div>
|
||||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>subsamp</code> - the level of chrominance subsampling (one of
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>subsamp</code> - the level of chrominance subsampling (one of
|
||||||
<code>SAMP_*</code>)</dd>
|
<code>SAMP_*</code>)</dd>
|
||||||
<dt><span class="strong">Returns:</span></dt><dd>the MCU block width for the given level of chrominance subsampling</dd>
|
<dt><span class="strong">Returns:</span></dt><dd>the MCU block width for the given level of chrominance
|
||||||
|
subsampling.</dd>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code>java.lang.Exception</code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
@@ -980,7 +1008,7 @@ public static final int FLAG_FORCESSE3</pre>
|
|||||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>subsamp</code> - the level of chrominance subsampling (one of
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>subsamp</code> - the level of chrominance subsampling (one of
|
||||||
<code>SAMP_*</code>)</dd>
|
<code>SAMP_*</code>)</dd>
|
||||||
<dt><span class="strong">Returns:</span></dt><dd>the MCU block height for the given level of chrominance
|
<dt><span class="strong">Returns:</span></dt><dd>the MCU block height for the given level of chrominance
|
||||||
subsampling</dd>
|
subsampling.</dd>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code>java.lang.Exception</code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
@@ -995,7 +1023,7 @@ public static final int FLAG_FORCESSE3</pre>
|
|||||||
throws java.lang.Exception</pre>
|
throws java.lang.Exception</pre>
|
||||||
<div class="block">Returns the pixel size (in bytes) for the given pixel format.</div>
|
<div class="block">Returns the pixel size (in bytes) for the given pixel format.</div>
|
||||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>pixelFormat</code> - the pixel format (one of <code>PF_*</code>)</dd>
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>pixelFormat</code> - the pixel format (one of <code>PF_*</code>)</dd>
|
||||||
<dt><span class="strong">Returns:</span></dt><dd>the pixel size (in bytes) for the given pixel format</dd>
|
<dt><span class="strong">Returns:</span></dt><dd>the pixel size (in bytes) for the given pixel format.</dd>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code>java.lang.Exception</code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
@@ -1014,7 +1042,7 @@ public static final int FLAG_FORCESSE3</pre>
|
|||||||
then the red component will be
|
then the red component will be
|
||||||
<code>pixel[TJ.getRedOffset(TJ.PF_BGRX)]</code>.</div>
|
<code>pixel[TJ.getRedOffset(TJ.PF_BGRX)]</code>.</div>
|
||||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>pixelFormat</code> - the pixel format (one of <code>PF_*</code>)</dd>
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>pixelFormat</code> - the pixel format (one of <code>PF_*</code>)</dd>
|
||||||
<dt><span class="strong">Returns:</span></dt><dd>the red offset for the given pixel format</dd>
|
<dt><span class="strong">Returns:</span></dt><dd>the red offset for the given pixel format.</dd>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code>java.lang.Exception</code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
@@ -1033,7 +1061,7 @@ public static final int FLAG_FORCESSE3</pre>
|
|||||||
then the green component will be
|
then the green component will be
|
||||||
<code>pixel[TJ.getGreenOffset(TJ.PF_BGRX)]</code>.</div>
|
<code>pixel[TJ.getGreenOffset(TJ.PF_BGRX)]</code>.</div>
|
||||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>pixelFormat</code> - the pixel format (one of <code>PF_*</code>)</dd>
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>pixelFormat</code> - the pixel format (one of <code>PF_*</code>)</dd>
|
||||||
<dt><span class="strong">Returns:</span></dt><dd>the green offset for the given pixel format</dd>
|
<dt><span class="strong">Returns:</span></dt><dd>the green offset for the given pixel format.</dd>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code>java.lang.Exception</code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
@@ -1052,7 +1080,7 @@ public static final int FLAG_FORCESSE3</pre>
|
|||||||
then the blue component will be
|
then the blue component will be
|
||||||
<code>pixel[TJ.getBlueOffset(TJ.PF_BGRX)]</code>.</div>
|
<code>pixel[TJ.getBlueOffset(TJ.PF_BGRX)]</code>.</div>
|
||||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>pixelFormat</code> - the pixel format (one of <code>PF_*</code>)</dd>
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>pixelFormat</code> - the pixel format (one of <code>PF_*</code>)</dd>
|
||||||
<dt><span class="strong">Returns:</span></dt><dd>the blue offset for the given pixel format</dd>
|
<dt><span class="strong">Returns:</span></dt><dd>the blue offset for the given pixel format.</dd>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code>java.lang.Exception</code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
@@ -1072,7 +1100,7 @@ public static final int FLAG_FORCESSE3</pre>
|
|||||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>width</code> - the width (in pixels) of the JPEG image</dd><dd><code>height</code> - the height (in pixels) of the JPEG image</dd><dd><code>jpegSubsamp</code> - the level of chrominance subsampling to be used when
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>width</code> - the width (in pixels) of the JPEG image</dd><dd><code>height</code> - the height (in pixels) of the JPEG image</dd><dd><code>jpegSubsamp</code> - the level of chrominance subsampling to be used when
|
||||||
generating the JPEG image (one of <a href="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><code>TJ.SAMP_*</code></a>)</dd>
|
generating the JPEG image (one of <a href="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><code>TJ.SAMP_*</code></a>)</dd>
|
||||||
<dt><span class="strong">Returns:</span></dt><dd>the maximum size of the buffer (in bytes) required to hold a JPEG
|
<dt><span class="strong">Returns:</span></dt><dd>the maximum size of the buffer (in bytes) required to hold a JPEG
|
||||||
image with the given width, height, and level of chrominance subsampling</dd>
|
image with the given width, height, and level of chrominance subsampling.</dd>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code>java.lang.Exception</code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
@@ -1091,11 +1119,10 @@ public static final int FLAG_FORCESSE3</pre>
|
|||||||
<div class="block">Returns the size of the buffer (in bytes) required to hold a YUV planar
|
<div class="block">Returns the size of the buffer (in bytes) required to hold a YUV planar
|
||||||
image with the given width, height, and level of chrominance subsampling.</div>
|
image with the given width, height, and level of chrominance subsampling.</div>
|
||||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>width</code> - the width (in pixels) of the YUV image</dd><dd><code>pad</code> - the width of each line in each plane of the image is padded to
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>width</code> - the width (in pixels) of the YUV image</dd><dd><code>pad</code> - the width of each line in each plane of the image is padded to
|
||||||
the nearest multiple of this number of bytes (must be a power of
|
the nearest multiple of this number of bytes (must be a power of 2.)</dd><dd><code>height</code> - the height (in pixels) of the YUV image</dd><dd><code>subsamp</code> - the level of chrominance subsampling used in the YUV
|
||||||
2.)</dd><dd><code>height</code> - the height (in pixels) of the YUV image</dd><dd><code>subsamp</code> - the level of chrominance subsampling used in the YUV
|
|
||||||
image (one of <a href="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><code>TJ.SAMP_*</code></a>)</dd>
|
image (one of <a href="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><code>TJ.SAMP_*</code></a>)</dd>
|
||||||
<dt><span class="strong">Returns:</span></dt><dd>the size of the buffer (in bytes) required to hold a YUV planar
|
<dt><span class="strong">Returns:</span></dt><dd>the size of the buffer (in bytes) required to hold a YUV planar
|
||||||
image with the given width, height, and level of chrominance subsampling</dd>
|
image with the given width, height, and level of chrominance subsampling.</dd>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code>java.lang.Exception</code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
@@ -1111,11 +1138,76 @@ public static int bufSizeYUV(int width,
|
|||||||
int height,
|
int height,
|
||||||
int subsamp)
|
int subsamp)
|
||||||
throws java.lang.Exception</pre>
|
throws java.lang.Exception</pre>
|
||||||
<div class="block"><span class="strong">Deprecated.</span> <i>Use <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#bufSizeYUV(int, int, int, int)"><code>bufSizeYUV(int, int, int, int)</code></a> instead.</i></div>
|
<div class="block"><span class="strong">Deprecated.</span> <i>Use <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#bufSizeYUV(int,%20int,%20int,%20int)"><code>bufSizeYUV(int, int, int, int)</code></a> instead.</i></div>
|
||||||
<dl><dt><span class="strong">Throws:</span></dt>
|
<dl><dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code>java.lang.Exception</code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
<a name="planeSizeYUV(int, int, int, int, int)">
|
||||||
|
<!-- -->
|
||||||
|
</a>
|
||||||
|
<ul class="blockList">
|
||||||
|
<li class="blockList">
|
||||||
|
<h4>planeSizeYUV</h4>
|
||||||
|
<pre>public static int planeSizeYUV(int componentID,
|
||||||
|
int width,
|
||||||
|
int stride,
|
||||||
|
int height,
|
||||||
|
int subsamp)
|
||||||
|
throws java.lang.Exception</pre>
|
||||||
|
<div class="block">Returns the size of the buffer (in bytes) required to hold a YUV image
|
||||||
|
plane with the given parameters.</div>
|
||||||
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>componentID</code> - ID number of the image plane (0 = Y, 1 = U/Cb,
|
||||||
|
2 = V/Cr)</dd><dd><code>width</code> - width (in pixels) of the YUV image. NOTE: this is the width
|
||||||
|
of the whole image, not the plane width.</dd><dd><code>stride</code> - bytes per line in the image plane.</dd><dd><code>height</code> - height (in pixels) of the YUV image. NOTE: this is the
|
||||||
|
height of the whole image, not the plane height.</dd><dd><code>subsamp</code> - the level of chrominance subsampling used in the YUV
|
||||||
|
image (one of <a href="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><code>TJ.SAMP_*</code></a>)</dd>
|
||||||
|
<dt><span class="strong">Returns:</span></dt><dd>the size of the buffer (in bytes) required to hold a YUV planar
|
||||||
|
image with the given parameters.</dd>
|
||||||
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
|
<dd><code>java.lang.Exception</code></dd></dl>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<a name="planeWidth(int, int, int)">
|
||||||
|
<!-- -->
|
||||||
|
</a>
|
||||||
|
<ul class="blockList">
|
||||||
|
<li class="blockList">
|
||||||
|
<h4>planeWidth</h4>
|
||||||
|
<pre>public static int planeWidth(int componentID,
|
||||||
|
int width,
|
||||||
|
int subsamp)
|
||||||
|
throws java.lang.Exception</pre>
|
||||||
|
<div class="block">Returns the plane width of a YUV image plane with the given parameters.
|
||||||
|
Refer to <a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>YUVImage</code></a> for a description of plane width.</div>
|
||||||
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>componentID</code> - ID number of the image plane (0 = Y, 1 = U/Cb,
|
||||||
|
2 = V/Cr)</dd><dd><code>width</code> - width (in pixels) of the YUV image</dd><dd><code>subsamp</code> - the level of chrominance subsampling used in the YUV image
|
||||||
|
(one of <a href="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><code>TJ.SAMP_*</code></a>)</dd>
|
||||||
|
<dt><span class="strong">Returns:</span></dt><dd>the plane width of a YUV image plane with the given parameters.</dd>
|
||||||
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
|
<dd><code>java.lang.Exception</code></dd></dl>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<a name="planeHeight(int, int, int)">
|
||||||
|
<!-- -->
|
||||||
|
</a>
|
||||||
|
<ul class="blockList">
|
||||||
|
<li class="blockList">
|
||||||
|
<h4>planeHeight</h4>
|
||||||
|
<pre>public static int planeHeight(int componentID,
|
||||||
|
int height,
|
||||||
|
int subsamp)
|
||||||
|
throws java.lang.Exception</pre>
|
||||||
|
<div class="block">Returns the plane height of a YUV image plane with the given parameters.
|
||||||
|
Refer to <a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>YUVImage</code></a> for a description of plane height.</div>
|
||||||
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>componentID</code> - ID number of the image plane (0 = Y, 1 = U/Cb,
|
||||||
|
2 = V/Cr)</dd><dd><code>height</code> - height (in pixels) of the YUV image</dd><dd><code>subsamp</code> - the level of chrominance subsampling used in the YUV image
|
||||||
|
(one of <a href="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><code>TJ.SAMP_*</code></a>)</dd>
|
||||||
|
<dt><span class="strong">Returns:</span></dt><dd>the plane height of a YUV image plane with the given parameters.</dd>
|
||||||
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
|
<dd><code>java.lang.Exception</code></dd></dl>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
<a name="getScalingFactors()">
|
<a name="getScalingFactors()">
|
||||||
<!-- -->
|
<!-- -->
|
||||||
</a>
|
</a>
|
||||||
@@ -1127,7 +1219,7 @@ public static int bufSizeYUV(int width,
|
|||||||
<div class="block">Returns a list of fractional scaling factors that the JPEG decompressor in
|
<div class="block">Returns a list of fractional scaling factors that the JPEG decompressor in
|
||||||
this implementation of TurboJPEG supports.</div>
|
this implementation of TurboJPEG supports.</div>
|
||||||
<dl><dt><span class="strong">Returns:</span></dt><dd>a list of fractional scaling factors that the JPEG decompressor in
|
<dl><dt><span class="strong">Returns:</span></dt><dd>a list of fractional scaling factors that the JPEG decompressor in
|
||||||
this implementation of TurboJPEG supports</dd>
|
this implementation of TurboJPEG supports.</dd>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code>java.lang.Exception</code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@@ -118,7 +118,7 @@ extends java.lang.Object</pre>
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="rowColor">
|
<tr class="rowColor">
|
||||||
<td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#TJCompressor(java.awt.image.BufferedImage, int, int, int, int)">TJCompressor</a></strong>(java.awt.image.BufferedImage srcImage,
|
<td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#TJCompressor(java.awt.image.BufferedImage,%20int,%20int,%20int,%20int)">TJCompressor</a></strong>(java.awt.image.BufferedImage srcImage,
|
||||||
int x,
|
int x,
|
||||||
int y,
|
int y,
|
||||||
int width,
|
int width,
|
||||||
@@ -129,19 +129,19 @@ extends java.lang.Object</pre>
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="altColor">
|
<tr class="altColor">
|
||||||
<td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#TJCompressor(byte[], int, int, int, int)">TJCompressor</a></strong>(byte[] srcImage,
|
<td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#TJCompressor(byte[],%20int,%20int,%20int,%20int)">TJCompressor</a></strong>(byte[] srcImage,
|
||||||
int width,
|
int width,
|
||||||
int pitch,
|
int pitch,
|
||||||
int height,
|
int height,
|
||||||
int pixelFormat)</code>
|
int pixelFormat)</code>
|
||||||
<div class="block"><strong>Deprecated.</strong>
|
<div class="block"><strong>Deprecated.</strong>
|
||||||
<div class="block"><i>Use
|
<div class="block"><i>Use
|
||||||
<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#TJCompressor(byte[], int, int, int, int, int, int)"><code>TJCompressor(byte[], int, int, int, int, int, int)</code></a> instead.</i></div>
|
<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#TJCompressor(byte[],%20int,%20int,%20int,%20int,%20int,%20int)"><code>TJCompressor(byte[], int, int, int, int, int, int)</code></a> instead.</i></div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="rowColor">
|
<tr class="rowColor">
|
||||||
<td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#TJCompressor(byte[], int, int, int, int, int, int)">TJCompressor</a></strong>(byte[] srcImage,
|
<td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#TJCompressor(byte[],%20int,%20int,%20int,%20int,%20int,%20int)">TJCompressor</a></strong>(byte[] srcImage,
|
||||||
int x,
|
int x,
|
||||||
int y,
|
int y,
|
||||||
int width,
|
int width,
|
||||||
@@ -176,30 +176,30 @@ extends java.lang.Object</pre>
|
|||||||
</tr>
|
</tr>
|
||||||
<tr class="rowColor">
|
<tr class="rowColor">
|
||||||
<td class="colFirst"><code>void</code></td>
|
<td class="colFirst"><code>void</code></td>
|
||||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#compress(java.awt.image.BufferedImage, byte[], int)">compress</a></strong>(java.awt.image.BufferedImage srcImage,
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#compress(java.awt.image.BufferedImage,%20byte[],%20int)">compress</a></strong>(java.awt.image.BufferedImage srcImage,
|
||||||
byte[] dstBuf,
|
byte[] dstBuf,
|
||||||
int flags)</code>
|
int flags)</code>
|
||||||
<div class="block"><strong>Deprecated.</strong>
|
<div class="block"><strong>Deprecated.</strong>
|
||||||
<div class="block"><i>Use
|
<div class="block"><i>Use
|
||||||
<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(java.awt.image.BufferedImage, int, int, int, int)"><code>setSourceImage(BufferedImage, int, int, int, int)</code></a> and
|
<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(java.awt.image.BufferedImage,%20int,%20int,%20int,%20int)"><code>setSourceImage(BufferedImage, int, int, int, int)</code></a> and
|
||||||
<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#compress(byte[], int)"><code>compress(byte[], int)</code></a> instead.</i></div>
|
<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#compress(byte[],%20int)"><code>compress(byte[], int)</code></a> instead.</i></div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="altColor">
|
<tr class="altColor">
|
||||||
<td class="colFirst"><code>byte[]</code></td>
|
<td class="colFirst"><code>byte[]</code></td>
|
||||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#compress(java.awt.image.BufferedImage, int)">compress</a></strong>(java.awt.image.BufferedImage srcImage,
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#compress(java.awt.image.BufferedImage,%20int)">compress</a></strong>(java.awt.image.BufferedImage srcImage,
|
||||||
int flags)</code>
|
int flags)</code>
|
||||||
<div class="block"><strong>Deprecated.</strong>
|
<div class="block"><strong>Deprecated.</strong>
|
||||||
<div class="block"><i>Use
|
<div class="block"><i>Use
|
||||||
<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(java.awt.image.BufferedImage, int, int, int, int)"><code>setSourceImage(BufferedImage, int, int, int, int)</code></a> and
|
<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(java.awt.image.BufferedImage,%20int,%20int,%20int,%20int)"><code>setSourceImage(BufferedImage, int, int, int, int)</code></a> and
|
||||||
<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#compress(int)"><code>compress(int)</code></a> instead.</i></div>
|
<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#compress(int)"><code>compress(int)</code></a> instead.</i></div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="rowColor">
|
<tr class="rowColor">
|
||||||
<td class="colFirst"><code>void</code></td>
|
<td class="colFirst"><code>void</code></td>
|
||||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#compress(byte[], int)">compress</a></strong>(byte[] dstBuf,
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#compress(byte[],%20int)">compress</a></strong>(byte[] dstBuf,
|
||||||
int flags)</code>
|
int flags)</code>
|
||||||
<div class="block">Compress the uncompressed source image associated with this compressor
|
<div class="block">Compress the uncompressed source image associated with this compressor
|
||||||
instance and output a JPEG image to the given destination buffer.</div>
|
instance and output a JPEG image to the given destination buffer.</div>
|
||||||
@@ -214,33 +214,33 @@ extends java.lang.Object</pre>
|
|||||||
</tr>
|
</tr>
|
||||||
<tr class="rowColor">
|
<tr class="rowColor">
|
||||||
<td class="colFirst"><code>void</code></td>
|
<td class="colFirst"><code>void</code></td>
|
||||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(java.awt.image.BufferedImage, byte[], int)">encodeYUV</a></strong>(java.awt.image.BufferedImage srcImage,
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(java.awt.image.BufferedImage,%20byte[],%20int)">encodeYUV</a></strong>(java.awt.image.BufferedImage srcImage,
|
||||||
byte[] dstBuf,
|
byte[] dstBuf,
|
||||||
int flags)</code>
|
int flags)</code>
|
||||||
<div class="block"><strong>Deprecated.</strong>
|
<div class="block"><strong>Deprecated.</strong>
|
||||||
<div class="block"><i>Use
|
<div class="block"><i>Use
|
||||||
<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(java.awt.image.BufferedImage, int, int, int, int)"><code>setSourceImage(BufferedImage, int, int, int, int)</code></a> and
|
<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(java.awt.image.BufferedImage,%20int,%20int,%20int,%20int)"><code>setSourceImage(BufferedImage, int, int, int, int)</code></a> and
|
||||||
<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(byte[], int)"><code>encodeYUV(byte[], int)</code></a> instead.</i></div>
|
<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(byte[],%20int)"><code>encodeYUV(byte[], int)</code></a> instead.</i></div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="altColor">
|
<tr class="altColor">
|
||||||
<td class="colFirst"><code>byte[]</code></td>
|
<td class="colFirst"><code>byte[]</code></td>
|
||||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(java.awt.image.BufferedImage, int)">encodeYUV</a></strong>(java.awt.image.BufferedImage srcImage,
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(java.awt.image.BufferedImage,%20int)">encodeYUV</a></strong>(java.awt.image.BufferedImage srcImage,
|
||||||
int flags)</code>
|
int flags)</code>
|
||||||
<div class="block"><strong>Deprecated.</strong>
|
<div class="block"><strong>Deprecated.</strong>
|
||||||
<div class="block"><i>Use
|
<div class="block"><i>Use
|
||||||
<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(java.awt.image.BufferedImage, int, int, int, int)"><code>setSourceImage(BufferedImage, int, int, int, int)</code></a> and
|
<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(java.awt.image.BufferedImage,%20int,%20int,%20int,%20int)"><code>setSourceImage(BufferedImage, int, int, int, int)</code></a> and
|
||||||
<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(int)"><code>encodeYUV(int)</code></a> instead.</i></div>
|
<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(int,%20int)"><code>encodeYUV(int, int)</code></a> instead.</i></div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="rowColor">
|
<tr class="rowColor">
|
||||||
<td class="colFirst"><code>void</code></td>
|
<td class="colFirst"><code>void</code></td>
|
||||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(byte[], int)">encodeYUV</a></strong>(byte[] dstBuf,
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(byte[],%20int)">encodeYUV</a></strong>(byte[] dstBuf,
|
||||||
int flags)</code>
|
int flags)</code>
|
||||||
<div class="block"><strong>Deprecated.</strong>
|
<div class="block"><strong>Deprecated.</strong>
|
||||||
<div class="block"><i>Use <a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(org.libjpegturbo.turbojpeg.YUVImage, int)"><code>encodeYUV(YUVImage, int)</code></a> instead.</i></div>
|
<div class="block"><i>Use <a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(org.libjpegturbo.turbojpeg.YUVImage,%20int)"><code>encodeYUV(YUVImage, int)</code></a> instead.</i></div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -248,48 +248,57 @@ extends java.lang.Object</pre>
|
|||||||
<td class="colFirst"><code>byte[]</code></td>
|
<td class="colFirst"><code>byte[]</code></td>
|
||||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(int)">encodeYUV</a></strong>(int flags)</code>
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(int)">encodeYUV</a></strong>(int flags)</code>
|
||||||
<div class="block"><strong>Deprecated.</strong>
|
<div class="block"><strong>Deprecated.</strong>
|
||||||
<div class="block"><i>Use <a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(int, int)"><code>encodeYUV(int, int)</code></a> instead.</i></div>
|
<div class="block"><i>Use <a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(int,%20int)"><code>encodeYUV(int, int)</code></a> instead.</i></div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="rowColor">
|
<tr class="rowColor">
|
||||||
<td class="colFirst"><code><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a></code></td>
|
<td class="colFirst"><code><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a></code></td>
|
||||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(int, int)">encodeYUV</a></strong>(int pad,
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(int[],%20int)">encodeYUV</a></strong>(int[] strides,
|
||||||
int flags)</code>
|
int flags)</code>
|
||||||
<div class="block">Encode the uncompressed source image associated with this compressor
|
<div class="block">Encode the uncompressed source image associated with this compressor
|
||||||
instance into a YUV planar image and return a <code>YUVImage</code>
|
instance into separate Y, U (Cb), and V (Cr) image planes and return a
|
||||||
instance containing the encoded image.</div>
|
<code>YUVImage</code> instance containing the encoded image planes.</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="altColor">
|
<tr class="altColor">
|
||||||
|
<td class="colFirst"><code><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a></code></td>
|
||||||
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(int,%20int)">encodeYUV</a></strong>(int pad,
|
||||||
|
int flags)</code>
|
||||||
|
<div class="block">Encode the uncompressed source image associated with this compressor
|
||||||
|
instance into a unified YUV planar image buffer and return a
|
||||||
|
<code>YUVImage</code> instance containing the encoded image.</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="rowColor">
|
||||||
<td class="colFirst"><code>void</code></td>
|
<td class="colFirst"><code>void</code></td>
|
||||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(org.libjpegturbo.turbojpeg.YUVImage, int)">encodeYUV</a></strong>(<a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a> dstImage,
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(org.libjpegturbo.turbojpeg.YUVImage,%20int)">encodeYUV</a></strong>(<a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a> dstImage,
|
||||||
int flags)</code>
|
int flags)</code>
|
||||||
<div class="block">Encode the uncompressed source image associated with this compressor
|
<div class="block">Encode the uncompressed source image associated with this compressor
|
||||||
instance into a YUV planar image and store it in the given
|
instance into a YUV planar image and store it in the given
|
||||||
<code>YUVImage</code> instance.</div>
|
<code>YUVImage</code> instance.</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="rowColor">
|
<tr class="altColor">
|
||||||
<td class="colFirst"><code>protected void</code></td>
|
<td class="colFirst"><code>protected void</code></td>
|
||||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#finalize()">finalize</a></strong>()</code> </td>
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#finalize()">finalize</a></strong>()</code> </td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="altColor">
|
<tr class="rowColor">
|
||||||
<td class="colFirst"><code>int</code></td>
|
<td class="colFirst"><code>int</code></td>
|
||||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#getCompressedSize()">getCompressedSize</a></strong>()</code>
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#getCompressedSize()">getCompressedSize</a></strong>()</code>
|
||||||
<div class="block">Returns the size of the image (in bytes) generated by the most recent
|
<div class="block">Returns the size of the image (in bytes) generated by the most recent
|
||||||
compress/encode operation.</div>
|
compress operation.</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="rowColor">
|
<tr class="altColor">
|
||||||
<td class="colFirst"><code>void</code></td>
|
<td class="colFirst"><code>void</code></td>
|
||||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setJPEGQuality(int)">setJPEGQuality</a></strong>(int quality)</code>
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setJPEGQuality(int)">setJPEGQuality</a></strong>(int quality)</code>
|
||||||
<div class="block">Set the JPEG image quality level for subsequent compress operations.</div>
|
<div class="block">Set the JPEG image quality level for subsequent compress operations.</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="altColor">
|
<tr class="rowColor">
|
||||||
<td class="colFirst"><code>void</code></td>
|
<td class="colFirst"><code>void</code></td>
|
||||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(java.awt.image.BufferedImage, int, int, int, int)">setSourceImage</a></strong>(java.awt.image.BufferedImage srcImage,
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(java.awt.image.BufferedImage,%20int,%20int,%20int,%20int)">setSourceImage</a></strong>(java.awt.image.BufferedImage srcImage,
|
||||||
int x,
|
int x,
|
||||||
int y,
|
int y,
|
||||||
int width,
|
int width,
|
||||||
@@ -298,22 +307,22 @@ extends java.lang.Object</pre>
|
|||||||
compressor instance.</div>
|
compressor instance.</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="rowColor">
|
<tr class="altColor">
|
||||||
<td class="colFirst"><code>void</code></td>
|
<td class="colFirst"><code>void</code></td>
|
||||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[], int, int, int, int)">setSourceImage</a></strong>(byte[] srcImage,
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[],%20int,%20int,%20int,%20int)">setSourceImage</a></strong>(byte[] srcImage,
|
||||||
int width,
|
int width,
|
||||||
int pitch,
|
int pitch,
|
||||||
int height,
|
int height,
|
||||||
int pixelFormat)</code>
|
int pixelFormat)</code>
|
||||||
<div class="block"><strong>Deprecated.</strong>
|
<div class="block"><strong>Deprecated.</strong>
|
||||||
<div class="block"><i>Use
|
<div class="block"><i>Use
|
||||||
<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> instead.</i></div>
|
<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[],%20int,%20int,%20int,%20int,%20int,%20int)"><code>setSourceImage(byte[], int, int, int, int, int, int)</code></a> instead.</i></div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="altColor">
|
<tr class="rowColor">
|
||||||
<td class="colFirst"><code>void</code></td>
|
<td class="colFirst"><code>void</code></td>
|
||||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[], int, int, int, int, int, int)">setSourceImage</a></strong>(byte[] srcImage,
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[],%20int,%20int,%20int,%20int,%20int,%20int)">setSourceImage</a></strong>(byte[] srcImage,
|
||||||
int x,
|
int x,
|
||||||
int y,
|
int y,
|
||||||
int width,
|
int width,
|
||||||
@@ -324,14 +333,14 @@ extends java.lang.Object</pre>
|
|||||||
compressor instance.</div>
|
compressor instance.</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="rowColor">
|
<tr class="altColor">
|
||||||
<td class="colFirst"><code>void</code></td>
|
<td class="colFirst"><code>void</code></td>
|
||||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(org.libjpegturbo.turbojpeg.YUVImage)">setSourceImage</a></strong>(<a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a> srcImage)</code>
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(org.libjpegturbo.turbojpeg.YUVImage)">setSourceImage</a></strong>(<a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a> srcImage)</code>
|
||||||
<div class="block">Associate an uncompressed YUV planar source image with this compressor
|
<div class="block">Associate an uncompressed YUV planar source image with this compressor
|
||||||
instance.</div>
|
instance.</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="altColor">
|
<tr class="rowColor">
|
||||||
<td class="colFirst"><code>void</code></td>
|
<td class="colFirst"><code>void</code></td>
|
||||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSubsamp(int)">setSubsamp</a></strong>(int newSubsamp)</code>
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSubsamp(int)">setSubsamp</a></strong>(int newSubsamp)</code>
|
||||||
<div class="block">Set the level of chrominance subsampling for subsequent compress/encode
|
<div class="block">Set the level of chrominance subsampling for subsequent compress/encode
|
||||||
@@ -390,7 +399,7 @@ extends java.lang.Object</pre>
|
|||||||
<div class="block">Create a TurboJPEG compressor instance and associate the uncompressed
|
<div class="block">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.</div>
|
instance.</div>
|
||||||
<dl><dt><span class="strong">Parameters:</span></dt><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><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><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><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><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><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><dd><code>pixelFormat</code> - pixel format of the source image (one of
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>srcImage</code> - see <a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[],%20int,%20int,%20int,%20int,%20int,%20int)"><code>setSourceImage(byte[], int, int, int, int, int, int)</code></a> for description</dd><dd><code>x</code> - see <a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[],%20int,%20int,%20int,%20int,%20int,%20int)"><code>setSourceImage(byte[], int, int, int, int, int, int)</code></a> for description</dd><dd><code>y</code> - see <a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[],%20int,%20int,%20int,%20int,%20int,%20int)"><code>setSourceImage(byte[], int, int, int, int, int, int)</code></a> for description</dd><dd><code>width</code> - see <a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[],%20int,%20int,%20int,%20int,%20int,%20int)"><code>setSourceImage(byte[], int, int, int, int, int, int)</code></a> for description</dd><dd><code>pitch</code> - see <a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[],%20int,%20int,%20int,%20int,%20int,%20int)"><code>setSourceImage(byte[], int, int, int, int, int, int)</code></a> for description</dd><dd><code>height</code> - see <a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[],%20int,%20int,%20int,%20int,%20int,%20int)"><code>setSourceImage(byte[], int, int, int, int, int, int)</code></a> for description</dd><dd><code>pixelFormat</code> - pixel format of the source image (one of
|
||||||
<a href="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_RGB"><code>TJ.PF_*</code></a>)</dd>
|
<a href="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_RGB"><code>TJ.PF_*</code></a>)</dd>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code>java.lang.Exception</code></dd></dl>
|
||||||
@@ -410,7 +419,7 @@ public TJCompressor(byte[] srcImage,
|
|||||||
int pixelFormat)
|
int pixelFormat)
|
||||||
throws java.lang.Exception</pre>
|
throws java.lang.Exception</pre>
|
||||||
<div class="block"><span class="strong">Deprecated.</span> <i>Use
|
<div class="block"><span class="strong">Deprecated.</span> <i>Use
|
||||||
<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#TJCompressor(byte[], int, int, int, int, int, int)"><code>TJCompressor(byte[], int, int, int, int, int, int)</code></a> instead.</i></div>
|
<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#TJCompressor(byte[],%20int,%20int,%20int,%20int,%20int,%20int)"><code>TJCompressor(byte[], int, int, int, int, int, int)</code></a> instead.</i></div>
|
||||||
<dl><dt><span class="strong">Throws:</span></dt>
|
<dl><dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code>java.lang.Exception</code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
@@ -431,11 +440,11 @@ public TJCompressor(byte[] srcImage,
|
|||||||
source image stored in <code>srcImage</code> with the newly created
|
source image stored in <code>srcImage</code> with the newly created
|
||||||
instance.</div>
|
instance.</div>
|
||||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>srcImage</code> - see
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>srcImage</code> - see
|
||||||
<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(java.awt.image.BufferedImage, int, int, int, int)"><code>setSourceImage(BufferedImage, int, int, int, int)</code></a> for description</dd><dd><code>x</code> - see
|
<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(java.awt.image.BufferedImage,%20int,%20int,%20int,%20int)"><code>setSourceImage(BufferedImage, int, int, int, int)</code></a> for description</dd><dd><code>x</code> - see
|
||||||
<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(java.awt.image.BufferedImage, int, int, int, int)"><code>setSourceImage(BufferedImage, int, int, int, int)</code></a> for description</dd><dd><code>y</code> - see
|
<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(java.awt.image.BufferedImage,%20int,%20int,%20int,%20int)"><code>setSourceImage(BufferedImage, int, int, int, int)</code></a> for description</dd><dd><code>y</code> - see
|
||||||
<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(java.awt.image.BufferedImage, int, int, int, int)"><code>setSourceImage(BufferedImage, int, int, int, int)</code></a> for description</dd><dd><code>width</code> - see
|
<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(java.awt.image.BufferedImage,%20int,%20int,%20int,%20int)"><code>setSourceImage(BufferedImage, int, int, int, int)</code></a> for description</dd><dd><code>width</code> - see
|
||||||
<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(java.awt.image.BufferedImage, int, int, int, int)"><code>setSourceImage(BufferedImage, int, int, int, int)</code></a> for description</dd><dd><code>height</code> - see
|
<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(java.awt.image.BufferedImage,%20int,%20int,%20int,%20int)"><code>setSourceImage(BufferedImage, int, int, int, int)</code></a> for description</dd><dd><code>height</code> - see
|
||||||
<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(java.awt.image.BufferedImage, int, int, int, int)"><code>setSourceImage(BufferedImage, int, int, int, int)</code></a> for description</dd>
|
<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(java.awt.image.BufferedImage,%20int,%20int,%20int,%20int)"><code>setSourceImage(BufferedImage, int, int, int, int)</code></a> for description</dd>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code>java.lang.Exception</code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
@@ -496,7 +505,7 @@ public void setSourceImage(byte[] srcImage,
|
|||||||
int pixelFormat)
|
int pixelFormat)
|
||||||
throws java.lang.Exception</pre>
|
throws java.lang.Exception</pre>
|
||||||
<div class="block"><span class="strong">Deprecated.</span> <i>Use
|
<div class="block"><span class="strong">Deprecated.</span> <i>Use
|
||||||
<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> instead.</i></div>
|
<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[],%20int,%20int,%20int,%20int,%20int,%20int)"><code>setSourceImage(byte[], int, int, int, int, int, int)</code></a> instead.</i></div>
|
||||||
<dl><dt><span class="strong">Throws:</span></dt>
|
<dl><dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code>java.lang.Exception</code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
@@ -599,7 +608,7 @@ public void setSourceImage(byte[] srcImage,
|
|||||||
<div class="block">Compress the uncompressed source image associated with this compressor
|
<div class="block">Compress the uncompressed source image associated with this compressor
|
||||||
instance and output a JPEG image to the given destination buffer.</div>
|
instance and output a JPEG image to the given destination buffer.</div>
|
||||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>dstBuf</code> - buffer that will receive the JPEG image. Use
|
<dl><dt><span class="strong">Parameters:</span></dt><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,%20int,%20int)"><code>TJ.bufSize(int, int, int)</code></a> to determine the maximum size for this buffer based on
|
||||||
the source image's width and height and the desired level of chrominance
|
the source image's width and height and the desired level of chrominance
|
||||||
subsampling.</dd><dd><code>flags</code> - the bitwise OR of one or more of
|
subsampling.</dd><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></dd>
|
<a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP"><code>TJ.FLAG_*</code></a></dd>
|
||||||
@@ -637,8 +646,8 @@ public void compress(java.awt.image.BufferedImage srcImage,
|
|||||||
int flags)
|
int flags)
|
||||||
throws java.lang.Exception</pre>
|
throws java.lang.Exception</pre>
|
||||||
<div class="block"><span class="strong">Deprecated.</span> <i>Use
|
<div class="block"><span class="strong">Deprecated.</span> <i>Use
|
||||||
<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(java.awt.image.BufferedImage, int, int, int, int)"><code>setSourceImage(BufferedImage, int, int, int, int)</code></a> and
|
<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(java.awt.image.BufferedImage,%20int,%20int,%20int,%20int)"><code>setSourceImage(BufferedImage, int, int, int, int)</code></a> and
|
||||||
<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#compress(byte[], int)"><code>compress(byte[], int)</code></a> instead.</i></div>
|
<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#compress(byte[],%20int)"><code>compress(byte[], int)</code></a> instead.</i></div>
|
||||||
<dl><dt><span class="strong">Throws:</span></dt>
|
<dl><dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code>java.lang.Exception</code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
@@ -654,7 +663,7 @@ public byte[] compress(java.awt.image.BufferedImage srcImage,
|
|||||||
int flags)
|
int flags)
|
||||||
throws java.lang.Exception</pre>
|
throws java.lang.Exception</pre>
|
||||||
<div class="block"><span class="strong">Deprecated.</span> <i>Use
|
<div class="block"><span class="strong">Deprecated.</span> <i>Use
|
||||||
<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(java.awt.image.BufferedImage, int, int, int, int)"><code>setSourceImage(BufferedImage, int, int, int, int)</code></a> and
|
<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(java.awt.image.BufferedImage,%20int,%20int,%20int,%20int)"><code>setSourceImage(BufferedImage, int, int, int, int)</code></a> and
|
||||||
<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#compress(int)"><code>compress(int)</code></a> instead.</i></div>
|
<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#compress(int)"><code>compress(int)</code></a> instead.</i></div>
|
||||||
<dl><dt><span class="strong">Throws:</span></dt>
|
<dl><dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code>java.lang.Exception</code></dd></dl>
|
||||||
@@ -692,7 +701,7 @@ public byte[] compress(java.awt.image.BufferedImage srcImage,
|
|||||||
public void encodeYUV(byte[] dstBuf,
|
public void encodeYUV(byte[] dstBuf,
|
||||||
int flags)
|
int flags)
|
||||||
throws java.lang.Exception</pre>
|
throws java.lang.Exception</pre>
|
||||||
<div class="block"><span class="strong">Deprecated.</span> <i>Use <a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(org.libjpegturbo.turbojpeg.YUVImage, int)"><code>encodeYUV(YUVImage, int)</code></a> instead.</i></div>
|
<div class="block"><span class="strong">Deprecated.</span> <i>Use <a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(org.libjpegturbo.turbojpeg.YUVImage,%20int)"><code>encodeYUV(YUVImage, int)</code></a> instead.</i></div>
|
||||||
<dl><dt><span class="strong">Throws:</span></dt>
|
<dl><dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code>java.lang.Exception</code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
@@ -707,16 +716,44 @@ public void encodeYUV(byte[] dstBuf,
|
|||||||
int flags)
|
int flags)
|
||||||
throws java.lang.Exception</pre>
|
throws java.lang.Exception</pre>
|
||||||
<div class="block">Encode the uncompressed source image associated with this compressor
|
<div class="block">Encode the uncompressed source image associated with this compressor
|
||||||
instance into a YUV planar image and return a <code>YUVImage</code>
|
instance into a unified YUV planar image buffer and return a
|
||||||
instance containing the encoded image. This method uses the accelerated
|
<code>YUVImage</code> instance containing the encoded image. This method
|
||||||
color conversion routines in TurboJPEG's underlying codec but does not
|
uses the accelerated color conversion routines in TurboJPEG's underlying
|
||||||
execute any of the other steps in the JPEG compression process. Encoding
|
codec but does not execute any of the other steps in the JPEG compression
|
||||||
CMYK source images to YUV is not supported.</div>
|
process. Encoding CMYK source images to YUV is not supported.</div>
|
||||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>pad</code> - the width of each line in each plane of the YUV image will be
|
<dl><dt><span class="strong">Parameters:</span></dt><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
|
padded to the nearest multiple of this number of bytes (must be a power of
|
||||||
2.)</dd><dd><code>flags</code> - the bitwise OR of one or more of
|
2.)</dd><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></dd>
|
<a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP"><code>TJ.FLAG_*</code></a></dd>
|
||||||
<dt><span class="strong">Returns:</span></dt><dd>a YUV planar image</dd>
|
<dt><span class="strong">Returns:</span></dt><dd>a YUV planar image.</dd>
|
||||||
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
|
<dd><code>java.lang.Exception</code></dd></dl>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<a name="encodeYUV(int[], int)">
|
||||||
|
<!-- -->
|
||||||
|
</a>
|
||||||
|
<ul class="blockList">
|
||||||
|
<li class="blockList">
|
||||||
|
<h4>encodeYUV</h4>
|
||||||
|
<pre>public <a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a> encodeYUV(int[] strides,
|
||||||
|
int flags)
|
||||||
|
throws java.lang.Exception</pre>
|
||||||
|
<div class="block">Encode the uncompressed source image associated with this compressor
|
||||||
|
instance into separate Y, U (Cb), and V (Cr) image planes and return a
|
||||||
|
<code>YUVImage</code> instance containing the encoded image planes. This
|
||||||
|
method uses the accelerated color conversion routines in TurboJPEG's
|
||||||
|
underlying codec but does not execute any of the other steps in the JPEG
|
||||||
|
compression process. Encoding CMYK source images to YUV is not supported.</div>
|
||||||
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>strides</code> - an array of integers, each specifying the number of bytes
|
||||||
|
per line in the corresponding plane of the output image. Setting the
|
||||||
|
stride for any plane to 0 is the same as setting it to the component width
|
||||||
|
of the plane. If <code>strides</code> is null, then the strides for all
|
||||||
|
planes will be set to their respective component widths. You can adjust
|
||||||
|
the strides in order to add an arbitrary amount of line padding to each
|
||||||
|
plane.</dd><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></dd>
|
||||||
|
<dt><span class="strong">Returns:</span></dt><dd>a YUV planar image.</dd>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code>java.lang.Exception</code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
@@ -730,7 +767,7 @@ public void encodeYUV(byte[] dstBuf,
|
|||||||
<pre>@Deprecated
|
<pre>@Deprecated
|
||||||
public byte[] encodeYUV(int flags)
|
public byte[] encodeYUV(int flags)
|
||||||
throws java.lang.Exception</pre>
|
throws java.lang.Exception</pre>
|
||||||
<div class="block"><span class="strong">Deprecated.</span> <i>Use <a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(int, int)"><code>encodeYUV(int, int)</code></a> instead.</i></div>
|
<div class="block"><span class="strong">Deprecated.</span> <i>Use <a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(int,%20int)"><code>encodeYUV(int, int)</code></a> instead.</i></div>
|
||||||
<dl><dt><span class="strong">Throws:</span></dt>
|
<dl><dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code>java.lang.Exception</code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
@@ -747,8 +784,8 @@ public void encodeYUV(java.awt.image.BufferedImage srcImage,
|
|||||||
int flags)
|
int flags)
|
||||||
throws java.lang.Exception</pre>
|
throws java.lang.Exception</pre>
|
||||||
<div class="block"><span class="strong">Deprecated.</span> <i>Use
|
<div class="block"><span class="strong">Deprecated.</span> <i>Use
|
||||||
<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(java.awt.image.BufferedImage, int, int, int, int)"><code>setSourceImage(BufferedImage, int, int, int, int)</code></a> and
|
<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(java.awt.image.BufferedImage,%20int,%20int,%20int,%20int)"><code>setSourceImage(BufferedImage, int, int, int, int)</code></a> and
|
||||||
<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(byte[], int)"><code>encodeYUV(byte[], int)</code></a> instead.</i></div>
|
<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(byte[],%20int)"><code>encodeYUV(byte[], int)</code></a> instead.</i></div>
|
||||||
<dl><dt><span class="strong">Throws:</span></dt>
|
<dl><dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code>java.lang.Exception</code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
@@ -764,8 +801,8 @@ public byte[] encodeYUV(java.awt.image.BufferedImage srcImage,
|
|||||||
int flags)
|
int flags)
|
||||||
throws java.lang.Exception</pre>
|
throws java.lang.Exception</pre>
|
||||||
<div class="block"><span class="strong">Deprecated.</span> <i>Use
|
<div class="block"><span class="strong">Deprecated.</span> <i>Use
|
||||||
<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(java.awt.image.BufferedImage, int, int, int, int)"><code>setSourceImage(BufferedImage, int, int, int, int)</code></a> and
|
<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(java.awt.image.BufferedImage,%20int,%20int,%20int,%20int)"><code>setSourceImage(BufferedImage, int, int, int, int)</code></a> and
|
||||||
<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(int)"><code>encodeYUV(int)</code></a> instead.</i></div>
|
<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(int,%20int)"><code>encodeYUV(int, int)</code></a> instead.</i></div>
|
||||||
<dl><dt><span class="strong">Throws:</span></dt>
|
<dl><dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code>java.lang.Exception</code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
@@ -778,9 +815,9 @@ public byte[] encodeYUV(java.awt.image.BufferedImage srcImage,
|
|||||||
<h4>getCompressedSize</h4>
|
<h4>getCompressedSize</h4>
|
||||||
<pre>public int getCompressedSize()</pre>
|
<pre>public int getCompressedSize()</pre>
|
||||||
<div class="block">Returns the size of the image (in bytes) generated by the most recent
|
<div class="block">Returns the size of the image (in bytes) generated by the most recent
|
||||||
compress/encode operation.</div>
|
compress operation.</div>
|
||||||
<dl><dt><span class="strong">Returns:</span></dt><dd>the size of the image (in bytes) generated by the most recent
|
<dl><dt><span class="strong">Returns:</span></dt><dd>the size of the image (in bytes) generated by the most recent
|
||||||
compress/encode operation</dd></dl>
|
compress operation.</dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a name="close()">
|
<a name="close()">
|
||||||
|
|||||||
@@ -106,7 +106,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr class="altColor">
|
<tr class="altColor">
|
||||||
<td class="colFirst"><code>void</code></td>
|
<td class="colFirst"><code>void</code></td>
|
||||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJCustomFilter.html#customFilter(java.nio.ShortBuffer, java.awt.Rectangle, java.awt.Rectangle, int, int, org.libjpegturbo.turbojpeg.TJTransform)">customFilter</a></strong>(java.nio.ShortBuffer coeffBuffer,
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJCustomFilter.html#customFilter(java.nio.ShortBuffer,%20java.awt.Rectangle,%20java.awt.Rectangle,%20int,%20int,%20org.libjpegturbo.turbojpeg.TJTransform)">customFilter</a></strong>(java.nio.ShortBuffer coeffBuffer,
|
||||||
java.awt.Rectangle bufferRegion,
|
java.awt.Rectangle bufferRegion,
|
||||||
java.awt.Rectangle planeRegion,
|
java.awt.Rectangle planeRegion,
|
||||||
int componentID,
|
int componentID,
|
||||||
@@ -162,7 +162,7 @@
|
|||||||
<code>coeffBuffer</code> belongs (Y, Cb, and Cr have, respectively, ID's
|
<code>coeffBuffer</code> belongs (Y, Cb, and Cr have, respectively, ID's
|
||||||
of 0, 1, and 2 in typical JPEG images.)</dd><dd><code>transformID</code> - ID number of the transformed image to which
|
of 0, 1, and 2 in typical JPEG images.)</dd><dd><code>transformID</code> - ID number of the transformed image to which
|
||||||
<code>coeffBuffer</code> belongs. This is the same as the index of the
|
<code>coeffBuffer</code> belongs. This is the same as the index of the
|
||||||
transform in the <code>transforms</code> array that was passed to <a href="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#transform(byte[][], org.libjpegturbo.turbojpeg.TJTransform[], int)"><code>TJTransformer.transform()</code></a>.</dd><dd><code>transform</code> - a <a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg"><code>TJTransform</code></a> instance that specifies the
|
transform in the <code>transforms</code> array that was passed to <a href="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#transform(byte[][],%20org.libjpegturbo.turbojpeg.TJTransform[],%20int)"><code>TJTransformer.transform()</code></a>.</dd><dd><code>transform</code> - a <a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg"><code>TJTransform</code></a> instance that specifies the
|
||||||
parameters and/or cropping region for this transform</dd>
|
parameters and/or cropping region for this transform</dd>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code>java.lang.Exception</code></dd></dl>
|
||||||
|
|||||||
@@ -131,19 +131,19 @@ extends java.lang.Object</pre>
|
|||||||
</tr>
|
</tr>
|
||||||
<tr class="rowColor">
|
<tr class="rowColor">
|
||||||
<td class="colFirst"><code>protected int</code></td>
|
<td class="colFirst"><code>protected int</code></td>
|
||||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#srcColorspace">srcColorspace</a></strong></code> </td>
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#jpegColorspace">jpegColorspace</a></strong></code> </td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="altColor">
|
<tr class="altColor">
|
||||||
<td class="colFirst"><code>protected int</code></td>
|
<td class="colFirst"><code>protected int</code></td>
|
||||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#srcHeight">srcHeight</a></strong></code> </td>
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#jpegHeight">jpegHeight</a></strong></code> </td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="rowColor">
|
<tr class="rowColor">
|
||||||
<td class="colFirst"><code>protected int</code></td>
|
<td class="colFirst"><code>protected int</code></td>
|
||||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#srcSubsamp">srcSubsamp</a></strong></code> </td>
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#jpegSubsamp">jpegSubsamp</a></strong></code> </td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="altColor">
|
<tr class="altColor">
|
||||||
<td class="colFirst"><code>protected int</code></td>
|
<td class="colFirst"><code>protected int</code></td>
|
||||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#srcWidth">srcWidth</a></strong></code> </td>
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#jpegWidth">jpegWidth</a></strong></code> </td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="rowColor">
|
<tr class="rowColor">
|
||||||
<td class="colFirst"><code>protected <a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a></code></td>
|
<td class="colFirst"><code>protected <a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a></code></td>
|
||||||
@@ -175,7 +175,7 @@ extends java.lang.Object</pre>
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="altColor">
|
<tr class="altColor">
|
||||||
<td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#TJDecompressor(byte[], int)">TJDecompressor</a></strong>(byte[] jpegImage,
|
<td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#TJDecompressor(byte[],%20int)">TJDecompressor</a></strong>(byte[] jpegImage,
|
||||||
int imageSize)</code>
|
int imageSize)</code>
|
||||||
<div class="block">Create a TurboJPEG decompressor instance and associate the JPEG source
|
<div class="block">Create a TurboJPEG decompressor instance and associate the JPEG source
|
||||||
image of length <code>imageSize</code> bytes stored in
|
image of length <code>imageSize</code> bytes stored in
|
||||||
@@ -212,7 +212,7 @@ extends java.lang.Object</pre>
|
|||||||
</tr>
|
</tr>
|
||||||
<tr class="rowColor">
|
<tr class="rowColor">
|
||||||
<td class="colFirst"><code>void</code></td>
|
<td class="colFirst"><code>void</code></td>
|
||||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(java.awt.image.BufferedImage, int)">decompress</a></strong>(java.awt.image.BufferedImage dstImage,
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(java.awt.image.BufferedImage,%20int)">decompress</a></strong>(java.awt.image.BufferedImage dstImage,
|
||||||
int flags)</code>
|
int flags)</code>
|
||||||
<div class="block">Decompress the JPEG source image or decode the YUV source image associated
|
<div class="block">Decompress the JPEG source image or decode the YUV source image associated
|
||||||
with this decompressor instance and output a decompressed/decoded image to
|
with this decompressor instance and output a decompressed/decoded image to
|
||||||
@@ -221,7 +221,7 @@ extends java.lang.Object</pre>
|
|||||||
</tr>
|
</tr>
|
||||||
<tr class="altColor">
|
<tr class="altColor">
|
||||||
<td class="colFirst"><code>void</code></td>
|
<td class="colFirst"><code>void</code></td>
|
||||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(byte[], int, int, int, int, int)">decompress</a></strong>(byte[] dstBuf,
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(byte[],%20int,%20int,%20int,%20int,%20int)">decompress</a></strong>(byte[] dstBuf,
|
||||||
int desiredWidth,
|
int desiredWidth,
|
||||||
int pitch,
|
int pitch,
|
||||||
int desiredHeight,
|
int desiredHeight,
|
||||||
@@ -229,13 +229,13 @@ extends java.lang.Object</pre>
|
|||||||
int flags)</code>
|
int flags)</code>
|
||||||
<div class="block"><strong>Deprecated.</strong>
|
<div class="block"><strong>Deprecated.</strong>
|
||||||
<div class="block"><i>Use
|
<div class="block"><i>Use
|
||||||
<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> instead.</i></div>
|
<a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(byte[],%20int,%20int,%20int,%20int,%20int,%20int,%20int)"><code>decompress(byte[], int, int, int, int, int, int, int)</code></a> instead.</i></div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="rowColor">
|
<tr class="rowColor">
|
||||||
<td class="colFirst"><code>void</code></td>
|
<td class="colFirst"><code>void</code></td>
|
||||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(byte[], int, int, int, int, int, int, int)">decompress</a></strong>(byte[] dstBuf,
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(byte[],%20int,%20int,%20int,%20int,%20int,%20int,%20int)">decompress</a></strong>(byte[] dstBuf,
|
||||||
int x,
|
int x,
|
||||||
int y,
|
int y,
|
||||||
int desiredWidth,
|
int desiredWidth,
|
||||||
@@ -250,7 +250,7 @@ extends java.lang.Object</pre>
|
|||||||
</tr>
|
</tr>
|
||||||
<tr class="altColor">
|
<tr class="altColor">
|
||||||
<td class="colFirst"><code>void</code></td>
|
<td class="colFirst"><code>void</code></td>
|
||||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(int[], int, int, int, int, int, int, int)">decompress</a></strong>(int[] dstBuf,
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(int[],%20int,%20int,%20int,%20int,%20int,%20int,%20int)">decompress</a></strong>(int[] dstBuf,
|
||||||
int x,
|
int x,
|
||||||
int y,
|
int y,
|
||||||
int desiredWidth,
|
int desiredWidth,
|
||||||
@@ -265,7 +265,7 @@ extends java.lang.Object</pre>
|
|||||||
</tr>
|
</tr>
|
||||||
<tr class="rowColor">
|
<tr class="rowColor">
|
||||||
<td class="colFirst"><code>java.awt.image.BufferedImage</code></td>
|
<td class="colFirst"><code>java.awt.image.BufferedImage</code></td>
|
||||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(int, int, int, int)">decompress</a></strong>(int desiredWidth,
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(int,%20int,%20int,%20int)">decompress</a></strong>(int desiredWidth,
|
||||||
int desiredHeight,
|
int desiredHeight,
|
||||||
int bufferedImageType,
|
int bufferedImageType,
|
||||||
int flags)</code>
|
int flags)</code>
|
||||||
@@ -276,7 +276,7 @@ extends java.lang.Object</pre>
|
|||||||
</tr>
|
</tr>
|
||||||
<tr class="altColor">
|
<tr class="altColor">
|
||||||
<td class="colFirst"><code>byte[]</code></td>
|
<td class="colFirst"><code>byte[]</code></td>
|
||||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(int, int, int, int, int)">decompress</a></strong>(int desiredWidth,
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(int,%20int,%20int,%20int,%20int)">decompress</a></strong>(int desiredWidth,
|
||||||
int pitch,
|
int pitch,
|
||||||
int desiredHeight,
|
int desiredHeight,
|
||||||
int pixelFormat,
|
int pixelFormat,
|
||||||
@@ -287,10 +287,10 @@ extends java.lang.Object</pre>
|
|||||||
</tr>
|
</tr>
|
||||||
<tr class="rowColor">
|
<tr class="rowColor">
|
||||||
<td class="colFirst"><code>void</code></td>
|
<td class="colFirst"><code>void</code></td>
|
||||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(byte[], int)">decompressToYUV</a></strong>(byte[] dstBuf,
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(byte[],%20int)">decompressToYUV</a></strong>(byte[] dstBuf,
|
||||||
int flags)</code>
|
int flags)</code>
|
||||||
<div class="block"><strong>Deprecated.</strong>
|
<div class="block"><strong>Deprecated.</strong>
|
||||||
<div class="block"><i>Use <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(org.libjpegturbo.turbojpeg.YUVImage, int)"><code>decompressToYUV(YUVImage, int)</code></a> instead.</i></div>
|
<div class="block"><i>Use <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(org.libjpegturbo.turbojpeg.YUVImage,%20int)"><code>decompressToYUV(YUVImage, int)</code></a> instead.</i></div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -298,128 +298,122 @@ extends java.lang.Object</pre>
|
|||||||
<td class="colFirst"><code>byte[]</code></td>
|
<td class="colFirst"><code>byte[]</code></td>
|
||||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(int)">decompressToYUV</a></strong>(int flags)</code>
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(int)">decompressToYUV</a></strong>(int flags)</code>
|
||||||
<div class="block"><strong>Deprecated.</strong>
|
<div class="block"><strong>Deprecated.</strong>
|
||||||
<div class="block"><i>Use <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(int, int, int, int)"><code>decompressToYUV(int, int, int, int)</code></a> instead.</i></div>
|
<div class="block"><i>Use <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(int,%20int,%20int,%20int)"><code>decompressToYUV(int, int, int, int)</code></a> instead.</i></div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="rowColor">
|
<tr class="rowColor">
|
||||||
<td class="colFirst"><code><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a></code></td>
|
<td class="colFirst"><code><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a></code></td>
|
||||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(int, int, int, int)">decompressToYUV</a></strong>(int desiredWidth,
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(int,%20int[],%20int,%20int)">decompressToYUV</a></strong>(int desiredWidth,
|
||||||
|
int[] strides,
|
||||||
|
int desiredHeight,
|
||||||
|
int flags)</code>
|
||||||
|
<div class="block">Decompress the JPEG source image associated with this decompressor
|
||||||
|
instance into a set of Y, U (Cb), and V (Cr) image planes and return a
|
||||||
|
<code>YUVImage</code> instance containing the decompressed image planes.</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="altColor">
|
||||||
|
<td class="colFirst"><code><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a></code></td>
|
||||||
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(int,%20int,%20int,%20int)">decompressToYUV</a></strong>(int desiredWidth,
|
||||||
int pad,
|
int pad,
|
||||||
int desiredHeight,
|
int desiredHeight,
|
||||||
int flags)</code>
|
int flags)</code>
|
||||||
<div class="block">Decompress the JPEG source image associated with this decompressor
|
<div class="block">Decompress the JPEG source image associated with this decompressor
|
||||||
instance into a YUV planar image and return a <code>YUVImage</code>
|
instance into a unified YUV planar image buffer and return a
|
||||||
instance containing the decompressed image.</div>
|
<code>YUVImage</code> instance containing the decompressed image.</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="altColor">
|
<tr class="rowColor">
|
||||||
<td class="colFirst"><code>void</code></td>
|
<td class="colFirst"><code>void</code></td>
|
||||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(org.libjpegturbo.turbojpeg.YUVImage, int)">decompressToYUV</a></strong>(<a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a> dstImage,
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(org.libjpegturbo.turbojpeg.YUVImage,%20int)">decompressToYUV</a></strong>(<a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a> dstImage,
|
||||||
int flags)</code>
|
int flags)</code>
|
||||||
<div class="block">Decompress the JPEG source image associated with this decompressor
|
<div class="block">Decompress the JPEG source image associated with this decompressor
|
||||||
instance into a YUV planar image and store it in the given
|
instance into a YUV planar image and store it in the given
|
||||||
<code>YUVImage</code> instance.</div>
|
<code>YUVImage</code> instance.</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="rowColor">
|
<tr class="altColor">
|
||||||
<td class="colFirst"><code>protected void</code></td>
|
<td class="colFirst"><code>protected void</code></td>
|
||||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#finalize()">finalize</a></strong>()</code> </td>
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#finalize()">finalize</a></strong>()</code> </td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="altColor">
|
<tr class="rowColor">
|
||||||
<td class="colFirst"><code>int</code></td>
|
<td class="colFirst"><code>int</code></td>
|
||||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getColorspace()">getColorspace</a></strong>()</code>
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getColorspace()">getColorspace</a></strong>()</code>
|
||||||
<div class="block">Returns the colorspace used in the source image (JPEG or YUV) associated
|
<div class="block">Returns the colorspace used in the source image (JPEG or YUV) associated
|
||||||
with this decompressor instance.</div>
|
with this decompressor instance.</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="rowColor">
|
<tr class="altColor">
|
||||||
<td class="colFirst"><code>int</code></td>
|
<td class="colFirst"><code>int</code></td>
|
||||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getHeight()">getHeight</a></strong>()</code>
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getHeight()">getHeight</a></strong>()</code>
|
||||||
<div class="block">Returns the height of the source image (JPEG or YUV) associated with this
|
<div class="block">Returns the height of the source image (JPEG or YUV) associated with this
|
||||||
decompressor instance.</div>
|
decompressor instance.</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="altColor">
|
<tr class="rowColor">
|
||||||
<td class="colFirst"><code>byte[]</code></td>
|
<td class="colFirst"><code>byte[]</code></td>
|
||||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getJPEGBuf()">getJPEGBuf</a></strong>()</code>
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getJPEGBuf()">getJPEGBuf</a></strong>()</code>
|
||||||
<div class="block"><strong>Deprecated.</strong>
|
<div class="block">Returns the JPEG image buffer associated with this decompressor instance.</div>
|
||||||
<div class="block"><i>Use <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getSourceBuf()"><code>getSourceBuf()</code></a> instead.</i></div>
|
</td>
|
||||||
</div>
|
</tr>
|
||||||
|
<tr class="altColor">
|
||||||
|
<td class="colFirst"><code>int</code></td>
|
||||||
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getJPEGSize()">getJPEGSize</a></strong>()</code>
|
||||||
|
<div class="block">Returns the size of the JPEG image (in bytes) associated with this
|
||||||
|
decompressor instance.</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="rowColor">
|
<tr class="rowColor">
|
||||||
<td class="colFirst"><code>int</code></td>
|
<td class="colFirst"><code>int</code></td>
|
||||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getJPEGSize()">getJPEGSize</a></strong>()</code>
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getScaledHeight(int,%20int)">getScaledHeight</a></strong>(int desiredWidth,
|
||||||
<div class="block"><strong>Deprecated.</strong>
|
|
||||||
<div class="block"><i>Use <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getSourceSize()"><code>getSourceSize()</code></a> instead.</i></div>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr class="altColor">
|
|
||||||
<td class="colFirst"><code>int</code></td>
|
|
||||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getScaledHeight(int, int)">getScaledHeight</a></strong>(int desiredWidth,
|
|
||||||
int desiredHeight)</code>
|
int desiredHeight)</code>
|
||||||
<div class="block">Returns the height of the largest scaled-down image that the TurboJPEG
|
<div class="block">Returns the height 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
|
||||||
height.</div>
|
height.</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="rowColor">
|
<tr class="altColor">
|
||||||
<td class="colFirst"><code>int</code></td>
|
<td class="colFirst"><code>int</code></td>
|
||||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getScaledWidth(int, int)">getScaledWidth</a></strong>(int desiredWidth,
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getScaledWidth(int,%20int)">getScaledWidth</a></strong>(int desiredWidth,
|
||||||
int desiredHeight)</code>
|
int desiredHeight)</code>
|
||||||
<div class="block">Returns the width of the largest scaled-down image that the TurboJPEG
|
<div class="block">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
|
||||||
height.</div>
|
height.</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="altColor">
|
|
||||||
<td class="colFirst"><code>byte[]</code></td>
|
|
||||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getSourceBuf()">getSourceBuf</a></strong>()</code>
|
|
||||||
<div class="block">Returns the source image buffer associated with this decompressor
|
|
||||||
instance.</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr class="rowColor">
|
<tr class="rowColor">
|
||||||
<td class="colFirst"><code>int</code></td>
|
<td class="colFirst"><code>int</code></td>
|
||||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getSourceSize()">getSourceSize</a></strong>()</code>
|
|
||||||
<div class="block">Returns the size of the source image (in bytes) associated with this
|
|
||||||
decompressor instance.</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr class="altColor">
|
|
||||||
<td class="colFirst"><code>int</code></td>
|
|
||||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getSubsamp()">getSubsamp</a></strong>()</code>
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getSubsamp()">getSubsamp</a></strong>()</code>
|
||||||
<div class="block">Returns the level of chrominance subsampling used in the source image
|
<div class="block">Returns the level of chrominance subsampling used in the source image
|
||||||
(JPEG or YUV) associated with this decompressor instance.</div>
|
(JPEG or YUV) associated with this decompressor instance.</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="rowColor">
|
<tr class="altColor">
|
||||||
<td class="colFirst"><code>int</code></td>
|
<td class="colFirst"><code>int</code></td>
|
||||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getWidth()">getWidth</a></strong>()</code>
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getWidth()">getWidth</a></strong>()</code>
|
||||||
<div class="block">Returns the width of the source image (JPEG or YUV) associated with this
|
<div class="block">Returns the width of the source image (JPEG or YUV) associated with this
|
||||||
decompressor instance.</div>
|
decompressor instance.</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="altColor">
|
<tr class="rowColor">
|
||||||
<td class="colFirst"><code>void</code></td>
|
<td class="colFirst"><code>void</code></td>
|
||||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#setJPEGImage(byte[], int)">setJPEGImage</a></strong>(byte[] jpegImage,
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#setJPEGImage(byte[],%20int)">setJPEGImage</a></strong>(byte[] jpegImage,
|
||||||
int imageSize)</code>
|
int imageSize)</code>
|
||||||
<div class="block"><strong>Deprecated.</strong>
|
<div class="block"><strong>Deprecated.</strong>
|
||||||
<div class="block"><i>Use <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#setSourceImage(byte[], int)"><code>setSourceImage(byte[], int)</code></a> instead.</i></div>
|
<div class="block"><i>Use <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#setSourceImage(byte[],%20int)"><code>setSourceImage(byte[], int)</code></a> instead.</i></div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="rowColor">
|
<tr class="altColor">
|
||||||
<td class="colFirst"><code>void</code></td>
|
<td class="colFirst"><code>void</code></td>
|
||||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#setSourceImage(byte[], int)">setSourceImage</a></strong>(byte[] srcImage,
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#setSourceImage(byte[],%20int)">setSourceImage</a></strong>(byte[] jpegImage,
|
||||||
int imageSize)</code>
|
int imageSize)</code>
|
||||||
<div class="block">Associate the JPEG image of length <code>imageSize</code> bytes stored in
|
<div class="block">Associate the JPEG image of length <code>imageSize</code> bytes stored in
|
||||||
<code>srcImage</code> with this decompressor instance.</div>
|
<code>jpegImage</code> with this decompressor instance.</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="altColor">
|
<tr class="rowColor">
|
||||||
<td class="colFirst"><code>void</code></td>
|
<td class="colFirst"><code>void</code></td>
|
||||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#setSourceImage(org.libjpegturbo.turbojpeg.YUVImage)">setSourceImage</a></strong>(<a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a> srcImage)</code>
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#setSourceImage(org.libjpegturbo.turbojpeg.YUVImage)">setSourceImage</a></strong>(<a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a> srcImage)</code>
|
||||||
<div class="block">Associate the specified YUV planar source image with this decompressor
|
<div class="block">Associate the specified YUV planar source image with this decompressor
|
||||||
@@ -484,40 +478,40 @@ extends java.lang.Object</pre>
|
|||||||
<pre>protected <a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a> yuvImage</pre>
|
<pre>protected <a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a> yuvImage</pre>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a name="srcWidth">
|
<a name="jpegWidth">
|
||||||
<!-- -->
|
<!-- -->
|
||||||
</a>
|
</a>
|
||||||
<ul class="blockList">
|
<ul class="blockList">
|
||||||
<li class="blockList">
|
<li class="blockList">
|
||||||
<h4>srcWidth</h4>
|
<h4>jpegWidth</h4>
|
||||||
<pre>protected int srcWidth</pre>
|
<pre>protected int jpegWidth</pre>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a name="srcHeight">
|
<a name="jpegHeight">
|
||||||
<!-- -->
|
<!-- -->
|
||||||
</a>
|
</a>
|
||||||
<ul class="blockList">
|
<ul class="blockList">
|
||||||
<li class="blockList">
|
<li class="blockList">
|
||||||
<h4>srcHeight</h4>
|
<h4>jpegHeight</h4>
|
||||||
<pre>protected int srcHeight</pre>
|
<pre>protected int jpegHeight</pre>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a name="srcSubsamp">
|
<a name="jpegSubsamp">
|
||||||
<!-- -->
|
<!-- -->
|
||||||
</a>
|
</a>
|
||||||
<ul class="blockList">
|
<ul class="blockList">
|
||||||
<li class="blockList">
|
<li class="blockList">
|
||||||
<h4>srcSubsamp</h4>
|
<h4>jpegSubsamp</h4>
|
||||||
<pre>protected int srcSubsamp</pre>
|
<pre>protected int jpegSubsamp</pre>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a name="srcColorspace">
|
<a name="jpegColorspace">
|
||||||
<!-- -->
|
<!-- -->
|
||||||
</a>
|
</a>
|
||||||
<ul class="blockListLast">
|
<ul class="blockListLast">
|
||||||
<li class="blockList">
|
<li class="blockList">
|
||||||
<h4>srcColorspace</h4>
|
<h4>jpegColorspace</h4>
|
||||||
<pre>protected int srcColorspace</pre>
|
<pre>protected int jpegColorspace</pre>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
@@ -605,13 +599,13 @@ extends java.lang.Object</pre>
|
|||||||
<ul class="blockList">
|
<ul class="blockList">
|
||||||
<li class="blockList">
|
<li class="blockList">
|
||||||
<h4>setSourceImage</h4>
|
<h4>setSourceImage</h4>
|
||||||
<pre>public void setSourceImage(byte[] srcImage,
|
<pre>public void setSourceImage(byte[] jpegImage,
|
||||||
int imageSize)
|
int imageSize)
|
||||||
throws java.lang.Exception</pre>
|
throws java.lang.Exception</pre>
|
||||||
<div class="block">Associate the JPEG image of length <code>imageSize</code> bytes stored in
|
<div class="block">Associate the JPEG image of length <code>imageSize</code> bytes stored in
|
||||||
<code>srcImage</code> with this decompressor instance. This image will
|
<code>jpegImage</code> with this decompressor instance. This image will
|
||||||
be used as the source image for subsequent decompress operations.</div>
|
be used as the source image for subsequent decompress operations.</div>
|
||||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>srcImage</code> - JPEG image buffer</dd><dd><code>imageSize</code> - size of the JPEG image (in bytes)</dd>
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>jpegImage</code> - JPEG image buffer</dd><dd><code>imageSize</code> - size of the JPEG image (in bytes)</dd>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code>java.lang.Exception</code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
@@ -626,7 +620,7 @@ extends java.lang.Object</pre>
|
|||||||
public void setJPEGImage(byte[] jpegImage,
|
public void setJPEGImage(byte[] jpegImage,
|
||||||
int imageSize)
|
int imageSize)
|
||||||
throws java.lang.Exception</pre>
|
throws java.lang.Exception</pre>
|
||||||
<div class="block"><span class="strong">Deprecated.</span> <i>Use <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#setSourceImage(byte[], int)"><code>setSourceImage(byte[], int)</code></a> instead.</i></div>
|
<div class="block"><span class="strong">Deprecated.</span> <i>Use <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#setSourceImage(byte[],%20int)"><code>setSourceImage(byte[], int)</code></a> instead.</i></div>
|
||||||
<dl><dt><span class="strong">Throws:</span></dt>
|
<dl><dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code>java.lang.Exception</code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
@@ -659,7 +653,7 @@ public void setJPEGImage(byte[] jpegImage,
|
|||||||
<div class="block">Returns the width of the source image (JPEG or YUV) associated with this
|
<div class="block">Returns the width of the source image (JPEG or YUV) associated with this
|
||||||
decompressor instance.</div>
|
decompressor instance.</div>
|
||||||
<dl><dt><span class="strong">Returns:</span></dt><dd>the width of the source image (JPEG or YUV) associated with this
|
<dl><dt><span class="strong">Returns:</span></dt><dd>the width of the source image (JPEG or YUV) associated with this
|
||||||
decompressor instance</dd>
|
decompressor instance.</dd>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code>java.lang.Exception</code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
@@ -675,7 +669,7 @@ public void setJPEGImage(byte[] jpegImage,
|
|||||||
<div class="block">Returns the height of the source image (JPEG or YUV) associated with this
|
<div class="block">Returns the height of the source image (JPEG or YUV) associated with this
|
||||||
decompressor instance.</div>
|
decompressor instance.</div>
|
||||||
<dl><dt><span class="strong">Returns:</span></dt><dd>the height of the source image (JPEG or YUV) associated with this
|
<dl><dt><span class="strong">Returns:</span></dt><dd>the height of the source image (JPEG or YUV) associated with this
|
||||||
decompressor instance</dd>
|
decompressor instance.</dd>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code>java.lang.Exception</code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
@@ -692,7 +686,7 @@ public void setJPEGImage(byte[] jpegImage,
|
|||||||
(JPEG or YUV) associated with this decompressor instance. See
|
(JPEG or YUV) associated with this decompressor instance. See
|
||||||
<a href="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_444"><code>TJ.SAMP_*</code></a>.</div>
|
<a href="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_444"><code>TJ.SAMP_*</code></a>.</div>
|
||||||
<dl><dt><span class="strong">Returns:</span></dt><dd>the level of chrominance subsampling used in the source image
|
<dl><dt><span class="strong">Returns:</span></dt><dd>the level of chrominance subsampling used in the source image
|
||||||
(JPEG or YUV) associated with this decompressor instance</dd>
|
(JPEG or YUV) associated with this decompressor instance.</dd>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code>java.lang.Exception</code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
@@ -709,22 +703,7 @@ public void setJPEGImage(byte[] jpegImage,
|
|||||||
with this decompressor instance. See <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#CS_RGB"><code>TJ.CS_*</code></a>. If the
|
with this decompressor instance. See <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#CS_RGB"><code>TJ.CS_*</code></a>. If the
|
||||||
source image is YUV, then this always returns <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#CS_YCbCr"><code>TJ.CS_YCbCr</code></a>.</div>
|
source image is YUV, then this always returns <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#CS_YCbCr"><code>TJ.CS_YCbCr</code></a>.</div>
|
||||||
<dl><dt><span class="strong">Returns:</span></dt><dd>the colorspace used in the source image (JPEG or YUV) associated
|
<dl><dt><span class="strong">Returns:</span></dt><dd>the colorspace used in the source image (JPEG or YUV) associated
|
||||||
with this decompressor instance</dd>
|
with this decompressor instance.</dd>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
<a name="getSourceBuf()">
|
|
||||||
<!-- -->
|
|
||||||
</a>
|
|
||||||
<ul class="blockList">
|
|
||||||
<li class="blockList">
|
|
||||||
<h4>getSourceBuf</h4>
|
|
||||||
<pre>public byte[] getSourceBuf()
|
|
||||||
throws java.lang.Exception</pre>
|
|
||||||
<div class="block">Returns the source image buffer associated with this decompressor
|
|
||||||
instance.</div>
|
|
||||||
<dl><dt><span class="strong">Returns:</span></dt><dd>the source image buffer associated with this decompressor instance</dd>
|
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code>java.lang.Exception</code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
@@ -735,26 +714,10 @@ public void setJPEGImage(byte[] jpegImage,
|
|||||||
<ul class="blockList">
|
<ul class="blockList">
|
||||||
<li class="blockList">
|
<li class="blockList">
|
||||||
<h4>getJPEGBuf</h4>
|
<h4>getJPEGBuf</h4>
|
||||||
<pre>@Deprecated
|
<pre>public byte[] getJPEGBuf()
|
||||||
public byte[] getJPEGBuf()
|
|
||||||
throws java.lang.Exception</pre>
|
throws java.lang.Exception</pre>
|
||||||
<div class="block"><span class="strong">Deprecated.</span> <i>Use <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getSourceBuf()"><code>getSourceBuf()</code></a> instead.</i></div>
|
<div class="block">Returns the JPEG image buffer associated with this decompressor instance.</div>
|
||||||
<dl><dt><span class="strong">Throws:</span></dt>
|
<dl><dt><span class="strong">Returns:</span></dt><dd>the JPEG image buffer associated with this decompressor instance.</dd>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
<a name="getSourceSize()">
|
|
||||||
<!-- -->
|
|
||||||
</a>
|
|
||||||
<ul class="blockList">
|
|
||||||
<li class="blockList">
|
|
||||||
<h4>getSourceSize</h4>
|
|
||||||
<pre>public int getSourceSize()
|
|
||||||
throws java.lang.Exception</pre>
|
|
||||||
<div class="block">Returns the size of the source image (in bytes) associated with this
|
|
||||||
decompressor instance.</div>
|
|
||||||
<dl><dt><span class="strong">Returns:</span></dt><dd>the size of the source image (in bytes) associated with this
|
|
||||||
decompressor instance</dd>
|
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code>java.lang.Exception</code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
@@ -765,11 +728,13 @@ public byte[] getJPEGBuf()
|
|||||||
<ul class="blockList">
|
<ul class="blockList">
|
||||||
<li class="blockList">
|
<li class="blockList">
|
||||||
<h4>getJPEGSize</h4>
|
<h4>getJPEGSize</h4>
|
||||||
<pre>@Deprecated
|
<pre>public int getJPEGSize()
|
||||||
public int getJPEGSize()
|
|
||||||
throws java.lang.Exception</pre>
|
throws java.lang.Exception</pre>
|
||||||
<div class="block"><span class="strong">Deprecated.</span> <i>Use <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getSourceSize()"><code>getSourceSize()</code></a> instead.</i></div>
|
<div class="block">Returns the size of the JPEG image (in bytes) associated with this
|
||||||
<dl><dt><span class="strong">Throws:</span></dt>
|
decompressor instance.</div>
|
||||||
|
<dl><dt><span class="strong">Returns:</span></dt><dd>the size of the JPEG image (in bytes) associated with this
|
||||||
|
decompressor instance.</dd>
|
||||||
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code>java.lang.Exception</code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -794,7 +759,7 @@ public int getJPEGSize()
|
|||||||
the scaled image size.)</dd>
|
the scaled image size.)</dd>
|
||||||
<dt><span class="strong">Returns:</span></dt><dd>the width of the largest scaled-down image that the TurboJPEG
|
<dt><span class="strong">Returns:</span></dt><dd>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
|
||||||
height</dd>
|
height.</dd>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code>java.lang.Exception</code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
@@ -820,7 +785,7 @@ public int getJPEGSize()
|
|||||||
the scaled image size.)</dd>
|
the scaled image size.)</dd>
|
||||||
<dt><span class="strong">Returns:</span></dt><dd>the height of the largest scaled-down image that the TurboJPEG
|
<dt><span class="strong">Returns:</span></dt><dd>the height 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
|
||||||
height</dd>
|
height.</dd>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code>java.lang.Exception</code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
@@ -848,7 +813,7 @@ public int getJPEGSize()
|
|||||||
<code>pitch * scaledHeight</code> bytes in size, where
|
<code>pitch * scaledHeight</code> bytes in size, where
|
||||||
<code>scaledHeight</code> can be determined by calling <code>
|
<code>scaledHeight</code> can be determined by calling <code>
|
||||||
scalingFactor.<a href="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html#getScaled(int)"><code>getScaled</code></a>(jpegHeight)
|
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>. If the
|
</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,%20int)"><code>getScaledHeight(int, int)</code></a>. If the
|
||||||
source image is a YUV image, then this buffer should normally be
|
source image is a YUV image, then this buffer should normally be
|
||||||
<code>pitch * height</code> bytes in size, where <code>height</code> is
|
<code>pitch * height</code> bytes in size, where <code>height</code> is
|
||||||
the height of the YUV image. However, the buffer may also be larger than
|
the height of the YUV image. However, the buffer may also be larger than
|
||||||
@@ -872,7 +837,7 @@ public int getJPEGSize()
|
|||||||
if the source image is a JPEG image, then <code>scaledWidth</code> can be
|
if the source image is a JPEG image, then <code>scaledWidth</code> can be
|
||||||
determined by calling <code>
|
determined by calling <code>
|
||||||
scalingFactor.<a href="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html#getScaled(int)"><code>getScaled</code></a>(jpegWidth)
|
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>. If the source image is a
|
</code> or by calling <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getScaledWidth(int,%20int)"><code>getScaledWidth(int, int)</code></a>. If the source image is a
|
||||||
YUV image, then <code>scaledWidth</code> is the width of the YUV image.
|
YUV image, then <code>scaledWidth</code> is the width of the YUV image.
|
||||||
Setting this parameter to 0 is the equivalent of setting it to
|
Setting this parameter to 0 is the equivalent of setting it to
|
||||||
<code>scaledWidth * TJ.pixelSize(pixelFormat)</code>.</dd><dd><code>desiredHeight</code> - If the source image is a JPEG image, then this
|
<code>scaledWidth * TJ.pixelSize(pixelFormat)</code>.</dd><dd><code>desiredHeight</code> - If the source image is a JPEG image, then this
|
||||||
@@ -905,7 +870,7 @@ public void decompress(byte[] dstBuf,
|
|||||||
int flags)
|
int flags)
|
||||||
throws java.lang.Exception</pre>
|
throws java.lang.Exception</pre>
|
||||||
<div class="block"><span class="strong">Deprecated.</span> <i>Use
|
<div class="block"><span class="strong">Deprecated.</span> <i>Use
|
||||||
<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> instead.</i></div>
|
<a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(byte[],%20int,%20int,%20int,%20int,%20int,%20int,%20int)"><code>decompress(byte[], int, int, int, int, int, int, int)</code></a> instead.</i></div>
|
||||||
<dl><dt><span class="strong">Throws:</span></dt>
|
<dl><dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code>java.lang.Exception</code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
@@ -925,15 +890,15 @@ public void decompress(byte[] dstBuf,
|
|||||||
<div class="block">Decompress the JPEG source image associated with this decompressor
|
<div class="block">Decompress the JPEG source image associated with this decompressor
|
||||||
instance and return a buffer containing the decompressed image.</div>
|
instance and return a buffer containing the decompressed image.</div>
|
||||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>desiredWidth</code> - see
|
<dl><dt><span class="strong">Parameters:</span></dt><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>
|
<a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(byte[],%20int,%20int,%20int,%20int,%20int,%20int,%20int)"><code>decompress(byte[], int, int, int, int, int, int, int)</code></a>
|
||||||
for description</dd><dd><code>pitch</code> - see
|
for description</dd><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>
|
<a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(byte[],%20int,%20int,%20int,%20int,%20int,%20int,%20int)"><code>decompress(byte[], int, int, int, int, int, int, int)</code></a>
|
||||||
for description</dd><dd><code>desiredHeight</code> - see
|
for description</dd><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[],%20int,%20int,%20int,%20int,%20int,%20int,%20int)"><code>decompress(byte[], int, int, int, int, int, int, int)</code></a>
|
||||||
for description</dd><dd><code>pixelFormat</code> - pixel format of the decompressed image (one of
|
for description</dd><dd><code>pixelFormat</code> - pixel format of the decompressed image (one of
|
||||||
<a href="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_RGB"><code>TJ.PF_*</code></a>)</dd><dd><code>flags</code> - the bitwise OR of one or more of
|
<a href="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_RGB"><code>TJ.PF_*</code></a>)</dd><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></dd>
|
<a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP"><code>TJ.FLAG_*</code></a></dd>
|
||||||
<dt><span class="strong">Returns:</span></dt><dd>a buffer containing the decompressed image</dd>
|
<dt><span class="strong">Returns:</span></dt><dd>a buffer containing the decompressed image.</dd>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code>java.lang.Exception</code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
@@ -974,11 +939,54 @@ public void decompress(byte[] dstBuf,
|
|||||||
public void decompressToYUV(byte[] dstBuf,
|
public void decompressToYUV(byte[] dstBuf,
|
||||||
int flags)
|
int flags)
|
||||||
throws java.lang.Exception</pre>
|
throws java.lang.Exception</pre>
|
||||||
<div class="block"><span class="strong">Deprecated.</span> <i>Use <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(org.libjpegturbo.turbojpeg.YUVImage, int)"><code>decompressToYUV(YUVImage, int)</code></a> instead.</i></div>
|
<div class="block"><span class="strong">Deprecated.</span> <i>Use <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(org.libjpegturbo.turbojpeg.YUVImage,%20int)"><code>decompressToYUV(YUVImage, int)</code></a> instead.</i></div>
|
||||||
<dl><dt><span class="strong">Throws:</span></dt>
|
<dl><dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code>java.lang.Exception</code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
<a name="decompressToYUV(int, int[], int, int)">
|
||||||
|
<!-- -->
|
||||||
|
</a>
|
||||||
|
<ul class="blockList">
|
||||||
|
<li class="blockList">
|
||||||
|
<h4>decompressToYUV</h4>
|
||||||
|
<pre>public <a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a> decompressToYUV(int desiredWidth,
|
||||||
|
int[] strides,
|
||||||
|
int desiredHeight,
|
||||||
|
int flags)
|
||||||
|
throws java.lang.Exception</pre>
|
||||||
|
<div class="block">Decompress the JPEG source image associated with this decompressor
|
||||||
|
instance into a set of Y, U (Cb), and V (Cr) image planes and return a
|
||||||
|
<code>YUVImage</code> instance containing the decompressed image planes.
|
||||||
|
This method performs JPEG decompression but leaves out the color
|
||||||
|
conversion step, so a planar YUV image is generated instead of an RGB or
|
||||||
|
grayscale image. This method cannot be used to decompress JPEG source
|
||||||
|
images with the CMYK or YCCK colorspace.</div>
|
||||||
|
<dl><dt><span class="strong">Parameters:</span></dt><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><dd><code>strides</code> - an array of integers, each specifying the number of bytes
|
||||||
|
per line in the corresponding plane of the output image. Setting the
|
||||||
|
stride for any plane to 0 is the same as setting it to the scaled
|
||||||
|
component width of the plane. If <tt>strides</tt> is NULL, then the
|
||||||
|
strides for all planes will be set to their respective scaled component
|
||||||
|
widths. You can adjust the strides in order to add an arbitrary amount of
|
||||||
|
line padding to each plane.</dd><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><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></dd>
|
||||||
|
<dt><span class="strong">Returns:</span></dt><dd>a YUV planar image.</dd>
|
||||||
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
|
<dd><code>java.lang.Exception</code></dd></dl>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
<a name="decompressToYUV(int, int, int, int)">
|
<a name="decompressToYUV(int, int, int, int)">
|
||||||
<!-- -->
|
<!-- -->
|
||||||
</a>
|
</a>
|
||||||
@@ -991,12 +999,12 @@ public void decompressToYUV(byte[] dstBuf,
|
|||||||
int flags)
|
int flags)
|
||||||
throws java.lang.Exception</pre>
|
throws java.lang.Exception</pre>
|
||||||
<div class="block">Decompress the JPEG source image associated with this decompressor
|
<div class="block">Decompress the JPEG source image associated with this decompressor
|
||||||
instance into a YUV planar image and return a <code>YUVImage</code>
|
instance into a unified YUV planar image buffer and return a
|
||||||
instance containing the decompressed image. This method performs JPEG
|
<code>YUVImage</code> instance containing the decompressed image. This
|
||||||
decompression but leaves out the color conversion step, so a planar YUV
|
method performs JPEG decompression but leaves out the color conversion
|
||||||
image is generated instead of an RGB or grayscale image. This method
|
step, so a planar YUV image is generated instead of an RGB or grayscale
|
||||||
cannot be used to decompress JPEG source images with the CMYK or YCCK
|
image. This method cannot be used to decompress JPEG source images with
|
||||||
colorspace.</div>
|
the CMYK or YCCK colorspace.</div>
|
||||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>desiredWidth</code> - desired width (in pixels) of the YUV image. If the
|
<dl><dt><span class="strong">Parameters:</span></dt><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
|
desired image dimensions are different than the dimensions of the JPEG
|
||||||
image being decompressed, then TurboJPEG will use scaling in the JPEG
|
image being decompressed, then TurboJPEG will use scaling in the JPEG
|
||||||
@@ -1013,7 +1021,7 @@ public void decompressToYUV(byte[] dstBuf,
|
|||||||
the height of the JPEG image (in other words, the height will not be
|
the height of the JPEG image (in other words, the height will not be
|
||||||
considered when determining the scaled image size.)</dd><dd><code>flags</code> - the bitwise OR of one or more of
|
considered when determining the scaled image size.)</dd><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></dd>
|
<a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP"><code>TJ.FLAG_*</code></a></dd>
|
||||||
<dt><span class="strong">Returns:</span></dt><dd>a YUV planar image</dd>
|
<dt><span class="strong">Returns:</span></dt><dd>a YUV planar image.</dd>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code>java.lang.Exception</code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
@@ -1027,7 +1035,7 @@ public void decompressToYUV(byte[] dstBuf,
|
|||||||
<pre>@Deprecated
|
<pre>@Deprecated
|
||||||
public byte[] decompressToYUV(int flags)
|
public byte[] decompressToYUV(int flags)
|
||||||
throws java.lang.Exception</pre>
|
throws java.lang.Exception</pre>
|
||||||
<div class="block"><span class="strong">Deprecated.</span> <i>Use <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(int, int, int, int)"><code>decompressToYUV(int, int, int, int)</code></a> instead.</i></div>
|
<div class="block"><span class="strong">Deprecated.</span> <i>Use <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(int,%20int,%20int,%20int)"><code>decompressToYUV(int, int, int, int)</code></a> instead.</i></div>
|
||||||
<dl><dt><span class="strong">Throws:</span></dt>
|
<dl><dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code>java.lang.Exception</code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
@@ -1055,7 +1063,7 @@ public byte[] decompressToYUV(int flags)
|
|||||||
<code>stride * scaledHeight</code> pixels in size, where
|
<code>stride * scaledHeight</code> pixels in size, where
|
||||||
<code>scaledHeight</code> can be determined by calling <code>
|
<code>scaledHeight</code> can be determined by calling <code>
|
||||||
scalingFactor.<a href="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html#getScaled(int)"><code>getScaled</code></a>(jpegHeight)
|
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>. If the
|
</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,%20int)"><code>getScaledHeight(int, int)</code></a>. If the
|
||||||
source image is a YUV image, then this buffer should normally be
|
source image is a YUV image, then this buffer should normally be
|
||||||
<code>stride * height</code> pixels in size, where <code>height</code> is
|
<code>stride * height</code> pixels in size, where <code>height</code> is
|
||||||
the height of the YUV image. However, the buffer may also be larger than
|
the height of the YUV image. However, the buffer may also be larger than
|
||||||
@@ -1077,7 +1085,7 @@ public byte[] decompressToYUV(int flags)
|
|||||||
NOTE: if the source image is a JPEG image, then <code>scaledWidth</code>
|
NOTE: if the source image is a JPEG image, then <code>scaledWidth</code>
|
||||||
can be determined by calling <code>
|
can be determined by calling <code>
|
||||||
scalingFactor.<a href="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html#getScaled(int)"><code>getScaled</code></a>(jpegWidth)
|
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>. If the source image is a
|
</code> or by calling <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getScaledWidth(int,%20int)"><code>getScaledWidth(int, int)</code></a>. If the source image is a
|
||||||
YUV image, then <code>scaledWidth</code> is the width of the YUV image.
|
YUV image, then <code>scaledWidth</code> is the width of the YUV image.
|
||||||
Setting this parameter to 0 is the equivalent of setting it to
|
Setting this parameter to 0 is the equivalent of setting it to
|
||||||
<code>scaledWidth</code>.</dd><dd><code>desiredHeight</code> - If the source image is a JPEG image, then this
|
<code>scaledWidth</code>.</dd><dd><code>desiredHeight</code> - If the source image is a JPEG image, then this
|
||||||
@@ -1134,15 +1142,15 @@ public byte[] decompressToYUV(int flags)
|
|||||||
with this decompressor instance and return a <code>BufferedImage</code>
|
with this decompressor instance and return a <code>BufferedImage</code>
|
||||||
instance containing the decompressed/decoded image.</div>
|
instance containing the decompressed/decoded image.</div>
|
||||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>desiredWidth</code> - see
|
<dl><dt><span class="strong">Parameters:</span></dt><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
|
<a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(byte[],%20int,%20int,%20int,%20int,%20int,%20int,%20int)"><code>decompress(byte[], int, int, int, int, int, int, int)</code></a> for
|
||||||
description</dd><dd><code>desiredHeight</code> - see
|
description</dd><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[],%20int,%20int,%20int,%20int,%20int,%20int,%20int)"><code>decompress(byte[], int, int, int, int, int, int, int)</code></a> for
|
||||||
description</dd><dd><code>bufferedImageType</code> - the image type of the <code>BufferedImage</code>
|
description</dd><dd><code>bufferedImageType</code> - the image type of the <code>BufferedImage</code>
|
||||||
instance that will be created (for instance,
|
instance that will be created (for instance,
|
||||||
<code>BufferedImage.TYPE_INT_RGB</code>)</dd><dd><code>flags</code> - the bitwise OR of one or more of
|
<code>BufferedImage.TYPE_INT_RGB</code>)</dd><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></dd>
|
<a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP"><code>TJ.FLAG_*</code></a></dd>
|
||||||
<dt><span class="strong">Returns:</span></dt><dd>a <code>BufferedImage</code> instance containing the
|
<dt><span class="strong">Returns:</span></dt><dd>a <code>BufferedImage</code> instance containing the
|
||||||
decompressed/decoded image</dd>
|
decompressed/decoded image.</dd>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code>java.lang.Exception</code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ extends java.lang.Object</pre>
|
|||||||
<th class="colOne" scope="col">Constructor and Description</th>
|
<th class="colOne" scope="col">Constructor and Description</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="altColor">
|
<tr class="altColor">
|
||||||
<td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html#TJScalingFactor(int, int)">TJScalingFactor</a></strong>(int num,
|
<td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html#TJScalingFactor(int,%20int)">TJScalingFactor</a></strong>(int num,
|
||||||
int denom)</code> </td>
|
int denom)</code> </td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@@ -238,7 +238,7 @@ extends java.lang.Object</pre>
|
|||||||
<div class="block">Returns the scaled value of <code>dimension</code>. This function
|
<div class="block">Returns the scaled value of <code>dimension</code>. This function
|
||||||
performs the integer equivalent of
|
performs the integer equivalent of
|
||||||
<code>ceil(dimension * scalingFactor)</code>.</div>
|
<code>ceil(dimension * scalingFactor)</code>.</div>
|
||||||
<dl><dt><span class="strong">Returns:</span></dt><dd>the scaled value of <code>dimension</code></dd></dl>
|
<dl><dt><span class="strong">Returns:</span></dt><dd>the scaled value of <code>dimension</code>.</dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a name="equals(org.libjpegturbo.turbojpeg.TJScalingFactor)">
|
<a name="equals(org.libjpegturbo.turbojpeg.TJScalingFactor)">
|
||||||
@@ -251,7 +251,7 @@ extends java.lang.Object</pre>
|
|||||||
<div class="block">Returns true or false, depending on whether this instance and
|
<div class="block">Returns true or false, depending on whether this instance and
|
||||||
<code>other</code> have the same numerator and denominator.</div>
|
<code>other</code> have the same numerator and denominator.</div>
|
||||||
<dl><dt><span class="strong">Returns:</span></dt><dd>true or false, depending on whether this instance and
|
<dl><dt><span class="strong">Returns:</span></dt><dd>true or false, depending on whether this instance and
|
||||||
<code>other</code> have the same numerator and denominator</dd></dl>
|
<code>other</code> have the same numerator and denominator.</dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a name="isOne()">
|
<a name="isOne()">
|
||||||
@@ -264,7 +264,7 @@ extends java.lang.Object</pre>
|
|||||||
<div class="block">Returns true or false, depending on whether this instance is equal to
|
<div class="block">Returns true or false, depending on whether this instance is equal to
|
||||||
1/1.</div>
|
1/1.</div>
|
||||||
<dl><dt><span class="strong">Returns:</span></dt><dd>true or false, depending on whether this instance is equal to
|
<dl><dt><span class="strong">Returns:</span></dt><dd>true or false, depending on whether this instance is equal to
|
||||||
1/1</dd></dl>
|
1/1.</dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@@ -231,14 +231,14 @@ extends java.awt.Rectangle</pre>
|
|||||||
<tr class="rowColor">
|
<tr class="rowColor">
|
||||||
<td class="colFirst"><code>static int</code></td>
|
<td class="colFirst"><code>static int</code></td>
|
||||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html#OPT_NOOUTPUT">OPT_NOOUTPUT</a></strong></code>
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html#OPT_NOOUTPUT">OPT_NOOUTPUT</a></strong></code>
|
||||||
<div class="block">This option will prevent <a href="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#transform(byte[][], org.libjpegturbo.turbojpeg.TJTransform[], int)"><code>TJTransformer.transform()</code></a> from outputting a JPEG image for this
|
<div class="block">This option will prevent <a href="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#transform(byte[][],%20org.libjpegturbo.turbojpeg.TJTransform[],%20int)"><code>TJTransformer.transform()</code></a> from outputting a JPEG image for this
|
||||||
particular transform.</div>
|
particular transform.</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="altColor">
|
<tr class="altColor">
|
||||||
<td class="colFirst"><code>static int</code></td>
|
<td class="colFirst"><code>static int</code></td>
|
||||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html#OPT_PERFECT">OPT_PERFECT</a></strong></code>
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html#OPT_PERFECT">OPT_PERFECT</a></strong></code>
|
||||||
<div class="block">This option will cause <a href="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#transform(byte[][], org.libjpegturbo.turbojpeg.TJTransform[], int)"><code>TJTransformer.transform()</code></a> to throw an exception if the transform is not
|
<div class="block">This option will cause <a href="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#transform(byte[][],%20org.libjpegturbo.turbojpeg.TJTransform[],%20int)"><code>TJTransformer.transform()</code></a> to throw an exception if the transform is not
|
||||||
perfect.</div>
|
perfect.</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -289,7 +289,7 @@ extends java.awt.Rectangle</pre>
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="rowColor">
|
<tr class="rowColor">
|
||||||
<td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html#TJTransform(int, int, int, int, int, int, org.libjpegturbo.turbojpeg.TJCustomFilter)">TJTransform</a></strong>(int x,
|
<td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html#TJTransform(int,%20int,%20int,%20int,%20int,%20int,%20org.libjpegturbo.turbojpeg.TJCustomFilter)">TJTransform</a></strong>(int x,
|
||||||
int y,
|
int y,
|
||||||
int w,
|
int w,
|
||||||
int h,
|
int h,
|
||||||
@@ -300,7 +300,7 @@ extends java.awt.Rectangle</pre>
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="altColor">
|
<tr class="altColor">
|
||||||
<td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html#TJTransform(java.awt.Rectangle, int, int, org.libjpegturbo.turbojpeg.TJCustomFilter)">TJTransform</a></strong>(java.awt.Rectangle r,
|
<td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html#TJTransform(java.awt.Rectangle,%20int,%20int,%20org.libjpegturbo.turbojpeg.TJCustomFilter)">TJTransform</a></strong>(java.awt.Rectangle r,
|
||||||
int op,
|
int op,
|
||||||
int options,
|
int options,
|
||||||
<a href="../../../org/libjpegturbo/turbojpeg/TJCustomFilter.html" title="interface in org.libjpegturbo.turbojpeg">TJCustomFilter</a> cf)</code>
|
<a href="../../../org/libjpegturbo/turbojpeg/TJCustomFilter.html" title="interface in org.libjpegturbo.turbojpeg">TJCustomFilter</a> cf)</code>
|
||||||
@@ -486,7 +486,7 @@ extends java.awt.Rectangle</pre>
|
|||||||
<li class="blockList">
|
<li class="blockList">
|
||||||
<h4>OPT_PERFECT</h4>
|
<h4>OPT_PERFECT</h4>
|
||||||
<pre>public static final int OPT_PERFECT</pre>
|
<pre>public static final int OPT_PERFECT</pre>
|
||||||
<div class="block">This option will cause <a href="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#transform(byte[][], org.libjpegturbo.turbojpeg.TJTransform[], int)"><code>TJTransformer.transform()</code></a> to throw an exception if the transform is not
|
<div class="block">This option will cause <a href="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#transform(byte[][],%20org.libjpegturbo.turbojpeg.TJTransform[],%20int)"><code>TJTransformer.transform()</code></a> to throw an exception if the transform is not
|
||||||
perfect. Lossless transforms operate on MCU blocks, whose size depends on
|
perfect. Lossless transforms operate on MCU blocks, whose size depends on
|
||||||
the level of chrominance subsampling used. If the image's width or height
|
the level of chrominance subsampling used. If the image's width or height
|
||||||
is not evenly divisible by the MCU block size (see <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#getMCUWidth(int)"><code>TJ.getMCUWidth(int)</code></a>
|
is not evenly divisible by the MCU block size (see <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#getMCUWidth(int)"><code>TJ.getMCUWidth(int)</code></a>
|
||||||
@@ -541,7 +541,7 @@ extends java.awt.Rectangle</pre>
|
|||||||
<li class="blockList">
|
<li class="blockList">
|
||||||
<h4>OPT_NOOUTPUT</h4>
|
<h4>OPT_NOOUTPUT</h4>
|
||||||
<pre>public static final int OPT_NOOUTPUT</pre>
|
<pre>public static final int OPT_NOOUTPUT</pre>
|
||||||
<div class="block">This option will prevent <a href="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#transform(byte[][], org.libjpegturbo.turbojpeg.TJTransform[], int)"><code>TJTransformer.transform()</code></a> from outputting a JPEG image for this
|
<div class="block">This option will prevent <a href="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#transform(byte[][],%20org.libjpegturbo.turbojpeg.TJTransform[],%20int)"><code>TJTransformer.transform()</code></a> from outputting a JPEG image for this
|
||||||
particular transform. This can be used in conjunction with a custom
|
particular transform. This can be used in conjunction with a custom
|
||||||
filter to capture the transformed DCT coefficients without transcoding
|
filter to capture the transformed DCT coefficients without transcoding
|
||||||
them.</div>
|
them.</div>
|
||||||
@@ -636,7 +636,7 @@ extends java.awt.Rectangle</pre>
|
|||||||
throws java.lang.Exception</pre>
|
throws java.lang.Exception</pre>
|
||||||
<div class="block">Create a new lossless transform instance with the given parameters.</div>
|
<div class="block">Create a new lossless transform instance with the given parameters.</div>
|
||||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>r</code> - a <code>Rectangle</code> instance that specifies the cropping
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>r</code> - a <code>Rectangle</code> instance that specifies the cropping
|
||||||
region. See <a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html#TJTransform(int, int, int, int, int, int, org.libjpegturbo.turbojpeg.TJCustomFilter)"><code>TJTransform(int, int, int, int, int, int, TJCustomFilter)</code></a> for more
|
region. See <a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html#TJTransform(int,%20int,%20int,%20int,%20int,%20int,%20org.libjpegturbo.turbojpeg.TJCustomFilter)"><code>TJTransform(int, int, int, int, int, int, TJCustomFilter)</code></a> for more
|
||||||
detail.</dd><dd><code>op</code> - one of the transform operations (<code>OP_*</code>)</dd><dd><code>options</code> - the bitwise OR of one or more of the transform options
|
detail.</dd><dd><code>op</code> - one of the transform operations (<code>OP_*</code>)</dd><dd><code>options</code> - the bitwise OR of one or more of the transform options
|
||||||
(<code>OPT_*</code>)</dd><dd><code>cf</code> - an instance of an object that implements the <a href="../../../org/libjpegturbo/turbojpeg/TJCustomFilter.html" title="interface in org.libjpegturbo.turbojpeg"><code>TJCustomFilter</code></a> interface, or null if no custom filter is needed</dd>
|
(<code>OPT_*</code>)</dd><dd><code>cf</code> - an instance of an object that implements the <a href="../../../org/libjpegturbo/turbojpeg/TJCustomFilter.html" title="interface in org.libjpegturbo.turbojpeg"><code>TJCustomFilter</code></a> interface, or null if no custom filter is needed</dd>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ extends <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title=
|
|||||||
<!-- -->
|
<!-- -->
|
||||||
</a>
|
</a>
|
||||||
<h3>Fields inherited from class org.libjpegturbo.turbojpeg.<a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a></h3>
|
<h3>Fields inherited from class org.libjpegturbo.turbojpeg.<a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a></h3>
|
||||||
<code><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#handle">handle</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#jpegBuf">jpegBuf</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#jpegBufSize">jpegBufSize</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#srcColorspace">srcColorspace</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#srcHeight">srcHeight</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#srcSubsamp">srcSubsamp</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#srcWidth">srcWidth</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#yuvImage">yuvImage</a></code></li>
|
<code><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#handle">handle</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#jpegBuf">jpegBuf</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#jpegBufSize">jpegBufSize</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#jpegColorspace">jpegColorspace</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#jpegHeight">jpegHeight</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#jpegSubsamp">jpegSubsamp</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#jpegWidth">jpegWidth</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#yuvImage">yuvImage</a></code></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -144,7 +144,7 @@ extends <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title=
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="altColor">
|
<tr class="altColor">
|
||||||
<td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#TJTransformer(byte[], int)">TJTransformer</a></strong>(byte[] jpegImage,
|
<td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#TJTransformer(byte[],%20int)">TJTransformer</a></strong>(byte[] jpegImage,
|
||||||
int imageSize)</code>
|
int imageSize)</code>
|
||||||
<div class="block">Create a TurboJPEG lossless transformer instance and associate the JPEG
|
<div class="block">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
|
||||||
@@ -175,7 +175,7 @@ extends <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title=
|
|||||||
</tr>
|
</tr>
|
||||||
<tr class="rowColor">
|
<tr class="rowColor">
|
||||||
<td class="colFirst"><code>void</code></td>
|
<td class="colFirst"><code>void</code></td>
|
||||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#transform(byte[][], org.libjpegturbo.turbojpeg.TJTransform[], int)">transform</a></strong>(byte[][] dstBufs,
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#transform(byte[][],%20org.libjpegturbo.turbojpeg.TJTransform[],%20int)">transform</a></strong>(byte[][] dstBufs,
|
||||||
<a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</a>[] transforms,
|
<a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</a>[] transforms,
|
||||||
int flags)</code>
|
int flags)</code>
|
||||||
<div class="block">Losslessly transform the JPEG image associated with this transformer
|
<div class="block">Losslessly transform the JPEG image associated with this transformer
|
||||||
@@ -185,7 +185,7 @@ extends <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title=
|
|||||||
</tr>
|
</tr>
|
||||||
<tr class="altColor">
|
<tr class="altColor">
|
||||||
<td class="colFirst"><code><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a>[]</code></td>
|
<td class="colFirst"><code><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a>[]</code></td>
|
||||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#transform(org.libjpegturbo.turbojpeg.TJTransform[], int)">transform</a></strong>(<a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</a>[] transforms,
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#transform(org.libjpegturbo.turbojpeg.TJTransform[],%20int)">transform</a></strong>(<a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</a>[] transforms,
|
||||||
int flags)</code>
|
int flags)</code>
|
||||||
<div class="block">Losslessly transform the JPEG image associated with this transformer
|
<div class="block">Losslessly transform the JPEG image associated with this transformer
|
||||||
instance and return an array of <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><code>TJDecompressor</code></a> instances, each of
|
instance and return an array of <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><code>TJDecompressor</code></a> instances, each of
|
||||||
@@ -198,7 +198,7 @@ extends <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title=
|
|||||||
<!-- -->
|
<!-- -->
|
||||||
</a>
|
</a>
|
||||||
<h3>Methods inherited from class org.libjpegturbo.turbojpeg.<a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a></h3>
|
<h3>Methods inherited from class org.libjpegturbo.turbojpeg.<a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a></h3>
|
||||||
<code><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#close()">close</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(java.awt.image.BufferedImage, int)">decompress</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(byte[], int, int, int, int, int)">decompress</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(byte[], int, int, int, int, int, int, int)">decompress</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(int[], int, int, int, int, int, int, int)">decompress</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(int, int, int, int)">decompress</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(int, int, int, int, int)">decompress</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(byte[], int)">decompressToYUV</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(int)">decompressToYUV</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(int, int, int, int)">decompressToYUV</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(org.libjpegturbo.turbojpeg.YUVImage, int)">decompressToYUV</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#finalize()">finalize</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getColorspace()">getColorspace</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getHeight()">getHeight</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getJPEGBuf()">getJPEGBuf</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getJPEGSize()">getJPEGSize</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getScaledHeight(int, int)">getScaledHeight</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getScaledWidth(int, int)">getScaledWidth</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getSourceBuf()">getSourceBuf</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getSourceSize()">getSourceSize</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getSubsamp()">getSubsamp</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getWidth()">getWidth</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#setJPEGImage(byte[], int)">setJPEGImage</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#setSourceImage(byte[], int)">setSourceImage</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#setSourceImage(org.libjpegturbo.turbojpeg.YUVImage)">setSourceImage</a></code></li>
|
<code><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#close()">close</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(java.awt.image.BufferedImage,%20int)">decompress</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(byte[],%20int,%20int,%20int,%20int,%20int)">decompress</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(byte[],%20int,%20int,%20int,%20int,%20int,%20int,%20int)">decompress</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(int[],%20int,%20int,%20int,%20int,%20int,%20int,%20int)">decompress</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(int,%20int,%20int,%20int)">decompress</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(int,%20int,%20int,%20int,%20int)">decompress</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(byte[],%20int)">decompressToYUV</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(int)">decompressToYUV</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(int,%20int[],%20int,%20int)">decompressToYUV</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(int,%20int,%20int,%20int)">decompressToYUV</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(org.libjpegturbo.turbojpeg.YUVImage,%20int)">decompressToYUV</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#finalize()">finalize</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getColorspace()">getColorspace</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getHeight()">getHeight</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getJPEGBuf()">getJPEGBuf</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getJPEGSize()">getJPEGSize</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getScaledHeight(int,%20int)">getScaledHeight</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getScaledWidth(int,%20int)">getScaledWidth</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getSubsamp()">getSubsamp</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getWidth()">getWidth</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#setJPEGImage(byte[],%20int)">setJPEGImage</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#setSourceImage(byte[],%20int)">setSourceImage</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#setSourceImage(org.libjpegturbo.turbojpeg.YUVImage)">setSourceImage</a></code></li>
|
||||||
</ul>
|
</ul>
|
||||||
<ul class="blockList">
|
<ul class="blockList">
|
||||||
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
|
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
|
||||||
@@ -299,7 +299,7 @@ extends <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title=
|
|||||||
read the source coefficients multiple times.</div>
|
read the source coefficients multiple times.</div>
|
||||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>dstBufs</code> - an array of image buffers. <code>dstbufs[i]</code> will
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>dstBufs</code> - an array of image buffers. <code>dstbufs[i]</code> will
|
||||||
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,%20int,%20int)"><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 and the level of subsampling used in the source image.</dd><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><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
|
||||||
@@ -326,7 +326,7 @@ extends <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title=
|
|||||||
corresponding transformed output image</dd><dd><code>flags</code> - the bitwise OR of one or more of
|
corresponding transformed output image</dd><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></dd>
|
<a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP"><code>TJ.FLAG_*</code></a></dd>
|
||||||
<dt><span class="strong">Returns:</span></dt><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><span class="strong">Returns:</span></dt><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</dd>
|
which has a transformed JPEG image associated with it.</dd>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code>java.lang.Exception</code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
@@ -342,7 +342,7 @@ extends <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title=
|
|||||||
<div class="block">Returns an array containing the sizes of the transformed JPEG images
|
<div class="block">Returns an array containing the sizes of the transformed JPEG images
|
||||||
generated by the most recent transform operation.</div>
|
generated by the most recent transform operation.</div>
|
||||||
<dl><dt><span class="strong">Returns:</span></dt><dd>an array containing the sizes of the transformed JPEG images
|
<dl><dt><span class="strong">Returns:</span></dt><dd>an array containing the sizes of the transformed JPEG images
|
||||||
generated by the most recent transform operation</dd>
|
generated by the most recent transform operation.</dd>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code>java.lang.Exception</code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@@ -108,20 +108,18 @@ extends java.lang.Object</pre>
|
|||||||
image format consisting of Y, Cb, and Cr image planes.
|
image format consisting of Y, Cb, and Cr image planes.
|
||||||
<p>
|
<p>
|
||||||
Each plane is simply a 2D array of bytes, each byte representing the value
|
Each plane is simply a 2D array of bytes, each byte representing the value
|
||||||
of one of the components at a particular location in the image. The
|
of one of the components (Y, Cb, or Cr) at a particular location in the
|
||||||
"component width" and "component height" of each plane are determined by the
|
image. The width and height of each plane are determined by the image
|
||||||
image width, height, and level of chrominance subsampling. For the
|
width, height, and level of chrominance subsampling. The luminance plane
|
||||||
luminance plane, the component width is the image width padded to the
|
width is the image width padded to the nearest multiple of the horizontal
|
||||||
nearest multiple of the horizontal subsampling factor (2 in the case of
|
subsampling factor (2 in the case of 4:2:0 and 4:2:2, 4 in the case of
|
||||||
4:2:0 and 4:2:2, 4 in the case of 4:1:1, 1 in the case of 4:4:4 or
|
4:1:1, 1 in the case of 4:4:4 or grayscale.) Similarly, the luminance plane
|
||||||
grayscale.) Similarly, the component height of the luminance plane is the
|
height is the image height padded to the nearest multiple of the vertical
|
||||||
image height padded to the nearest multiple of the vertical subsampling
|
subsampling factor (2 in the case of 4:2:0 or 4:4:0, 1 in the case of 4:4:4
|
||||||
factor (2 in the case of 4:2:0 or 4:4:0, 1 in the case of 4:4:4 or
|
or grayscale.) The chrominance plane width is equal to the luminance plane
|
||||||
grayscale.) The component width of the chrominance planes is equal to the
|
width divided by the horizontal subsampling factor, and the chrominance
|
||||||
component width of the luminance plane divided by the horizontal subsampling
|
plane height is equal to the luminance plane height divided by the vertical
|
||||||
factor, and the component height of the chrominance planes is equal to the
|
subsampling factor.
|
||||||
component height of the luminance plane divided by the vertical subsampling
|
|
||||||
factor.
|
|
||||||
<p>
|
<p>
|
||||||
For example, if the source image is 35 x 35 pixels and 4:2:2 subsampling is
|
For example, if the source image is 35 x 35 pixels and 4:2:2 subsampling is
|
||||||
used, then the luminance plane would be 36 x 35 bytes, and each of the
|
used, then the luminance plane would be 36 x 35 bytes, and each of the
|
||||||
@@ -151,18 +149,26 @@ extends java.lang.Object</pre>
|
|||||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#handle">handle</a></strong></code> </td>
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#handle">handle</a></strong></code> </td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="rowColor">
|
<tr class="rowColor">
|
||||||
<td class="colFirst"><code>protected byte[]</code></td>
|
|
||||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#yuvBuf">yuvBuf</a></strong></code> </td>
|
|
||||||
</tr>
|
|
||||||
<tr class="altColor">
|
|
||||||
<td class="colFirst"><code>protected int</code></td>
|
<td class="colFirst"><code>protected int</code></td>
|
||||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#yuvHeight">yuvHeight</a></strong></code> </td>
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#yuvHeight">yuvHeight</a></strong></code> </td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr class="altColor">
|
||||||
|
<td class="colFirst"><code>protected int[]</code></td>
|
||||||
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#yuvOffsets">yuvOffsets</a></strong></code> </td>
|
||||||
|
</tr>
|
||||||
<tr class="rowColor">
|
<tr class="rowColor">
|
||||||
<td class="colFirst"><code>protected int</code></td>
|
<td class="colFirst"><code>protected int</code></td>
|
||||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#yuvPad">yuvPad</a></strong></code> </td>
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#yuvPad">yuvPad</a></strong></code> </td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="altColor">
|
<tr class="altColor">
|
||||||
|
<td class="colFirst"><code>protected byte[][]</code></td>
|
||||||
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#yuvPlanes">yuvPlanes</a></strong></code> </td>
|
||||||
|
</tr>
|
||||||
|
<tr class="rowColor">
|
||||||
|
<td class="colFirst"><code>protected int[]</code></td>
|
||||||
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#yuvStrides">yuvStrides</a></strong></code> </td>
|
||||||
|
</tr>
|
||||||
|
<tr class="altColor">
|
||||||
<td class="colFirst"><code>protected int</code></td>
|
<td class="colFirst"><code>protected int</code></td>
|
||||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#yuvSubsamp">yuvSubsamp</a></strong></code> </td>
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#yuvSubsamp">yuvSubsamp</a></strong></code> </td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -185,21 +191,42 @@ extends java.lang.Object</pre>
|
|||||||
<th class="colOne" scope="col">Constructor and Description</th>
|
<th class="colOne" scope="col">Constructor and Description</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="altColor">
|
<tr class="altColor">
|
||||||
<td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#YUVImage(byte[], int, int, int, int)">YUVImage</a></strong>(byte[] yuvImage,
|
<td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#YUVImage(byte[][],%20int[],%20int,%20int[],%20int,%20int)">YUVImage</a></strong>(byte[][] planes,
|
||||||
|
int[] offsets,
|
||||||
|
int width,
|
||||||
|
int[] strides,
|
||||||
|
int height,
|
||||||
|
int subsamp)</code>
|
||||||
|
<div class="block">Create a new <code>YUVImage</code> instance from a set of existing image
|
||||||
|
planes.</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="rowColor">
|
||||||
|
<td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#YUVImage(byte[],%20int,%20int,%20int,%20int)">YUVImage</a></strong>(byte[] yuvImage,
|
||||||
int width,
|
int width,
|
||||||
int pad,
|
int pad,
|
||||||
int height,
|
int height,
|
||||||
int subsamp)</code>
|
int subsamp)</code>
|
||||||
<div class="block">Create a <code>YUVImage</code> instance from an existing YUV planar image
|
<div class="block">Create a new <code>YUVImage</code> instance from an existing unified image
|
||||||
buffer.</div>
|
buffer.</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr class="altColor">
|
||||||
|
<td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#YUVImage(int,%20int[],%20int,%20int)">YUVImage</a></strong>(int width,
|
||||||
|
int[] strides,
|
||||||
|
int height,
|
||||||
|
int subsamp)</code>
|
||||||
|
<div class="block">Create a new <code>YUVImage</code> instance backed by separate image
|
||||||
|
planes, and allocate memory for the image planes.</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
<tr class="rowColor">
|
<tr class="rowColor">
|
||||||
<td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#YUVImage(int, int, int, int)">YUVImage</a></strong>(int width,
|
<td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#YUVImage(int,%20int,%20int,%20int)">YUVImage</a></strong>(int width,
|
||||||
int pad,
|
int pad,
|
||||||
int height,
|
int height,
|
||||||
int subsamp)</code>
|
int subsamp)</code>
|
||||||
<div class="block">Create a <code>YUVImage</code> instance with a new image buffer.</div>
|
<div class="block">Create a new <code>YUVImage</code> instance backed by a unified image
|
||||||
|
buffer, and allocate memory for the image buffer.</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@@ -220,48 +247,80 @@ extends java.lang.Object</pre>
|
|||||||
<tr class="altColor">
|
<tr class="altColor">
|
||||||
<td class="colFirst"><code>byte[]</code></td>
|
<td class="colFirst"><code>byte[]</code></td>
|
||||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#getBuf()">getBuf</a></strong>()</code>
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#getBuf()">getBuf</a></strong>()</code>
|
||||||
<div class="block">Returns the YUV image buffer</div>
|
<div class="block">Returns the YUV image buffer (if this image is stored in a unified
|
||||||
|
buffer rather than separate image planes.)</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="rowColor">
|
<tr class="rowColor">
|
||||||
<td class="colFirst"><code>int</code></td>
|
<td class="colFirst"><code>int</code></td>
|
||||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#getHeight()">getHeight</a></strong>()</code>
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#getHeight()">getHeight</a></strong>()</code>
|
||||||
<div class="block">Returns the height of the YUV image.</div>
|
<div class="block">Returns the height of the YUV image (or subregion.)</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="altColor">
|
<tr class="altColor">
|
||||||
|
<td class="colFirst"><code>int[]</code></td>
|
||||||
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#getOffsets()">getOffsets</a></strong>()</code>
|
||||||
|
<div class="block">Returns the offsets (in bytes) of each plane within the planes of a larger
|
||||||
|
YUV image.</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="rowColor">
|
||||||
<td class="colFirst"><code>int</code></td>
|
<td class="colFirst"><code>int</code></td>
|
||||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#getPad()">getPad</a></strong>()</code>
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#getPad()">getPad</a></strong>()</code>
|
||||||
<div class="block">Returns the line padding used in the YUV image buffer.</div>
|
<div class="block">Returns the line padding used in the YUV image buffer (if this image is
|
||||||
|
stored in a unified buffer rather than separate image planes.)</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="altColor">
|
||||||
|
<td class="colFirst"><code>byte[][]</code></td>
|
||||||
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#getPlanes()">getPlanes</a></strong>()</code>
|
||||||
|
<div class="block">Returns the YUV image planes.</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="rowColor">
|
<tr class="rowColor">
|
||||||
<td class="colFirst"><code>int</code></td>
|
<td class="colFirst"><code>int</code></td>
|
||||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#getSize()">getSize</a></strong>()</code>
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#getSize()">getSize</a></strong>()</code>
|
||||||
<div class="block">Returns the size (in bytes) of the YUV image buffer</div>
|
<div class="block">Returns the size (in bytes) of the YUV image buffer (if this image is
|
||||||
|
stored in a unified buffer rather than separate image planes.)</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="altColor">
|
<tr class="altColor">
|
||||||
|
<td class="colFirst"><code>int[]</code></td>
|
||||||
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#getStrides()">getStrides</a></strong>()</code>
|
||||||
|
<div class="block">Returns the number of bytes per line of each plane in the YUV image.</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="rowColor">
|
||||||
<td class="colFirst"><code>int</code></td>
|
<td class="colFirst"><code>int</code></td>
|
||||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#getSubsamp()">getSubsamp</a></strong>()</code>
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#getSubsamp()">getSubsamp</a></strong>()</code>
|
||||||
<div class="block">Returns the level of chrominance subsampling used in the YUV image.</div>
|
<div class="block">Returns the level of chrominance subsampling used in the YUV image.</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="rowColor">
|
<tr class="altColor">
|
||||||
<td class="colFirst"><code>int</code></td>
|
<td class="colFirst"><code>int</code></td>
|
||||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#getWidth()">getWidth</a></strong>()</code>
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#getWidth()">getWidth</a></strong>()</code>
|
||||||
<div class="block">Returns the width of the YUV image.</div>
|
<div class="block">Returns the width of the YUV image (or subregion.)</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="rowColor">
|
||||||
|
<td class="colFirst"><code>void</code></td>
|
||||||
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#setBuf(byte[][],%20int[],%20int,%20int[],%20int,%20int)">setBuf</a></strong>(byte[][] planes,
|
||||||
|
int[] offsets,
|
||||||
|
int width,
|
||||||
|
int[] strides,
|
||||||
|
int height,
|
||||||
|
int subsamp)</code>
|
||||||
|
<div class="block">Assign a set of image planes to this <code>YUVImage</code> instance.</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="altColor">
|
<tr class="altColor">
|
||||||
<td class="colFirst"><code>void</code></td>
|
<td class="colFirst"><code>void</code></td>
|
||||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#setBuf(byte[], int, int, int, int)">setBuf</a></strong>(byte[] yuvImage,
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#setBuf(byte[],%20int,%20int,%20int,%20int)">setBuf</a></strong>(byte[] yuvImage,
|
||||||
int width,
|
int width,
|
||||||
int pad,
|
int pad,
|
||||||
int height,
|
int height,
|
||||||
int subsamp)</code>
|
int subsamp)</code>
|
||||||
<div class="block">Assign an existing YUV planar image buffer to this <code>YUVImage</code>
|
<div class="block">Assign a unified image buffer to this <code>YUVImage</code> instance.</div>
|
||||||
instance.</div>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@@ -295,13 +354,31 @@ extends java.lang.Object</pre>
|
|||||||
<pre>protected long handle</pre>
|
<pre>protected long handle</pre>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a name="yuvBuf">
|
<a name="yuvPlanes">
|
||||||
<!-- -->
|
<!-- -->
|
||||||
</a>
|
</a>
|
||||||
<ul class="blockList">
|
<ul class="blockList">
|
||||||
<li class="blockList">
|
<li class="blockList">
|
||||||
<h4>yuvBuf</h4>
|
<h4>yuvPlanes</h4>
|
||||||
<pre>protected byte[] yuvBuf</pre>
|
<pre>protected byte[][] yuvPlanes</pre>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<a name="yuvOffsets">
|
||||||
|
<!-- -->
|
||||||
|
</a>
|
||||||
|
<ul class="blockList">
|
||||||
|
<li class="blockList">
|
||||||
|
<h4>yuvOffsets</h4>
|
||||||
|
<pre>protected int[] yuvOffsets</pre>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<a name="yuvStrides">
|
||||||
|
<!-- -->
|
||||||
|
</a>
|
||||||
|
<ul class="blockList">
|
||||||
|
<li class="blockList">
|
||||||
|
<h4>yuvStrides</h4>
|
||||||
|
<pre>protected int[] yuvStrides</pre>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a name="yuvPad">
|
<a name="yuvPad">
|
||||||
@@ -348,6 +425,31 @@ extends java.lang.Object</pre>
|
|||||||
<!-- -->
|
<!-- -->
|
||||||
</a>
|
</a>
|
||||||
<h3>Constructor Detail</h3>
|
<h3>Constructor Detail</h3>
|
||||||
|
<a name="YUVImage(int, int[], int, int)">
|
||||||
|
<!-- -->
|
||||||
|
</a>
|
||||||
|
<ul class="blockList">
|
||||||
|
<li class="blockList">
|
||||||
|
<h4>YUVImage</h4>
|
||||||
|
<pre>public YUVImage(int width,
|
||||||
|
int[] strides,
|
||||||
|
int height,
|
||||||
|
int subsamp)
|
||||||
|
throws java.lang.Exception</pre>
|
||||||
|
<div class="block">Create a new <code>YUVImage</code> instance backed by separate image
|
||||||
|
planes, and allocate memory for the image planes.</div>
|
||||||
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>width</code> - width (in pixels) of the YUV image</dd><dd><code>strides</code> - an array of integers, each specifying the number of bytes
|
||||||
|
per line in the corresponding plane of the YUV image. Setting the stride
|
||||||
|
for any plane to 0 is the same as setting it to the plane width (see
|
||||||
|
<a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>above</code></a>.) If <code>strides</code> is null, then the
|
||||||
|
strides for all planes will be set to their respective plane widths. When
|
||||||
|
using this constructor, the stride for each plane must be equal to or
|
||||||
|
greater than the plane width.</dd><dd><code>height</code> - height (in pixels) of the YUV image</dd><dd><code>subsamp</code> - the level of chrominance subsampling to be used in the YUV
|
||||||
|
image (one of <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_444"><code>TJ.SAMP_*</code></a>)</dd>
|
||||||
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
|
<dd><code>java.lang.Exception</code></dd></dl>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
<a name="YUVImage(int, int, int, int)">
|
<a name="YUVImage(int, int, int, int)">
|
||||||
<!-- -->
|
<!-- -->
|
||||||
</a>
|
</a>
|
||||||
@@ -359,7 +461,8 @@ extends java.lang.Object</pre>
|
|||||||
int height,
|
int height,
|
||||||
int subsamp)
|
int subsamp)
|
||||||
throws java.lang.Exception</pre>
|
throws java.lang.Exception</pre>
|
||||||
<div class="block">Create a <code>YUVImage</code> instance with a new image buffer.</div>
|
<div class="block">Create a new <code>YUVImage</code> instance backed by a unified image
|
||||||
|
buffer, and allocate memory for the image buffer.</div>
|
||||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>width</code> - width (in pixels) of the YUV image</dd><dd><code>pad</code> - Each line of each plane in the YUV image buffer will be padded
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>width</code> - width (in pixels) of the YUV image</dd><dd><code>pad</code> - Each line of each plane in the YUV image buffer will be padded
|
||||||
to this number of bytes (must be a power of 2.)</dd><dd><code>height</code> - height (in pixels) of the YUV image</dd><dd><code>subsamp</code> - the level of chrominance subsampling to be used in the YUV
|
to this number of bytes (must be a power of 2.)</dd><dd><code>height</code> - height (in pixels) of the YUV image</dd><dd><code>subsamp</code> - the level of chrominance subsampling to be used in the YUV
|
||||||
image (one of <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_444"><code>TJ.SAMP_*</code></a>)</dd>
|
image (one of <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_444"><code>TJ.SAMP_*</code></a>)</dd>
|
||||||
@@ -367,6 +470,44 @@ extends java.lang.Object</pre>
|
|||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code>java.lang.Exception</code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
<a name="YUVImage(byte[][], int[], int, int[], int, int)">
|
||||||
|
<!-- -->
|
||||||
|
</a>
|
||||||
|
<ul class="blockList">
|
||||||
|
<li class="blockList">
|
||||||
|
<h4>YUVImage</h4>
|
||||||
|
<pre>public YUVImage(byte[][] planes,
|
||||||
|
int[] offsets,
|
||||||
|
int width,
|
||||||
|
int[] strides,
|
||||||
|
int height,
|
||||||
|
int subsamp)
|
||||||
|
throws java.lang.Exception</pre>
|
||||||
|
<div class="block">Create a new <code>YUVImage</code> instance from a set of existing image
|
||||||
|
planes.</div>
|
||||||
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>planes</code> - an array of buffers representing the Y, U (Cb), and V (Cr)
|
||||||
|
image planes (or just the Y plane, if the image is grayscale.) These
|
||||||
|
planes can be contiguous or non-contiguous in memory. Plane
|
||||||
|
<code>i</code> should be at least <code>offsets[i] +
|
||||||
|
<a href="../../../org/libjpegturbo/turbojpeg/TJ.html#planeSizeYUV(int,%20int,%20int,%20int,%20int)"><code>TJ.planeSizeYUV</code></a>(i, width, strides[i], height, subsamp)</code>
|
||||||
|
bytes in size.</dd><dd><code>offsets</code> - If this <code>YUVImage</code> instance represents a
|
||||||
|
subregion of a larger image, then <code>offsets[i]</code> specifies the
|
||||||
|
offset (in bytes) of the subregion within plane <code>i</code> of the
|
||||||
|
larger image. Setting this to null is the same as setting the offsets for
|
||||||
|
all planes to 0.</dd><dd><code>width</code> - width (in pixels) of the new YUV image (or subregion)</dd><dd><code>strides</code> - an array of integers, each specifying the number of bytes
|
||||||
|
per line in the corresponding plane of the YUV image. Setting the stride
|
||||||
|
for any plane to 0 is the same as setting it to the plane width (see
|
||||||
|
<a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>above</code></a>.) If <code>strides</code> is null, then the
|
||||||
|
strides for all planes will be set to their respective plane widths. You
|
||||||
|
can adjust the strides in order to add an arbitrary amount of line padding
|
||||||
|
to each plane or to specify that this <code>YUVImage</code> instance is a
|
||||||
|
subregion of a larger image (in which case, <code>strides[i]</code> should
|
||||||
|
be set to the plane width of plane <code>i</code> in the larger image.)</dd><dd><code>height</code> - height (in pixels) of the new YUV image (or subregion)</dd><dd><code>subsamp</code> - the level of chrominance subsampling used in the YUV
|
||||||
|
image (one of <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_444"><code>TJ.SAMP_*</code></a>)</dd>
|
||||||
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
|
<dd><code>java.lang.Exception</code></dd></dl>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
<a name="YUVImage(byte[], int, int, int, int)">
|
<a name="YUVImage(byte[], int, int, int, int)">
|
||||||
<!-- -->
|
<!-- -->
|
||||||
</a>
|
</a>
|
||||||
@@ -379,10 +520,10 @@ extends java.lang.Object</pre>
|
|||||||
int height,
|
int height,
|
||||||
int subsamp)
|
int subsamp)
|
||||||
throws java.lang.Exception</pre>
|
throws java.lang.Exception</pre>
|
||||||
<div class="block">Create a <code>YUVImage</code> instance from an existing YUV planar image
|
<div class="block">Create a new <code>YUVImage</code> instance from an existing unified image
|
||||||
buffer.</div>
|
buffer.</div>
|
||||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>yuvImage</code> - image buffer that contains or will contain YUV planar
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>yuvImage</code> - image buffer that contains or will contain YUV planar
|
||||||
image data. Use <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#bufSizeYUV(int, int, int, int)"><code>TJ.bufSizeYUV(int, int, int, int)</code></a> to determine the minimum size for
|
image data. Use <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#bufSizeYUV(int,%20int,%20int,%20int)"><code>TJ.bufSizeYUV(int, int, int, int)</code></a> to determine the minimum size for
|
||||||
this buffer. The Y, U (Cb), and V (Cr) image planes are stored
|
this buffer. The Y, U (Cb), and V (Cr) image planes are stored
|
||||||
sequentially in the buffer (see <a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>above</code></a> for a description
|
sequentially in the buffer (see <a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>above</code></a> for a description
|
||||||
of the image format.)</dd><dd><code>width</code> - width (in pixels) of the YUV image</dd><dd><code>pad</code> - the line padding used in the YUV image buffer. For
|
of the image format.)</dd><dd><code>width</code> - width (in pixels) of the YUV image</dd><dd><code>pad</code> - the line padding used in the YUV image buffer. For
|
||||||
@@ -401,6 +542,43 @@ extends java.lang.Object</pre>
|
|||||||
<!-- -->
|
<!-- -->
|
||||||
</a>
|
</a>
|
||||||
<h3>Method Detail</h3>
|
<h3>Method Detail</h3>
|
||||||
|
<a name="setBuf(byte[][], int[], int, int[], int, int)">
|
||||||
|
<!-- -->
|
||||||
|
</a>
|
||||||
|
<ul class="blockList">
|
||||||
|
<li class="blockList">
|
||||||
|
<h4>setBuf</h4>
|
||||||
|
<pre>public void setBuf(byte[][] planes,
|
||||||
|
int[] offsets,
|
||||||
|
int width,
|
||||||
|
int[] strides,
|
||||||
|
int height,
|
||||||
|
int subsamp)
|
||||||
|
throws java.lang.Exception</pre>
|
||||||
|
<div class="block">Assign a set of image planes to this <code>YUVImage</code> instance.</div>
|
||||||
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>planes</code> - an array of buffers representing the Y, U (Cb), and V (Cr)
|
||||||
|
image planes (or just the Y plane, if the image is grayscale.) These
|
||||||
|
planes can be contiguous or non-contiguous in memory. Plane
|
||||||
|
<code>i</code> should be at least <code>offsets[i] +
|
||||||
|
<a href="../../../org/libjpegturbo/turbojpeg/TJ.html#planeSizeYUV(int,%20int,%20int,%20int,%20int)"><code>TJ.planeSizeYUV</code></a>(i, width, strides[i], height, subsamp)</code>
|
||||||
|
bytes in size.</dd><dd><code>offsets</code> - If this <code>YUVImage</code> instance represents a
|
||||||
|
subregion of a larger image, then <code>offsets[i]</code> specifies the
|
||||||
|
offset (in bytes) of the subregion within plane <code>i</code> of the
|
||||||
|
larger image. Setting this to null is the same as setting the offsets for
|
||||||
|
all planes to 0.</dd><dd><code>width</code> - width (in pixels) of the YUV image (or subregion)</dd><dd><code>strides</code> - an array of integers, each specifying the number of bytes
|
||||||
|
per line in the corresponding plane of the YUV image. Setting the stride
|
||||||
|
for any plane to 0 is the same as setting it to the plane width (see
|
||||||
|
<a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>above</code></a>.) If <code>strides</code> is null, then the
|
||||||
|
strides for all planes will be set to their respective plane widths. You
|
||||||
|
can adjust the strides in order to add an arbitrary amount of line padding
|
||||||
|
to each plane or to specify that this <code>YUVImage</code> image is a
|
||||||
|
subregion of a larger image (in which case, <code>strides[i]</code> should
|
||||||
|
be set to the plane width of plane <code>i</code> in the larger image.)</dd><dd><code>height</code> - height (in pixels) of the YUV image (or subregion)</dd><dd><code>subsamp</code> - the level of chrominance subsampling used in the YUV
|
||||||
|
image (one of <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_444"><code>TJ.SAMP_*</code></a>)</dd>
|
||||||
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
|
<dd><code>java.lang.Exception</code></dd></dl>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
<a name="setBuf(byte[], int, int, int, int)">
|
<a name="setBuf(byte[], int, int, int, int)">
|
||||||
<!-- -->
|
<!-- -->
|
||||||
</a>
|
</a>
|
||||||
@@ -413,10 +591,9 @@ extends java.lang.Object</pre>
|
|||||||
int height,
|
int height,
|
||||||
int subsamp)
|
int subsamp)
|
||||||
throws java.lang.Exception</pre>
|
throws java.lang.Exception</pre>
|
||||||
<div class="block">Assign an existing YUV planar image buffer to this <code>YUVImage</code>
|
<div class="block">Assign a unified image buffer to this <code>YUVImage</code> instance.</div>
|
||||||
instance.</div>
|
|
||||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>yuvImage</code> - image buffer that contains or will contain YUV planar
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>yuvImage</code> - image buffer that contains or will contain YUV planar
|
||||||
image data. Use <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#bufSizeYUV(int, int, int, int)"><code>TJ.bufSizeYUV(int, int, int, int)</code></a> to determine the minimum size for
|
image data. Use <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#bufSizeYUV(int,%20int,%20int,%20int)"><code>TJ.bufSizeYUV(int, int, int, int)</code></a> to determine the minimum size for
|
||||||
this buffer. The Y, U (Cb), and V (Cr) image planes are stored
|
this buffer. The Y, U (Cb), and V (Cr) image planes are stored
|
||||||
sequentially in the buffer (see <a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>above</code></a> for a description
|
sequentially in the buffer (see <a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>above</code></a> for a description
|
||||||
of the image format.)</dd><dd><code>width</code> - width (in pixels) of the YUV image</dd><dd><code>pad</code> - the line padding used in the YUV image buffer. For
|
of the image format.)</dd><dd><code>width</code> - width (in pixels) of the YUV image</dd><dd><code>pad</code> - the line padding used in the YUV image buffer. For
|
||||||
@@ -435,8 +612,8 @@ extends java.lang.Object</pre>
|
|||||||
<h4>getWidth</h4>
|
<h4>getWidth</h4>
|
||||||
<pre>public int getWidth()
|
<pre>public int getWidth()
|
||||||
throws java.lang.Exception</pre>
|
throws java.lang.Exception</pre>
|
||||||
<div class="block">Returns the width of the YUV image.</div>
|
<div class="block">Returns the width of the YUV image (or subregion.)</div>
|
||||||
<dl><dt><span class="strong">Returns:</span></dt><dd>the width of the YUV image</dd>
|
<dl><dt><span class="strong">Returns:</span></dt><dd>the width of the YUV image (or subregion)</dd>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code>java.lang.Exception</code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
@@ -449,8 +626,8 @@ extends java.lang.Object</pre>
|
|||||||
<h4>getHeight</h4>
|
<h4>getHeight</h4>
|
||||||
<pre>public int getHeight()
|
<pre>public int getHeight()
|
||||||
throws java.lang.Exception</pre>
|
throws java.lang.Exception</pre>
|
||||||
<div class="block">Returns the height of the YUV image.</div>
|
<div class="block">Returns the height of the YUV image (or subregion.)</div>
|
||||||
<dl><dt><span class="strong">Returns:</span></dt><dd>the height of the YUV image</dd>
|
<dl><dt><span class="strong">Returns:</span></dt><dd>the height of the YUV image (or subregion)</dd>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code>java.lang.Exception</code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
@@ -463,12 +640,43 @@ extends java.lang.Object</pre>
|
|||||||
<h4>getPad</h4>
|
<h4>getPad</h4>
|
||||||
<pre>public int getPad()
|
<pre>public int getPad()
|
||||||
throws java.lang.Exception</pre>
|
throws java.lang.Exception</pre>
|
||||||
<div class="block">Returns the line padding used in the YUV image buffer.</div>
|
<div class="block">Returns the line padding used in the YUV image buffer (if this image is
|
||||||
|
stored in a unified buffer rather than separate image planes.)</div>
|
||||||
<dl><dt><span class="strong">Returns:</span></dt><dd>the line padding used in the YUV image buffer</dd>
|
<dl><dt><span class="strong">Returns:</span></dt><dd>the line padding used in the YUV image buffer</dd>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code>java.lang.Exception</code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
<a name="getStrides()">
|
||||||
|
<!-- -->
|
||||||
|
</a>
|
||||||
|
<ul class="blockList">
|
||||||
|
<li class="blockList">
|
||||||
|
<h4>getStrides</h4>
|
||||||
|
<pre>public int[] getStrides()
|
||||||
|
throws java.lang.Exception</pre>
|
||||||
|
<div class="block">Returns the number of bytes per line of each plane in the YUV image.</div>
|
||||||
|
<dl><dt><span class="strong">Returns:</span></dt><dd>the number of bytes per line of each plane in the YUV image</dd>
|
||||||
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
|
<dd><code>java.lang.Exception</code></dd></dl>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<a name="getOffsets()">
|
||||||
|
<!-- -->
|
||||||
|
</a>
|
||||||
|
<ul class="blockList">
|
||||||
|
<li class="blockList">
|
||||||
|
<h4>getOffsets</h4>
|
||||||
|
<pre>public int[] getOffsets()
|
||||||
|
throws java.lang.Exception</pre>
|
||||||
|
<div class="block">Returns the offsets (in bytes) of each plane within the planes of a larger
|
||||||
|
YUV image.</div>
|
||||||
|
<dl><dt><span class="strong">Returns:</span></dt><dd>the offsets (in bytes) of each plane within the planes of a larger
|
||||||
|
YUV image</dd>
|
||||||
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
|
<dd><code>java.lang.Exception</code></dd></dl>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
<a name="getSubsamp()">
|
<a name="getSubsamp()">
|
||||||
<!-- -->
|
<!-- -->
|
||||||
</a>
|
</a>
|
||||||
@@ -484,6 +692,21 @@ extends java.lang.Object</pre>
|
|||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code>java.lang.Exception</code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
<a name="getPlanes()">
|
||||||
|
<!-- -->
|
||||||
|
</a>
|
||||||
|
<ul class="blockList">
|
||||||
|
<li class="blockList">
|
||||||
|
<h4>getPlanes</h4>
|
||||||
|
<pre>public byte[][] getPlanes()
|
||||||
|
throws java.lang.Exception</pre>
|
||||||
|
<div class="block">Returns the YUV image planes. If the image is stored in a unified buffer,
|
||||||
|
then all image planes will point to that buffer.</div>
|
||||||
|
<dl><dt><span class="strong">Returns:</span></dt><dd>the YUV image planes</dd>
|
||||||
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
|
<dd><code>java.lang.Exception</code></dd></dl>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
<a name="getBuf()">
|
<a name="getBuf()">
|
||||||
<!-- -->
|
<!-- -->
|
||||||
</a>
|
</a>
|
||||||
@@ -492,7 +715,8 @@ extends java.lang.Object</pre>
|
|||||||
<h4>getBuf</h4>
|
<h4>getBuf</h4>
|
||||||
<pre>public byte[] getBuf()
|
<pre>public byte[] getBuf()
|
||||||
throws java.lang.Exception</pre>
|
throws java.lang.Exception</pre>
|
||||||
<div class="block">Returns the YUV image buffer</div>
|
<div class="block">Returns the YUV image buffer (if this image is stored in a unified
|
||||||
|
buffer rather than separate image planes.)</div>
|
||||||
<dl><dt><span class="strong">Returns:</span></dt><dd>the YUV image buffer</dd>
|
<dl><dt><span class="strong">Returns:</span></dt><dd>the YUV image buffer</dd>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code>java.lang.Exception</code></dd></dl>
|
||||||
@@ -506,7 +730,8 @@ extends java.lang.Object</pre>
|
|||||||
<h4>getSize</h4>
|
<h4>getSize</h4>
|
||||||
<pre>public int getSize()
|
<pre>public int getSize()
|
||||||
throws java.lang.Exception</pre>
|
throws java.lang.Exception</pre>
|
||||||
<div class="block">Returns the size (in bytes) of the YUV image buffer</div>
|
<div class="block">Returns the size (in bytes) of the YUV image buffer (if this image is
|
||||||
|
stored in a unified buffer rather than separate image planes.)</div>
|
||||||
<dl><dt><span class="strong">Returns:</span></dt><dd>the size (in bytes) of the YUV image buffer</dd>
|
<dl><dt><span class="strong">Returns:</span></dt><dd>the size (in bytes) of the YUV image buffer</dd>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code>java.lang.Exception</code></dd></dl>
|
||||||
|
|||||||
@@ -84,7 +84,8 @@ public final class TJ {
|
|||||||
* @param subsamp the level of chrominance subsampling (one of
|
* @param subsamp the level of chrominance subsampling (one of
|
||||||
* <code>SAMP_*</code>)
|
* <code>SAMP_*</code>)
|
||||||
*
|
*
|
||||||
* @return the MCU block width for the given level of chrominance subsampling
|
* @return the MCU block width for the given level of chrominance
|
||||||
|
* subsampling.
|
||||||
*/
|
*/
|
||||||
public static int getMCUWidth(int subsamp) throws Exception {
|
public static int getMCUWidth(int subsamp) throws Exception {
|
||||||
if (subsamp < 0 || subsamp >= NUMSAMP)
|
if (subsamp < 0 || subsamp >= NUMSAMP)
|
||||||
@@ -105,7 +106,7 @@ public final class TJ {
|
|||||||
* <code>SAMP_*</code>)
|
* <code>SAMP_*</code>)
|
||||||
*
|
*
|
||||||
* @return the MCU block height for the given level of chrominance
|
* @return the MCU block height for the given level of chrominance
|
||||||
* subsampling
|
* subsampling.
|
||||||
*/
|
*/
|
||||||
public static int getMCUHeight(int subsamp) throws Exception {
|
public static int getMCUHeight(int subsamp) throws Exception {
|
||||||
if (subsamp < 0 || subsamp >= NUMSAMP)
|
if (subsamp < 0 || subsamp >= NUMSAMP)
|
||||||
@@ -214,7 +215,7 @@ public final class TJ {
|
|||||||
*
|
*
|
||||||
* @param pixelFormat the pixel format (one of <code>PF_*</code>)
|
* @param pixelFormat the pixel format (one of <code>PF_*</code>)
|
||||||
*
|
*
|
||||||
* @return the pixel size (in bytes) for the given pixel format
|
* @return the pixel size (in bytes) for the given pixel format.
|
||||||
*/
|
*/
|
||||||
public static int getPixelSize(int pixelFormat) throws Exception {
|
public static int getPixelSize(int pixelFormat) throws Exception {
|
||||||
if (pixelFormat < 0 || pixelFormat >= NUMPF)
|
if (pixelFormat < 0 || pixelFormat >= NUMPF)
|
||||||
@@ -236,7 +237,7 @@ public final class TJ {
|
|||||||
*
|
*
|
||||||
* @param pixelFormat the pixel format (one of <code>PF_*</code>)
|
* @param pixelFormat the pixel format (one of <code>PF_*</code>)
|
||||||
*
|
*
|
||||||
* @return the red offset for the given pixel format
|
* @return the red offset for the given pixel format.
|
||||||
*/
|
*/
|
||||||
public static int getRedOffset(int pixelFormat) throws Exception {
|
public static int getRedOffset(int pixelFormat) throws Exception {
|
||||||
if (pixelFormat < 0 || pixelFormat >= NUMPF)
|
if (pixelFormat < 0 || pixelFormat >= NUMPF)
|
||||||
@@ -258,7 +259,7 @@ public final class TJ {
|
|||||||
*
|
*
|
||||||
* @param pixelFormat the pixel format (one of <code>PF_*</code>)
|
* @param pixelFormat the pixel format (one of <code>PF_*</code>)
|
||||||
*
|
*
|
||||||
* @return the green offset for the given pixel format
|
* @return the green offset for the given pixel format.
|
||||||
*/
|
*/
|
||||||
public static int getGreenOffset(int pixelFormat) throws Exception {
|
public static int getGreenOffset(int pixelFormat) throws Exception {
|
||||||
if (pixelFormat < 0 || pixelFormat >= NUMPF)
|
if (pixelFormat < 0 || pixelFormat >= NUMPF)
|
||||||
@@ -280,7 +281,7 @@ public final class TJ {
|
|||||||
*
|
*
|
||||||
* @param pixelFormat the pixel format (one of <code>PF_*</code>)
|
* @param pixelFormat the pixel format (one of <code>PF_*</code>)
|
||||||
*
|
*
|
||||||
* @return the blue offset for the given pixel format
|
* @return the blue offset for the given pixel format.
|
||||||
*/
|
*/
|
||||||
public static int getBlueOffset(int pixelFormat) throws Exception {
|
public static int getBlueOffset(int pixelFormat) throws Exception {
|
||||||
if (pixelFormat < 0 || pixelFormat >= NUMPF)
|
if (pixelFormat < 0 || pixelFormat >= NUMPF)
|
||||||
@@ -404,7 +405,7 @@ public final class TJ {
|
|||||||
* generating the JPEG image (one of {@link TJ TJ.SAMP_*})
|
* generating the JPEG image (one of {@link TJ TJ.SAMP_*})
|
||||||
*
|
*
|
||||||
* @return the maximum size of the buffer (in bytes) required to hold a JPEG
|
* @return the maximum size of the buffer (in bytes) required to hold a JPEG
|
||||||
* image with the given width, height, and level of chrominance subsampling
|
* image with the given width, height, and level of chrominance subsampling.
|
||||||
*/
|
*/
|
||||||
public static native int bufSize(int width, int height, int jpegSubsamp)
|
public static native int bufSize(int width, int height, int jpegSubsamp)
|
||||||
throws Exception;
|
throws Exception;
|
||||||
@@ -416,8 +417,7 @@ public final class TJ {
|
|||||||
* @param width the width (in pixels) of the YUV image
|
* @param width the width (in pixels) of the YUV image
|
||||||
*
|
*
|
||||||
* @param pad the width of each line in each plane of the image is padded to
|
* @param pad the width of each line in each plane of the image is padded to
|
||||||
* the nearest multiple of this number of bytes (must be a power of
|
* the nearest multiple of this number of bytes (must be a power of 2.)
|
||||||
* 2.)
|
|
||||||
*
|
*
|
||||||
* @param height the height (in pixels) of the YUV image
|
* @param height the height (in pixels) of the YUV image
|
||||||
*
|
*
|
||||||
@@ -425,7 +425,7 @@ public final class TJ {
|
|||||||
* image (one of {@link TJ TJ.SAMP_*})
|
* image (one of {@link TJ TJ.SAMP_*})
|
||||||
*
|
*
|
||||||
* @return the size of the buffer (in bytes) required to hold a YUV planar
|
* @return the size of the buffer (in bytes) required to hold a YUV planar
|
||||||
* image with the given width, height, and level of chrominance subsampling
|
* image with the given width, height, and level of chrominance subsampling.
|
||||||
*/
|
*/
|
||||||
public static native int bufSizeYUV(int width, int pad, int height,
|
public static native int bufSizeYUV(int width, int pad, int height,
|
||||||
int subsamp)
|
int subsamp)
|
||||||
@@ -438,12 +438,72 @@ public final class TJ {
|
|||||||
public static native int bufSizeYUV(int width, int height, int subsamp)
|
public static native int bufSizeYUV(int width, int height, int subsamp)
|
||||||
throws Exception;
|
throws Exception;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the size of the buffer (in bytes) required to hold a YUV image
|
||||||
|
* plane with the given parameters.
|
||||||
|
*
|
||||||
|
* @param componentID ID number of the image plane (0 = Y, 1 = U/Cb,
|
||||||
|
* 2 = V/Cr)
|
||||||
|
*
|
||||||
|
* @param width width (in pixels) of the YUV image. NOTE: this is the width
|
||||||
|
* of the whole image, not the plane width.
|
||||||
|
*
|
||||||
|
* @param stride bytes per line in the image plane.
|
||||||
|
*
|
||||||
|
* @param height height (in pixels) of the YUV image. NOTE: this is the
|
||||||
|
* height of the whole image, not the plane height.
|
||||||
|
*
|
||||||
|
* @param subsamp the level of chrominance subsampling used in the YUV
|
||||||
|
* image (one of {@link TJ TJ.SAMP_*})
|
||||||
|
*
|
||||||
|
* @return the size of the buffer (in bytes) required to hold a YUV planar
|
||||||
|
* image with the given parameters.
|
||||||
|
*/
|
||||||
|
public static native int planeSizeYUV(int componentID, int width, int stride,
|
||||||
|
int height, int subsamp)
|
||||||
|
throws Exception;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the plane width of a YUV image plane with the given parameters.
|
||||||
|
* Refer to {@link YUVImage YUVImage} for a description of plane width.
|
||||||
|
*
|
||||||
|
* @param componentID ID number of the image plane (0 = Y, 1 = U/Cb,
|
||||||
|
* 2 = V/Cr)
|
||||||
|
*
|
||||||
|
* @param width width (in pixels) of the YUV image
|
||||||
|
*
|
||||||
|
* @param subsamp the level of chrominance subsampling used in the YUV image
|
||||||
|
* (one of {@link TJ TJ.SAMP_*})
|
||||||
|
*
|
||||||
|
* @return the plane width of a YUV image plane with the given parameters.
|
||||||
|
*/
|
||||||
|
public static native int planeWidth(int componentID, int width, int subsamp)
|
||||||
|
throws Exception;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the plane height of a YUV image plane with the given parameters.
|
||||||
|
* Refer to {@link YUVImage YUVImage} for a description of plane height.
|
||||||
|
*
|
||||||
|
* @param componentID ID number of the image plane (0 = Y, 1 = U/Cb,
|
||||||
|
* 2 = V/Cr)
|
||||||
|
*
|
||||||
|
* @param height height (in pixels) of the YUV image
|
||||||
|
*
|
||||||
|
* @param subsamp the level of chrominance subsampling used in the YUV image
|
||||||
|
* (one of {@link TJ TJ.SAMP_*})
|
||||||
|
*
|
||||||
|
* @return the plane height of a YUV image plane with the given parameters.
|
||||||
|
*/
|
||||||
|
public static native int planeHeight(int componentID, int height,
|
||||||
|
int subsamp)
|
||||||
|
throws Exception;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a list of fractional scaling factors that the JPEG decompressor in
|
* Returns a list of fractional scaling factors that the JPEG decompressor in
|
||||||
* this implementation of TurboJPEG supports.
|
* this implementation of TurboJPEG supports.
|
||||||
*
|
*
|
||||||
* @return a list of fractional scaling factors that the JPEG decompressor in
|
* @return a list of fractional scaling factors that the JPEG decompressor in
|
||||||
* this implementation of TurboJPEG supports
|
* this implementation of TurboJPEG supports.
|
||||||
*/
|
*/
|
||||||
public static native TJScalingFactor[] getScalingFactors()
|
public static native TJScalingFactor[] getScalingFactors()
|
||||||
throws Exception;
|
throws Exception;
|
||||||
|
|||||||
@@ -332,9 +332,10 @@ public class TJCompressor {
|
|||||||
throw new Exception("Subsampling level not set");
|
throw new Exception("Subsampling level not set");
|
||||||
|
|
||||||
if (srcYUVImage != null)
|
if (srcYUVImage != null)
|
||||||
compressedSize = compressFromYUV(srcYUVImage.getBuf(),
|
compressedSize = compressFromYUV(srcYUVImage.getPlanes(),
|
||||||
|
srcYUVImage.getOffsets(),
|
||||||
srcYUVImage.getWidth(),
|
srcYUVImage.getWidth(),
|
||||||
srcYUVImage.getPad(),
|
srcYUVImage.getStrides(),
|
||||||
srcYUVImage.getHeight(),
|
srcYUVImage.getHeight(),
|
||||||
srcYUVImage.getSubsamp(),
|
srcYUVImage.getSubsamp(),
|
||||||
dstBuf, jpegQuality, flags);
|
dstBuf, jpegQuality, flags);
|
||||||
@@ -429,14 +430,14 @@ public class TJCompressor {
|
|||||||
|
|
||||||
if (srcBufInt != null) {
|
if (srcBufInt != null) {
|
||||||
encodeYUV(srcBufInt, srcX, srcY, srcWidth, srcStride, srcHeight,
|
encodeYUV(srcBufInt, srcX, srcY, srcWidth, srcStride, srcHeight,
|
||||||
srcPixelFormat, dstImage.getBuf(), dstImage.getPad(),
|
srcPixelFormat, dstImage.getPlanes(), dstImage.getOffsets(),
|
||||||
dstImage.getSubsamp(), flags);
|
dstImage.getStrides(), dstImage.getSubsamp(), flags);
|
||||||
} else {
|
} else {
|
||||||
encodeYUV(srcBuf, srcX, srcY, srcWidth, srcPitch, srcHeight,
|
encodeYUV(srcBuf, srcX, srcY, srcWidth, srcPitch, srcHeight,
|
||||||
srcPixelFormat, dstImage.getBuf(), dstImage.getPad(),
|
srcPixelFormat, dstImage.getPlanes(), dstImage.getOffsets(),
|
||||||
dstImage.getSubsamp(), flags);
|
dstImage.getStrides(), dstImage.getSubsamp(), flags);
|
||||||
}
|
}
|
||||||
compressedSize = dstImage.getSize();
|
compressedSize = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -456,11 +457,11 @@ public class TJCompressor {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Encode the uncompressed source image associated with this compressor
|
* Encode the uncompressed source image associated with this compressor
|
||||||
* instance into a YUV planar image and return a <code>YUVImage</code>
|
* instance into a unified YUV planar image buffer and return a
|
||||||
* instance containing the encoded image. This method uses the accelerated
|
* <code>YUVImage</code> instance containing the encoded image. This method
|
||||||
* color conversion routines in TurboJPEG's underlying codec but does not
|
* uses the accelerated color conversion routines in TurboJPEG's underlying
|
||||||
* execute any of the other steps in the JPEG compression process. Encoding
|
* codec but does not execute any of the other steps in the JPEG compression
|
||||||
* CMYK source images to YUV is not supported.
|
* process. Encoding CMYK source images to YUV is not supported.
|
||||||
*
|
*
|
||||||
* @param pad the width of each line in each plane of the YUV image will be
|
* @param pad 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
|
* padded to the nearest multiple of this number of bytes (must be a power of
|
||||||
@@ -469,7 +470,7 @@ public class TJCompressor {
|
|||||||
* @param flags the bitwise OR of one or more of
|
* @param flags the bitwise OR of one or more of
|
||||||
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
||||||
*
|
*
|
||||||
* @return a YUV planar image
|
* @return a YUV planar image.
|
||||||
*/
|
*/
|
||||||
public YUVImage encodeYUV(int pad, int flags) throws Exception {
|
public YUVImage encodeYUV(int pad, int flags) throws Exception {
|
||||||
if (srcWidth < 1 || srcHeight < 1)
|
if (srcWidth < 1 || srcHeight < 1)
|
||||||
@@ -483,6 +484,37 @@ public class TJCompressor {
|
|||||||
return yuvImage;
|
return yuvImage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Encode the uncompressed source image associated with this compressor
|
||||||
|
* instance into separate Y, U (Cb), and V (Cr) image planes and return a
|
||||||
|
* <code>YUVImage</code> instance containing the encoded image planes. This
|
||||||
|
* method uses the accelerated color conversion routines in TurboJPEG's
|
||||||
|
* underlying codec but does not execute any of the other steps in the JPEG
|
||||||
|
* compression process. Encoding CMYK source images to YUV is not supported.
|
||||||
|
*
|
||||||
|
* @param strides an array of integers, each specifying the number of bytes
|
||||||
|
* per line in the corresponding plane of the output image. Setting the
|
||||||
|
* stride for any plane to 0 is the same as setting it to the component width
|
||||||
|
* of the plane. If <code>strides</code> is null, then the strides for all
|
||||||
|
* planes will be set to their respective component widths. You can adjust
|
||||||
|
* the strides in order to add an arbitrary amount of line padding to each
|
||||||
|
* plane.
|
||||||
|
*
|
||||||
|
* @param flags the bitwise OR of one or more of
|
||||||
|
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
||||||
|
*
|
||||||
|
* @return a YUV planar image.
|
||||||
|
*/
|
||||||
|
public YUVImage encodeYUV(int[] strides, int flags) throws Exception {
|
||||||
|
if (srcWidth < 1 || srcHeight < 1)
|
||||||
|
throw new Exception(NO_ASSOC_ERROR);
|
||||||
|
if (subsamp < 0)
|
||||||
|
throw new Exception("Subsampling level not set");
|
||||||
|
YUVImage yuvImage = new YUVImage(srcWidth, strides, srcHeight, subsamp);
|
||||||
|
encodeYUV(yuvImage, flags);
|
||||||
|
return yuvImage;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated Use {@link #encodeYUV(int, int)} instead.
|
* @deprecated Use {@link #encodeYUV(int, int)} instead.
|
||||||
*/
|
*/
|
||||||
@@ -512,7 +544,7 @@ public class TJCompressor {
|
|||||||
/**
|
/**
|
||||||
* @deprecated Use
|
* @deprecated Use
|
||||||
* {@link #setSourceImage(BufferedImage, int, int, int, int)} and
|
* {@link #setSourceImage(BufferedImage, int, int, int, int)} and
|
||||||
* {@link #encodeYUV(int)} instead.
|
* {@link #encodeYUV(int, int)} instead.
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public byte[] encodeYUV(BufferedImage srcImage, int flags) throws Exception {
|
public byte[] encodeYUV(BufferedImage srcImage, int flags) throws Exception {
|
||||||
@@ -522,10 +554,10 @@ public class TJCompressor {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the size of the image (in bytes) generated by the most recent
|
* Returns the size of the image (in bytes) generated by the most recent
|
||||||
* compress/encode operation.
|
* compress operation.
|
||||||
*
|
*
|
||||||
* @return the size of the image (in bytes) generated by the most recent
|
* @return the size of the image (in bytes) generated by the most recent
|
||||||
* compress/encode operation
|
* compress operation.
|
||||||
*/
|
*/
|
||||||
public int getCompressedSize() {
|
public int getCompressedSize() {
|
||||||
return compressedSize;
|
return compressedSize;
|
||||||
@@ -568,8 +600,9 @@ public class TJCompressor {
|
|||||||
int stride, int height, int pixelFormat, byte[] dstBuf, int jpegSubsamp,
|
int stride, int height, int pixelFormat, byte[] dstBuf, int jpegSubsamp,
|
||||||
int jpegQual, int flags) throws Exception;
|
int jpegQual, int flags) throws Exception;
|
||||||
|
|
||||||
private native int compressFromYUV(byte[] srcBuf, int width, int pad,
|
private native int compressFromYUV(byte[][] srcPlanes, int[] srcOffsets,
|
||||||
int height, int subsamp, byte[] dstBuf, int jpegQual, int flags)
|
int width, int[] srcStrides, int height, int subsamp, byte[] dstBuf,
|
||||||
|
int jpegQual, int flags)
|
||||||
throws Exception;
|
throws Exception;
|
||||||
|
|
||||||
private native void encodeYUV(byte[] srcBuf, int width, int pitch,
|
private native void encodeYUV(byte[] srcBuf, int width, int pitch,
|
||||||
@@ -577,16 +610,18 @@ public class TJCompressor {
|
|||||||
throws Exception; // deprecated
|
throws Exception; // deprecated
|
||||||
|
|
||||||
private native void encodeYUV(byte[] srcBuf, int x, int y, int width,
|
private native void encodeYUV(byte[] srcBuf, int x, int y, int width,
|
||||||
int pitch, int height, int pixelFormat, byte[] dstBuf, int pad,
|
int pitch, int height, int pixelFormat, byte[][] dstPlanes,
|
||||||
int subsamp, int flags) throws Exception;
|
int[] dstOffsets, int[] dstStrides, int subsamp, int flags)
|
||||||
|
throws Exception;
|
||||||
|
|
||||||
private native void encodeYUV(int[] srcBuf, int width, int stride,
|
private native void encodeYUV(int[] srcBuf, int width, int stride,
|
||||||
int height, int pixelFormat, byte[] dstBuf, int subsamp, int flags)
|
int height, int pixelFormat, byte[] dstBuf, int subsamp, int flags)
|
||||||
throws Exception; // deprecated
|
throws Exception; // deprecated
|
||||||
|
|
||||||
private native void encodeYUV(int[] srcBuf, int x, int y, int width,
|
private native void encodeYUV(int[] srcBuf, int x, int y, int width,
|
||||||
int pitch, int height, int pixelFormat, byte[] dstBuf, int pad,
|
int srcStride, int height, int pixelFormat, byte[][] dstPlanes,
|
||||||
int subsamp, int flags) throws Exception;
|
int[] dstOffsets, int[] dstStrides, int subsamp, int flags)
|
||||||
|
throws Exception;
|
||||||
|
|
||||||
static {
|
static {
|
||||||
TJLoader.load();
|
TJLoader.load();
|
||||||
|
|||||||
@@ -87,18 +87,18 @@ public class TJDecompressor {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Associate the JPEG image of length <code>imageSize</code> bytes stored in
|
* Associate the JPEG image of length <code>imageSize</code> bytes stored in
|
||||||
* <code>srcImage</code> with this decompressor instance. This image will
|
* <code>jpegImage</code> with this decompressor instance. This image will
|
||||||
* be used as the source image for subsequent decompress operations.
|
* be used as the source image for subsequent decompress operations.
|
||||||
*
|
*
|
||||||
* @param srcImage JPEG image buffer
|
* @param jpegImage JPEG image buffer
|
||||||
*
|
*
|
||||||
* @param imageSize size of the JPEG image (in bytes)
|
* @param imageSize size of the JPEG image (in bytes)
|
||||||
*/
|
*/
|
||||||
public void setSourceImage(byte[] srcImage, int imageSize)
|
public void setSourceImage(byte[] jpegImage, int imageSize)
|
||||||
throws Exception {
|
throws Exception {
|
||||||
if (srcImage == null || imageSize < 1)
|
if (jpegImage == null || imageSize < 1)
|
||||||
throw new Exception("Invalid argument in setSourceImage()");
|
throw new Exception("Invalid argument in setSourceImage()");
|
||||||
jpegBuf = srcImage;
|
jpegBuf = jpegImage;
|
||||||
jpegBufSize = imageSize;
|
jpegBufSize = imageSize;
|
||||||
decompressHeader(jpegBuf, jpegBufSize);
|
decompressHeader(jpegBuf, jpegBufSize);
|
||||||
yuvImage = null;
|
yuvImage = null;
|
||||||
@@ -134,7 +134,7 @@ public class TJDecompressor {
|
|||||||
* decompressor instance.
|
* decompressor instance.
|
||||||
*
|
*
|
||||||
* @return the width of the source image (JPEG or YUV) associated with this
|
* @return the width of the source image (JPEG or YUV) associated with this
|
||||||
* decompressor instance
|
* decompressor instance.
|
||||||
*/
|
*/
|
||||||
public int getWidth() throws Exception {
|
public int getWidth() throws Exception {
|
||||||
if (yuvImage != null)
|
if (yuvImage != null)
|
||||||
@@ -149,7 +149,7 @@ public class TJDecompressor {
|
|||||||
* decompressor instance.
|
* decompressor instance.
|
||||||
*
|
*
|
||||||
* @return the height of the source image (JPEG or YUV) associated with this
|
* @return the height of the source image (JPEG or YUV) associated with this
|
||||||
* decompressor instance
|
* decompressor instance.
|
||||||
*/
|
*/
|
||||||
public int getHeight() throws Exception {
|
public int getHeight() throws Exception {
|
||||||
if (yuvImage != null)
|
if (yuvImage != null)
|
||||||
@@ -165,7 +165,7 @@ public class TJDecompressor {
|
|||||||
* {@link TJ#SAMP_444 TJ.SAMP_*}.
|
* {@link TJ#SAMP_444 TJ.SAMP_*}.
|
||||||
*
|
*
|
||||||
* @return the level of chrominance subsampling used in the source image
|
* @return the level of chrominance subsampling used in the source image
|
||||||
* (JPEG or YUV) associated with this decompressor instance
|
* (JPEG or YUV) associated with this decompressor instance.
|
||||||
*/
|
*/
|
||||||
public int getSubsamp() throws Exception {
|
public int getSubsamp() throws Exception {
|
||||||
if (yuvImage != null)
|
if (yuvImage != null)
|
||||||
@@ -183,7 +183,7 @@ public class TJDecompressor {
|
|||||||
* source image is YUV, then this always returns {@link TJ#CS_YCbCr}.
|
* source image is YUV, then this always returns {@link TJ#CS_YCbCr}.
|
||||||
*
|
*
|
||||||
* @return the colorspace used in the source image (JPEG or YUV) associated
|
* @return the colorspace used in the source image (JPEG or YUV) associated
|
||||||
* with this decompressor instance
|
* with this decompressor instance.
|
||||||
*/
|
*/
|
||||||
public int getColorspace() throws Exception {
|
public int getColorspace() throws Exception {
|
||||||
if (yuvImage != null)
|
if (yuvImage != null)
|
||||||
@@ -196,23 +196,10 @@ public class TJDecompressor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the source image buffer associated with this decompressor
|
* Returns the JPEG image buffer associated with this decompressor instance.
|
||||||
* instance.
|
|
||||||
*
|
*
|
||||||
* @return the source image buffer associated with this decompressor instance
|
* @return the JPEG image buffer associated with this decompressor instance.
|
||||||
*/
|
*/
|
||||||
public byte[] getSourceBuf() throws Exception {
|
|
||||||
if (yuvImage != null)
|
|
||||||
return yuvImage.getBuf();
|
|
||||||
if (jpegBuf == null)
|
|
||||||
throw new Exception(NO_ASSOC_ERROR);
|
|
||||||
return jpegBuf;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated Use {@link #getSourceBuf} instead.
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
public byte[] getJPEGBuf() throws Exception {
|
public byte[] getJPEGBuf() throws Exception {
|
||||||
if (jpegBuf == null)
|
if (jpegBuf == null)
|
||||||
throw new Exception(NO_ASSOC_ERROR);
|
throw new Exception(NO_ASSOC_ERROR);
|
||||||
@@ -220,24 +207,12 @@ public class TJDecompressor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the size of the source image (in bytes) associated with this
|
* Returns the size of the JPEG image (in bytes) associated with this
|
||||||
* decompressor instance.
|
* decompressor instance.
|
||||||
*
|
*
|
||||||
* @return the size of the source image (in bytes) associated with this
|
* @return the size of the JPEG image (in bytes) associated with this
|
||||||
* decompressor instance
|
* decompressor instance.
|
||||||
*/
|
*/
|
||||||
public int getSourceSize() throws Exception {
|
|
||||||
if (yuvImage != null)
|
|
||||||
return yuvImage.getSize();
|
|
||||||
if (jpegBufSize < 1)
|
|
||||||
throw new Exception(NO_ASSOC_ERROR);
|
|
||||||
return jpegBufSize;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated Use {@link #getSourceSize} instead.
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
public int getJPEGSize() throws Exception {
|
public int getJPEGSize() throws Exception {
|
||||||
if (jpegBufSize < 1)
|
if (jpegBufSize < 1)
|
||||||
throw new Exception(NO_ASSOC_ERROR);
|
throw new Exception(NO_ASSOC_ERROR);
|
||||||
@@ -261,7 +236,7 @@ public class TJDecompressor {
|
|||||||
*
|
*
|
||||||
* @return the width of the largest scaled-down image that the TurboJPEG
|
* @return 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
|
||||||
* height
|
* height.
|
||||||
*/
|
*/
|
||||||
public int getScaledWidth(int desiredWidth, int desiredHeight)
|
public int getScaledWidth(int desiredWidth, int desiredHeight)
|
||||||
throws Exception {
|
throws Exception {
|
||||||
@@ -303,7 +278,7 @@ public class TJDecompressor {
|
|||||||
*
|
*
|
||||||
* @return the height of the largest scaled-down image that the TurboJPEG
|
* @return the height 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
|
||||||
* height
|
* height.
|
||||||
*/
|
*/
|
||||||
public int getScaledHeight(int desiredWidth, int desiredHeight)
|
public int getScaledHeight(int desiredWidth, int desiredHeight)
|
||||||
throws Exception {
|
throws Exception {
|
||||||
@@ -402,9 +377,10 @@ public class TJDecompressor {
|
|||||||
pixelFormat < 0 || pixelFormat >= TJ.NUMPF || flags < 0)
|
pixelFormat < 0 || pixelFormat >= TJ.NUMPF || flags < 0)
|
||||||
throw new Exception("Invalid argument in decompress()");
|
throw new Exception("Invalid argument in decompress()");
|
||||||
if (yuvImage != null)
|
if (yuvImage != null)
|
||||||
decodeYUV(yuvImage.getBuf(), yuvImage.getPad(), yuvImage.getSubsamp(),
|
decodeYUV(yuvImage.getPlanes(), yuvImage.getOffsets(),
|
||||||
dstBuf, x, y, yuvImage.getWidth(), pitch, yuvImage.getHeight(),
|
yuvImage.getStrides(), yuvImage.getSubsamp(), dstBuf, x, y,
|
||||||
pixelFormat, flags);
|
yuvImage.getWidth(), pitch, yuvImage.getHeight(), pixelFormat,
|
||||||
|
flags);
|
||||||
else {
|
else {
|
||||||
if (x > 0 || y > 0)
|
if (x > 0 || y > 0)
|
||||||
decompress(jpegBuf, jpegBufSize, dstBuf, x, y, desiredWidth, pitch,
|
decompress(jpegBuf, jpegBufSize, dstBuf, x, y, desiredWidth, pitch,
|
||||||
@@ -449,7 +425,7 @@ public class TJDecompressor {
|
|||||||
* @param flags the bitwise OR of one or more of
|
* @param flags the bitwise OR of one or more of
|
||||||
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
||||||
*
|
*
|
||||||
* @return a buffer containing the decompressed image
|
* @return a buffer containing the decompressed image.
|
||||||
*/
|
*/
|
||||||
public byte[] decompress(int desiredWidth, int pitch, int desiredHeight,
|
public byte[] decompress(int desiredWidth, int pitch, int desiredHeight,
|
||||||
int pixelFormat, int flags) throws Exception {
|
int pixelFormat, int flags) throws Exception {
|
||||||
@@ -500,9 +476,9 @@ public class TJDecompressor {
|
|||||||
if (jpegSubsamp != dstImage.getSubsamp())
|
if (jpegSubsamp != dstImage.getSubsamp())
|
||||||
throw new Exception("YUVImage subsampling level does not match that of the JPEG image");
|
throw new Exception("YUVImage subsampling level does not match that of the JPEG image");
|
||||||
|
|
||||||
decompressToYUV(jpegBuf, jpegBufSize, dstImage.getBuf(),
|
decompressToYUV(jpegBuf, jpegBufSize, dstImage.getPlanes(),
|
||||||
dstImage.getWidth(), dstImage.getPad(),
|
dstImage.getOffsets(), dstImage.getWidth(),
|
||||||
dstImage.getHeight(), flags);
|
dstImage.getStrides(), dstImage.getHeight(), flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -517,12 +493,70 @@ public class TJDecompressor {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Decompress the JPEG source image associated with this decompressor
|
* Decompress the JPEG source image associated with this decompressor
|
||||||
* instance into a YUV planar image and return a <code>YUVImage</code>
|
* instance into a set of Y, U (Cb), and V (Cr) image planes and return a
|
||||||
* instance containing the decompressed image. This method performs JPEG
|
* <code>YUVImage</code> instance containing the decompressed image planes.
|
||||||
* decompression but leaves out the color conversion step, so a planar YUV
|
* This method performs JPEG decompression but leaves out the color
|
||||||
* image is generated instead of an RGB or grayscale image. This method
|
* conversion step, so a planar YUV image is generated instead of an RGB or
|
||||||
* cannot be used to decompress JPEG source images with the CMYK or YCCK
|
* grayscale image. This method cannot be used to decompress JPEG source
|
||||||
* colorspace.
|
* images with the CMYK or YCCK colorspace.
|
||||||
|
*
|
||||||
|
* @param desiredWidth 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.)
|
||||||
|
*
|
||||||
|
* @param strides an array of integers, each specifying the number of bytes
|
||||||
|
* per line in the corresponding plane of the output image. Setting the
|
||||||
|
* stride for any plane to 0 is the same as setting it to the scaled
|
||||||
|
* component width of the plane. If <tt>strides</tt> is NULL, then the
|
||||||
|
* strides for all planes will be set to their respective scaled component
|
||||||
|
* widths. You can adjust the strides in order to add an arbitrary amount of
|
||||||
|
* line padding to each plane.
|
||||||
|
*
|
||||||
|
* @param desiredHeight 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.)
|
||||||
|
*
|
||||||
|
* @param flags the bitwise OR of one or more of
|
||||||
|
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
||||||
|
*
|
||||||
|
* @return a YUV planar image.
|
||||||
|
*/
|
||||||
|
public YUVImage decompressToYUV(int desiredWidth, int[] strides,
|
||||||
|
int desiredHeight,
|
||||||
|
int flags) throws Exception {
|
||||||
|
if (flags < 0)
|
||||||
|
throw new Exception("Invalid argument in decompressToYUV()");
|
||||||
|
if (jpegWidth < 1 || jpegHeight < 1 || jpegSubsamp < 0)
|
||||||
|
throw new Exception(NO_ASSOC_ERROR);
|
||||||
|
if (jpegSubsamp >= TJ.NUMSAMP)
|
||||||
|
throw new Exception("JPEG header information is invalid");
|
||||||
|
if (yuvImage != null)
|
||||||
|
throw new Exception("Source image is the wrong type");
|
||||||
|
|
||||||
|
int scaledWidth = getScaledWidth(desiredWidth, desiredHeight);
|
||||||
|
int scaledHeight = getScaledHeight(desiredWidth, desiredHeight);
|
||||||
|
YUVImage yuvImage = new YUVImage(scaledWidth, null, scaledHeight,
|
||||||
|
jpegSubsamp);
|
||||||
|
decompressToYUV(yuvImage, flags);
|
||||||
|
return yuvImage;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Decompress the JPEG source image associated with this decompressor
|
||||||
|
* instance into a unified YUV planar image buffer and return a
|
||||||
|
* <code>YUVImage</code> instance containing the decompressed image. This
|
||||||
|
* method performs JPEG decompression but leaves out the color conversion
|
||||||
|
* step, so a planar YUV image is generated instead of an RGB or grayscale
|
||||||
|
* image. This method cannot be used to decompress JPEG source images with
|
||||||
|
* the CMYK or YCCK colorspace.
|
||||||
*
|
*
|
||||||
* @param desiredWidth desired width (in pixels) of the YUV image. If the
|
* @param desiredWidth desired width (in pixels) of the YUV image. If the
|
||||||
* desired image dimensions are different than the dimensions of the JPEG
|
* desired image dimensions are different than the dimensions of the JPEG
|
||||||
@@ -547,7 +581,7 @@ public class TJDecompressor {
|
|||||||
* @param flags the bitwise OR of one or more of
|
* @param flags the bitwise OR of one or more of
|
||||||
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
||||||
*
|
*
|
||||||
* @return a YUV planar image
|
* @return a YUV planar image.
|
||||||
*/
|
*/
|
||||||
public YUVImage decompressToYUV(int desiredWidth, int pad, int desiredHeight,
|
public YUVImage decompressToYUV(int desiredWidth, int pad, int desiredHeight,
|
||||||
int flags) throws Exception {
|
int flags) throws Exception {
|
||||||
@@ -650,9 +684,10 @@ public class TJDecompressor {
|
|||||||
pixelFormat < 0 || pixelFormat >= TJ.NUMPF || flags < 0)
|
pixelFormat < 0 || pixelFormat >= TJ.NUMPF || flags < 0)
|
||||||
throw new Exception("Invalid argument in decompress()");
|
throw new Exception("Invalid argument in decompress()");
|
||||||
if (yuvImage != null)
|
if (yuvImage != null)
|
||||||
decodeYUV(yuvImage.getBuf(), yuvImage.getPad(), yuvImage.getSubsamp(),
|
decodeYUV(yuvImage.getPlanes(), yuvImage.getOffsets(),
|
||||||
dstBuf, x, y, yuvImage.getWidth(), stride,
|
yuvImage.getStrides(), yuvImage.getSubsamp(), dstBuf, x, y,
|
||||||
yuvImage.getHeight(), pixelFormat, flags);
|
yuvImage.getWidth(), stride, yuvImage.getHeight(), pixelFormat,
|
||||||
|
flags);
|
||||||
else
|
else
|
||||||
decompress(jpegBuf, jpegBufSize, dstBuf, x, y, desiredWidth, stride,
|
decompress(jpegBuf, jpegBufSize, dstBuf, x, y, desiredWidth, stride,
|
||||||
desiredHeight, pixelFormat, flags);
|
desiredHeight, pixelFormat, flags);
|
||||||
@@ -734,8 +769,9 @@ public class TJDecompressor {
|
|||||||
DataBufferInt db = (DataBufferInt)wr.getDataBuffer();
|
DataBufferInt db = (DataBufferInt)wr.getDataBuffer();
|
||||||
int[] buf = db.getData();
|
int[] buf = db.getData();
|
||||||
if (yuvImage != null)
|
if (yuvImage != null)
|
||||||
decodeYUV(yuvImage.getBuf(), yuvImage.getPad(), yuvImage.getSubsamp(),
|
decodeYUV(yuvImage.getPlanes(), yuvImage.getOffsets(),
|
||||||
buf, 0, 0, yuvImage.getWidth(), stride, yuvImage.getHeight(),
|
yuvImage.getStrides(), yuvImage.getSubsamp(), buf, 0, 0,
|
||||||
|
yuvImage.getWidth(), stride, yuvImage.getHeight(),
|
||||||
pixelFormat, flags);
|
pixelFormat, flags);
|
||||||
else {
|
else {
|
||||||
if (jpegBuf == null)
|
if (jpegBuf == null)
|
||||||
@@ -778,7 +814,7 @@ public class TJDecompressor {
|
|||||||
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
||||||
*
|
*
|
||||||
* @return a <code>BufferedImage</code> instance containing the
|
* @return a <code>BufferedImage</code> instance containing the
|
||||||
* decompressed/decoded image
|
* decompressed/decoded image.
|
||||||
*/
|
*/
|
||||||
public BufferedImage decompress(int desiredWidth, int desiredHeight,
|
public BufferedImage decompress(int desiredWidth, int desiredHeight,
|
||||||
int bufferedImageType, int flags)
|
int bufferedImageType, int flags)
|
||||||
@@ -836,16 +872,17 @@ public class TJDecompressor {
|
|||||||
private native void decompressToYUV(byte[] srcBuf, int size, byte[] dstBuf,
|
private native void decompressToYUV(byte[] srcBuf, int size, byte[] dstBuf,
|
||||||
int flags) throws Exception; // deprecated
|
int flags) throws Exception; // deprecated
|
||||||
|
|
||||||
private native void decompressToYUV(byte[] srcBuf, int size, byte[] dstBuf,
|
private native void decompressToYUV(byte[] srcBuf, int size,
|
||||||
int desiredWidth, int pad, int desiredheight, int flags) throws Exception;
|
byte[][] dstPlanes, int[] dstOffsets, int desiredWidth, int[] dstStrides,
|
||||||
|
int desiredheight, int flags) throws Exception;
|
||||||
|
|
||||||
private native void decodeYUV(byte[] srcBuf, int pad, int subsamp,
|
private native void decodeYUV(byte[][] srcPlanes, int[] srcOffsets,
|
||||||
byte[] dstBuf, int x, int y, int width, int pitch, int height,
|
int[] srcStrides, int subsamp, byte[] dstBuf, int x, int y, int width,
|
||||||
int pixelFormat, int flags) throws Exception;
|
int pitch, int height, int pixelFormat, int flags) throws Exception;
|
||||||
|
|
||||||
private native void decodeYUV(byte[] srcBuf, int pad, int subsamp,
|
private native void decodeYUV(byte[][] srcPlanes, int[] srcOffsets,
|
||||||
int[] dstBuf, int x, int y, int width, int stride, int height,
|
int[] srcStrides, int subsamp, int[] dstBuf, int x, int y, int width,
|
||||||
int pixelFormat, int flags) throws Exception;
|
int stride, int height, int pixelFormat, int flags) throws Exception;
|
||||||
|
|
||||||
static {
|
static {
|
||||||
TJLoader.load();
|
TJLoader.load();
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ public class TJScalingFactor {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns numerator
|
* Returns numerator
|
||||||
|
*
|
||||||
* @return numerator
|
* @return numerator
|
||||||
*/
|
*/
|
||||||
public int getNum() {
|
public int getNum() {
|
||||||
@@ -50,6 +51,7 @@ public class TJScalingFactor {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns denominator
|
* Returns denominator
|
||||||
|
*
|
||||||
* @return denominator
|
* @return denominator
|
||||||
*/
|
*/
|
||||||
public int getDenom() {
|
public int getDenom() {
|
||||||
@@ -60,7 +62,8 @@ public class TJScalingFactor {
|
|||||||
* Returns the scaled value of <code>dimension</code>. This function
|
* Returns the scaled value of <code>dimension</code>. This function
|
||||||
* performs the integer equivalent of
|
* performs the integer equivalent of
|
||||||
* <code>ceil(dimension * scalingFactor)</code>.
|
* <code>ceil(dimension * scalingFactor)</code>.
|
||||||
* @return the scaled value of <code>dimension</code>
|
*
|
||||||
|
* @return the scaled value of <code>dimension</code>.
|
||||||
*/
|
*/
|
||||||
public int getScaled(int dimension) {
|
public int getScaled(int dimension) {
|
||||||
return (dimension * num + denom - 1) / denom;
|
return (dimension * num + denom - 1) / denom;
|
||||||
@@ -69,8 +72,9 @@ public class TJScalingFactor {
|
|||||||
/**
|
/**
|
||||||
* Returns true or false, depending on whether this instance and
|
* Returns true or false, depending on whether this instance and
|
||||||
* <code>other</code> have the same numerator and denominator.
|
* <code>other</code> have the same numerator and denominator.
|
||||||
|
*
|
||||||
* @return true or false, depending on whether this instance and
|
* @return true or false, depending on whether this instance and
|
||||||
* <code>other</code> have the same numerator and denominator
|
* <code>other</code> have the same numerator and denominator.
|
||||||
*/
|
*/
|
||||||
public boolean equals(TJScalingFactor other) {
|
public boolean equals(TJScalingFactor other) {
|
||||||
return (this.num == other.num && this.denom == other.denom);
|
return (this.num == other.num && this.denom == other.denom);
|
||||||
@@ -79,8 +83,9 @@ public class TJScalingFactor {
|
|||||||
/**
|
/**
|
||||||
* Returns true or false, depending on whether this instance is equal to
|
* Returns true or false, depending on whether this instance is equal to
|
||||||
* 1/1.
|
* 1/1.
|
||||||
|
*
|
||||||
* @return true or false, depending on whether this instance is equal to
|
* @return true or false, depending on whether this instance is equal to
|
||||||
* 1/1
|
* 1/1.
|
||||||
*/
|
*/
|
||||||
public boolean isOne() {
|
public boolean isOne() {
|
||||||
return (num == 1 && denom == 1);
|
return (num == 1 && denom == 1);
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ public class TJTransformer extends TJDecompressor {
|
|||||||
* corresponding transformed output image
|
* corresponding transformed output image
|
||||||
*
|
*
|
||||||
* @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
|
* @param flags the bitwise OR of one or more of
|
||||||
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
||||||
@@ -141,7 +141,7 @@ public class TJTransformer extends TJDecompressor {
|
|||||||
* generated by the most recent transform operation.
|
* generated by the most recent transform operation.
|
||||||
*
|
*
|
||||||
* @return an array containing the sizes of the transformed JPEG images
|
* @return an array containing the sizes of the transformed JPEG images
|
||||||
* generated by the most recent transform operation
|
* generated by the most recent transform operation.
|
||||||
*/
|
*/
|
||||||
public int[] getTransformedSizes() throws Exception {
|
public int[] getTransformedSizes() throws Exception {
|
||||||
if (transformedSizes == null)
|
if (transformedSizes == null)
|
||||||
|
|||||||
@@ -43,20 +43,18 @@ package org.libjpegturbo.turbojpeg;
|
|||||||
* image format consisting of Y, Cb, and Cr image planes.
|
* image format consisting of Y, Cb, and Cr image planes.
|
||||||
* <p>
|
* <p>
|
||||||
* Each plane is simply a 2D array of bytes, each byte representing the value
|
* Each plane is simply a 2D array of bytes, each byte representing the value
|
||||||
* of one of the components at a particular location in the image. The
|
* of one of the components (Y, Cb, or Cr) at a particular location in the
|
||||||
* "component width" and "component height" of each plane are determined by the
|
* image. The width and height of each plane are determined by the image
|
||||||
* image width, height, and level of chrominance subsampling. For the
|
* width, height, and level of chrominance subsampling. The luminance plane
|
||||||
* luminance plane, the component width is the image width padded to the
|
* width is the image width padded to the nearest multiple of the horizontal
|
||||||
* nearest multiple of the horizontal subsampling factor (2 in the case of
|
* subsampling factor (2 in the case of 4:2:0 and 4:2:2, 4 in the case of
|
||||||
* 4:2:0 and 4:2:2, 4 in the case of 4:1:1, 1 in the case of 4:4:4 or
|
* 4:1:1, 1 in the case of 4:4:4 or grayscale.) Similarly, the luminance plane
|
||||||
* grayscale.) Similarly, the component height of the luminance plane is the
|
* height is the image height padded to the nearest multiple of the vertical
|
||||||
* image height padded to the nearest multiple of the vertical subsampling
|
* subsampling factor (2 in the case of 4:2:0 or 4:4:0, 1 in the case of 4:4:4
|
||||||
* factor (2 in the case of 4:2:0 or 4:4:0, 1 in the case of 4:4:4 or
|
* or grayscale.) The chrominance plane width is equal to the luminance plane
|
||||||
* grayscale.) The component width of the chrominance planes is equal to the
|
* width divided by the horizontal subsampling factor, and the chrominance
|
||||||
* component width of the luminance plane divided by the horizontal subsampling
|
* plane height is equal to the luminance plane height divided by the vertical
|
||||||
* factor, and the component height of the chrominance planes is equal to the
|
* subsampling factor.
|
||||||
* component height of the luminance plane divided by the vertical subsampling
|
|
||||||
* factor.
|
|
||||||
* <p>
|
* <p>
|
||||||
* For example, if the source image is 35 x 35 pixels and 4:2:2 subsampling is
|
* For example, if the source image is 35 x 35 pixels and 4:2:2 subsampling is
|
||||||
* used, then the luminance plane would be 36 x 35 bytes, and each of the
|
* used, then the luminance plane would be 36 x 35 bytes, and each of the
|
||||||
@@ -67,10 +65,35 @@ package org.libjpegturbo.turbojpeg;
|
|||||||
public class YUVImage {
|
public class YUVImage {
|
||||||
|
|
||||||
private static final String NO_ASSOC_ERROR =
|
private static final String NO_ASSOC_ERROR =
|
||||||
"No YUV buffer is associated with this instance";
|
"No image data is associated with this instance";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a <code>YUVImage</code> instance with a new image buffer.
|
* Create a new <code>YUVImage</code> instance backed by separate image
|
||||||
|
* planes, and allocate memory for the image planes.
|
||||||
|
*
|
||||||
|
* @param width width (in pixels) of the YUV image
|
||||||
|
*
|
||||||
|
* @param strides an array of integers, each specifying the number of bytes
|
||||||
|
* per line in the corresponding plane of the YUV image. Setting the stride
|
||||||
|
* for any plane to 0 is the same as setting it to the plane width (see
|
||||||
|
* {@link YUVImage above}.) If <code>strides</code> is null, then the
|
||||||
|
* strides for all planes will be set to their respective plane widths. When
|
||||||
|
* using this constructor, the stride for each plane must be equal to or
|
||||||
|
* greater than the plane width.
|
||||||
|
*
|
||||||
|
* @param height height (in pixels) of the YUV image
|
||||||
|
*
|
||||||
|
* @param subsamp the level of chrominance subsampling to be used in the YUV
|
||||||
|
* image (one of {@link TJ#SAMP_444 TJ.SAMP_*})
|
||||||
|
*/
|
||||||
|
public YUVImage(int width, int[] strides, int height, int subsamp)
|
||||||
|
throws Exception {
|
||||||
|
setBuf(null, null, width, strides, height, subsamp, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new <code>YUVImage</code> instance backed by a unified image
|
||||||
|
* buffer, and allocate memory for the image buffer.
|
||||||
*
|
*
|
||||||
* @param width width (in pixels) of the YUV image
|
* @param width width (in pixels) of the YUV image
|
||||||
*
|
*
|
||||||
@@ -83,13 +106,52 @@ public class YUVImage {
|
|||||||
* image (one of {@link TJ#SAMP_444 TJ.SAMP_*})
|
* image (one of {@link TJ#SAMP_444 TJ.SAMP_*})
|
||||||
*/
|
*/
|
||||||
public YUVImage(int width, int pad, int height, int subsamp)
|
public YUVImage(int width, int pad, int height, int subsamp)
|
||||||
throws Exception {
|
throws Exception {
|
||||||
setBuf(new byte[TJ.bufSizeYUV(width, pad, height, subsamp)], width, pad,
|
setBuf(new byte[TJ.bufSizeYUV(width, pad, height, subsamp)], width, pad,
|
||||||
height, subsamp);
|
height, subsamp);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a <code>YUVImage</code> instance from an existing YUV planar image
|
* Create a new <code>YUVImage</code> instance from a set of existing image
|
||||||
|
* planes.
|
||||||
|
*
|
||||||
|
* @param planes an array of buffers representing the Y, U (Cb), and V (Cr)
|
||||||
|
* image planes (or just the Y plane, if the image is grayscale.) These
|
||||||
|
* planes can be contiguous or non-contiguous in memory. Plane
|
||||||
|
* <code>i</code> should be at least <code>offsets[i] +
|
||||||
|
* {@link TJ#planeSizeYUV TJ.planeSizeYUV}(i, width, strides[i], height, subsamp)</code>
|
||||||
|
* bytes in size.
|
||||||
|
*
|
||||||
|
* @param offsets If this <code>YUVImage</code> instance represents a
|
||||||
|
* subregion of a larger image, then <code>offsets[i]</code> specifies the
|
||||||
|
* offset (in bytes) of the subregion within plane <code>i</code> of the
|
||||||
|
* larger image. Setting this to null is the same as setting the offsets for
|
||||||
|
* all planes to 0.
|
||||||
|
*
|
||||||
|
* @param width width (in pixels) of the new YUV image (or subregion)
|
||||||
|
*
|
||||||
|
* @param strides an array of integers, each specifying the number of bytes
|
||||||
|
* per line in the corresponding plane of the YUV image. Setting the stride
|
||||||
|
* for any plane to 0 is the same as setting it to the plane width (see
|
||||||
|
* {@link YUVImage above}.) If <code>strides</code> is null, then the
|
||||||
|
* strides for all planes will be set to their respective plane widths. You
|
||||||
|
* can adjust the strides in order to add an arbitrary amount of line padding
|
||||||
|
* to each plane or to specify that this <code>YUVImage</code> instance is a
|
||||||
|
* subregion of a larger image (in which case, <code>strides[i]</code> should
|
||||||
|
* be set to the plane width of plane <code>i</code> in the larger image.)
|
||||||
|
*
|
||||||
|
* @param height height (in pixels) of the new YUV image (or subregion)
|
||||||
|
*
|
||||||
|
* @param subsamp the level of chrominance subsampling used in the YUV
|
||||||
|
* image (one of {@link TJ#SAMP_444 TJ.SAMP_*})
|
||||||
|
*/
|
||||||
|
public YUVImage(byte[][] planes, int[] offsets, int width, int[] strides,
|
||||||
|
int height, int subsamp) throws Exception {
|
||||||
|
setBuf(planes, offsets, width, strides, height, subsamp, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new <code>YUVImage</code> instance from an existing unified image
|
||||||
* buffer.
|
* buffer.
|
||||||
*
|
*
|
||||||
* @param yuvImage image buffer that contains or will contain YUV planar
|
* @param yuvImage image buffer that contains or will contain YUV planar
|
||||||
@@ -115,8 +177,89 @@ public class YUVImage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Assign an existing YUV planar image buffer to this <code>YUVImage</code>
|
* Assign a set of image planes to this <code>YUVImage</code> instance.
|
||||||
* instance.
|
*
|
||||||
|
* @param planes an array of buffers representing the Y, U (Cb), and V (Cr)
|
||||||
|
* image planes (or just the Y plane, if the image is grayscale.) These
|
||||||
|
* planes can be contiguous or non-contiguous in memory. Plane
|
||||||
|
* <code>i</code> should be at least <code>offsets[i] +
|
||||||
|
* {@link TJ#planeSizeYUV TJ.planeSizeYUV}(i, width, strides[i], height, subsamp)</code>
|
||||||
|
* bytes in size.
|
||||||
|
*
|
||||||
|
* @param offsets If this <code>YUVImage</code> instance represents a
|
||||||
|
* subregion of a larger image, then <code>offsets[i]</code> specifies the
|
||||||
|
* offset (in bytes) of the subregion within plane <code>i</code> of the
|
||||||
|
* larger image. Setting this to null is the same as setting the offsets for
|
||||||
|
* all planes to 0.
|
||||||
|
*
|
||||||
|
* @param width width (in pixels) of the YUV image (or subregion)
|
||||||
|
*
|
||||||
|
* @param strides an array of integers, each specifying the number of bytes
|
||||||
|
* per line in the corresponding plane of the YUV image. Setting the stride
|
||||||
|
* for any plane to 0 is the same as setting it to the plane width (see
|
||||||
|
* {@link YUVImage above}.) If <code>strides</code> is null, then the
|
||||||
|
* strides for all planes will be set to their respective plane widths. You
|
||||||
|
* can adjust the strides in order to add an arbitrary amount of line padding
|
||||||
|
* to each plane or to specify that this <code>YUVImage</code> image is a
|
||||||
|
* subregion of a larger image (in which case, <code>strides[i]</code> should
|
||||||
|
* be set to the plane width of plane <code>i</code> in the larger image.)
|
||||||
|
*
|
||||||
|
* @param height height (in pixels) of the YUV image (or subregion)
|
||||||
|
*
|
||||||
|
* @param subsamp the level of chrominance subsampling used in the YUV
|
||||||
|
* image (one of {@link TJ#SAMP_444 TJ.SAMP_*})
|
||||||
|
*/
|
||||||
|
public void setBuf(byte[][] planes, int[] offsets, int width, int strides[],
|
||||||
|
int height, int subsamp) throws Exception {
|
||||||
|
setBuf(planes, offsets, width, strides, height, subsamp, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setBuf(byte[][] planes, int[] offsets, int width, int strides[],
|
||||||
|
int height, int subsamp, boolean alloc) throws Exception {
|
||||||
|
if ((planes == null && !alloc) || width < 1 || height < 1 || subsamp < 0 ||
|
||||||
|
subsamp >= TJ.NUMSAMP)
|
||||||
|
throw new Exception("Invalid argument in YUVImage::setBuf()");
|
||||||
|
|
||||||
|
int nc = (subsamp == TJ.SAMP_GRAY ? 1 : 3);
|
||||||
|
if (planes.length != nc || (offsets != null && offsets.length != nc) ||
|
||||||
|
(strides != null && strides.length != nc))
|
||||||
|
throw new Exception("YUVImage::setBuf(): planes, offsets, or strides array is the wrong size");
|
||||||
|
|
||||||
|
if (offsets == null)
|
||||||
|
offsets = new int[nc];
|
||||||
|
if (strides == null)
|
||||||
|
strides = new int[nc];
|
||||||
|
|
||||||
|
for (int i = 0; i < nc; i++) {
|
||||||
|
int pw = TJ.planeWidth(i, width, subsamp);
|
||||||
|
int ph = TJ.planeHeight(i, height, subsamp);
|
||||||
|
int planeSize = TJ.planeSizeYUV(i, width, strides[i], height, subsamp);
|
||||||
|
|
||||||
|
if (strides[i] == 0)
|
||||||
|
strides[i] = pw;
|
||||||
|
if (alloc) {
|
||||||
|
if (strides[i] < pw)
|
||||||
|
throw new Exception("Stride must be >= plane width when allocating a new YUV image");
|
||||||
|
planes[i] = new byte[strides[i] * ph];
|
||||||
|
}
|
||||||
|
if (planes[i] == null || offsets[i] < 0)
|
||||||
|
throw new Exception("Invalid argument in YUVImage::setBuf()");
|
||||||
|
if (strides[i] < 0 && offsets[i] - planeSize + pw < 0)
|
||||||
|
throw new Exception("Stride for plane " + i + " would cause memory to be accessed below plane boundary");
|
||||||
|
if (planes[i].length < offsets[i] + planeSize)
|
||||||
|
throw new Exception("Image plane " + i + " is not large enough");
|
||||||
|
}
|
||||||
|
|
||||||
|
yuvPlanes = planes;
|
||||||
|
yuvOffsets = offsets;
|
||||||
|
yuvWidth = width;
|
||||||
|
yuvStrides = strides;
|
||||||
|
yuvHeight = height;
|
||||||
|
yuvSubsamp = subsamp;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Assign a unified image buffer to this <code>YUVImage</code> instance.
|
||||||
*
|
*
|
||||||
* @param yuvImage image buffer that contains or will contain YUV planar
|
* @param yuvImage image buffer that contains or will contain YUV planar
|
||||||
* image data. Use {@link TJ#bufSizeYUV} to determine the minimum size for
|
* image data. Use {@link TJ#bufSizeYUV} to determine the minimum size for
|
||||||
@@ -139,20 +282,34 @@ public class YUVImage {
|
|||||||
int subsamp) throws Exception {
|
int subsamp) throws Exception {
|
||||||
if (yuvImage == null || width < 1 || pad < 1 || ((pad & (pad - 1)) != 0) ||
|
if (yuvImage == null || width < 1 || pad < 1 || ((pad & (pad - 1)) != 0) ||
|
||||||
height < 1 || subsamp < 0 || subsamp >= TJ.NUMSAMP)
|
height < 1 || subsamp < 0 || subsamp >= TJ.NUMSAMP)
|
||||||
throw new Exception("Invalid argument in YUVImage()");
|
throw new Exception("Invalid argument in YUVImage::setBuf()");
|
||||||
if (yuvImage.length < TJ.bufSizeYUV(width, pad, height, subsamp))
|
if (yuvImage.length < TJ.bufSizeYUV(width, pad, height, subsamp))
|
||||||
throw new Exception("YUV image buffer is not large enough");
|
throw new Exception("YUV image buffer is not large enough");
|
||||||
yuvBuf = yuvImage;
|
|
||||||
yuvWidth = width;
|
int nc = (subsamp == TJ.SAMP_GRAY ? 1 : 3);
|
||||||
|
byte[][] planes = new byte[nc][];
|
||||||
|
int[] strides = new int[nc];
|
||||||
|
int[] offsets = new int[nc];
|
||||||
|
|
||||||
|
planes[0] = yuvImage;
|
||||||
|
strides[0] = PAD(TJ.planeWidth(0, width, subsamp), pad);
|
||||||
|
if (subsamp != TJ.SAMP_GRAY) {
|
||||||
|
strides[1] = strides[2] = PAD(TJ.planeWidth(1, width, subsamp), pad);
|
||||||
|
planes[1] = planes[2] = yuvImage;
|
||||||
|
offsets[1] = offsets[0] +
|
||||||
|
strides[0] * TJ.planeHeight(0, height, subsamp);
|
||||||
|
offsets[2] = offsets[1] +
|
||||||
|
strides[1] * TJ.planeHeight(1, height, subsamp);
|
||||||
|
}
|
||||||
|
|
||||||
yuvPad = pad;
|
yuvPad = pad;
|
||||||
yuvHeight = height;
|
setBuf(planes, offsets, width, strides, height, subsamp);
|
||||||
yuvSubsamp = subsamp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the width of the YUV image.
|
* Returns the width of the YUV image (or subregion.)
|
||||||
*
|
*
|
||||||
* @return the width of the YUV image
|
* @return the width of the YUV image (or subregion)
|
||||||
*/
|
*/
|
||||||
public int getWidth() throws Exception {
|
public int getWidth() throws Exception {
|
||||||
if (yuvWidth < 1)
|
if (yuvWidth < 1)
|
||||||
@@ -161,9 +318,9 @@ public class YUVImage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the height of the YUV image.
|
* Returns the height of the YUV image (or subregion.)
|
||||||
*
|
*
|
||||||
* @return the height of the YUV image
|
* @return the height of the YUV image (or subregion)
|
||||||
*/
|
*/
|
||||||
public int getHeight() throws Exception {
|
public int getHeight() throws Exception {
|
||||||
if (yuvHeight < 1)
|
if (yuvHeight < 1)
|
||||||
@@ -172,16 +329,43 @@ public class YUVImage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the line padding used in the YUV image buffer.
|
* Returns the line padding used in the YUV image buffer (if this image is
|
||||||
|
* stored in a unified buffer rather than separate image planes.)
|
||||||
*
|
*
|
||||||
* @return the line padding used in the YUV image buffer
|
* @return the line padding used in the YUV image buffer
|
||||||
*/
|
*/
|
||||||
public int getPad() throws Exception {
|
public int getPad() throws Exception {
|
||||||
if (yuvPad < 1 || ((yuvPad & (yuvPad - 1)) != 0))
|
if (yuvPlanes == null)
|
||||||
throw new Exception(NO_ASSOC_ERROR);
|
throw new Exception(NO_ASSOC_ERROR);
|
||||||
|
if (yuvPad < 1 || ((yuvPad & (yuvPad - 1)) != 0))
|
||||||
|
throw new Exception("Image is not stored in a unified buffer");
|
||||||
return yuvPad;
|
return yuvPad;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the number of bytes per line of each plane in the YUV image.
|
||||||
|
*
|
||||||
|
* @return the number of bytes per line of each plane in the YUV image
|
||||||
|
*/
|
||||||
|
public int[] getStrides() throws Exception {
|
||||||
|
if (yuvStrides == null)
|
||||||
|
throw new Exception(NO_ASSOC_ERROR);
|
||||||
|
return yuvStrides;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the offsets (in bytes) of each plane within the planes of a larger
|
||||||
|
* YUV image.
|
||||||
|
*
|
||||||
|
* @return the offsets (in bytes) of each plane within the planes of a larger
|
||||||
|
* YUV image
|
||||||
|
*/
|
||||||
|
public int[] getOffsets() throws Exception {
|
||||||
|
if (yuvOffsets == null)
|
||||||
|
throw new Exception(NO_ASSOC_ERROR);
|
||||||
|
return yuvOffsets;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the level of chrominance subsampling used in the YUV image. See
|
* Returns the level of chrominance subsampling used in the YUV image. See
|
||||||
* {@link TJ#SAMP_444 TJ.SAMP_*}.
|
* {@link TJ#SAMP_444 TJ.SAMP_*}.
|
||||||
@@ -195,29 +379,61 @@ public class YUVImage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the YUV image buffer
|
* Returns the YUV image planes. If the image is stored in a unified buffer,
|
||||||
|
* then all image planes will point to that buffer.
|
||||||
|
*
|
||||||
|
* @return the YUV image planes
|
||||||
|
*/
|
||||||
|
public byte[][] getPlanes() throws Exception {
|
||||||
|
if (yuvPlanes == null)
|
||||||
|
throw new Exception(NO_ASSOC_ERROR);
|
||||||
|
return yuvPlanes;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the YUV image buffer (if this image is stored in a unified
|
||||||
|
* buffer rather than separate image planes.)
|
||||||
*
|
*
|
||||||
* @return the YUV image buffer
|
* @return the YUV image buffer
|
||||||
*/
|
*/
|
||||||
public byte[] getBuf() throws Exception {
|
public byte[] getBuf() throws Exception {
|
||||||
if (yuvBuf == null)
|
if (yuvPlanes == null || yuvSubsamp < 0 || yuvSubsamp >= TJ.NUMSAMP)
|
||||||
throw new Exception(NO_ASSOC_ERROR);
|
throw new Exception(NO_ASSOC_ERROR);
|
||||||
return yuvBuf;
|
int nc = (yuvSubsamp == TJ.SAMP_GRAY ? 1 : 3);
|
||||||
|
for (int i = 1; i < nc; i++) {
|
||||||
|
if (yuvPlanes[i] != yuvPlanes[0])
|
||||||
|
throw new Exception("Image is not stored in a unified buffer");
|
||||||
|
}
|
||||||
|
return yuvPlanes[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the size (in bytes) of the YUV image buffer
|
* Returns the size (in bytes) of the YUV image buffer (if this image is
|
||||||
|
* stored in a unified buffer rather than separate image planes.)
|
||||||
*
|
*
|
||||||
* @return the size (in bytes) of the YUV image buffer
|
* @return the size (in bytes) of the YUV image buffer
|
||||||
*/
|
*/
|
||||||
public int getSize() throws Exception {
|
public int getSize() throws Exception {
|
||||||
if (yuvBuf == null)
|
if (yuvPlanes == null || yuvSubsamp < 0 || yuvSubsamp >= TJ.NUMSAMP)
|
||||||
throw new Exception(NO_ASSOC_ERROR);
|
throw new Exception(NO_ASSOC_ERROR);
|
||||||
return TJ.bufSizeYUV(yuvWidth, yuvPad, yuvHeight, yuvSubsamp);
|
int nc = (yuvSubsamp == TJ.SAMP_GRAY ? 1 : 3);
|
||||||
}
|
if (yuvPad < 1)
|
||||||
|
throw new Exception("Image is not stored in a unified buffer");
|
||||||
|
for (int i = 1; i < nc; i++) {
|
||||||
|
if (yuvPlanes[i] != yuvPlanes[0])
|
||||||
|
throw new Exception("Image is not stored in a unified buffer");
|
||||||
|
}
|
||||||
|
return TJ.bufSizeYUV(yuvWidth, yuvPad, yuvHeight, yuvSubsamp);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static final int PAD(int v, int p) {
|
||||||
|
return (v + p - 1) & (~(p - 1));
|
||||||
|
}
|
||||||
|
|
||||||
protected long handle = 0;
|
protected long handle = 0;
|
||||||
protected byte[] yuvBuf = null;
|
protected byte[][] yuvPlanes = null;
|
||||||
|
protected int[] yuvOffsets = null;
|
||||||
|
protected int[] yuvStrides = null;
|
||||||
protected int yuvPad = 0;
|
protected int yuvPad = 0;
|
||||||
protected int yuvWidth = 0;
|
protected int yuvWidth = 0;
|
||||||
protected int yuvHeight = 0;
|
protected int yuvHeight = 0;
|
||||||
|
|||||||
@@ -91,6 +91,30 @@ JNIEXPORT jint JNICALL Java_org_libjpegturbo_turbojpeg_TJ_bufSizeYUV__IIII
|
|||||||
JNIEXPORT jint JNICALL Java_org_libjpegturbo_turbojpeg_TJ_bufSizeYUV__III
|
JNIEXPORT jint JNICALL Java_org_libjpegturbo_turbojpeg_TJ_bufSizeYUV__III
|
||||||
(JNIEnv *, jclass, jint, jint, jint);
|
(JNIEnv *, jclass, jint, jint, jint);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Class: org_libjpegturbo_turbojpeg_TJ
|
||||||
|
* Method: planeSizeYUV
|
||||||
|
* Signature: (IIIII)I
|
||||||
|
*/
|
||||||
|
JNIEXPORT jint JNICALL Java_org_libjpegturbo_turbojpeg_TJ_planeSizeYUV__IIIII
|
||||||
|
(JNIEnv *, jclass, jint, jint, jint, jint, jint);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Class: org_libjpegturbo_turbojpeg_TJ
|
||||||
|
* Method: planeWidth
|
||||||
|
* Signature: (III)I
|
||||||
|
*/
|
||||||
|
JNIEXPORT jint JNICALL Java_org_libjpegturbo_turbojpeg_TJ_planeWidth__III
|
||||||
|
(JNIEnv *, jclass, jint, jint, jint);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Class: org_libjpegturbo_turbojpeg_TJ
|
||||||
|
* Method: planeHeight
|
||||||
|
* Signature: (III)I
|
||||||
|
*/
|
||||||
|
JNIEXPORT jint JNICALL Java_org_libjpegturbo_turbojpeg_TJ_planeHeight__III
|
||||||
|
(JNIEnv *, jclass, jint, jint, jint);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Class: org_libjpegturbo_turbojpeg_TJ
|
* Class: org_libjpegturbo_turbojpeg_TJ
|
||||||
* Method: getScalingFactors
|
* Method: getScalingFactors
|
||||||
|
|||||||
@@ -58,10 +58,10 @@ JNIEXPORT jint JNICALL Java_org_libjpegturbo_turbojpeg_TJCompressor_compress___3
|
|||||||
/*
|
/*
|
||||||
* Class: org_libjpegturbo_turbojpeg_TJCompressor
|
* Class: org_libjpegturbo_turbojpeg_TJCompressor
|
||||||
* Method: compressFromYUV
|
* Method: compressFromYUV
|
||||||
* Signature: ([BIIII[BII)I
|
* Signature: ([[B[II[III[BII)I
|
||||||
*/
|
*/
|
||||||
JNIEXPORT jint JNICALL Java_org_libjpegturbo_turbojpeg_TJCompressor_compressFromYUV___3BIIII_3BII
|
JNIEXPORT jint JNICALL Java_org_libjpegturbo_turbojpeg_TJCompressor_compressFromYUV___3_3B_3II_3III_3BII
|
||||||
(JNIEnv *, jobject, jbyteArray, jint, jint, jint, jint, jbyteArray, jint, jint);
|
(JNIEnv *, jobject, jobjectArray, jintArray, jint, jintArray, jint, jint, jbyteArray, jint, jint);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Class: org_libjpegturbo_turbojpeg_TJCompressor
|
* Class: org_libjpegturbo_turbojpeg_TJCompressor
|
||||||
@@ -74,10 +74,10 @@ JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJCompressor_encodeYUV___
|
|||||||
/*
|
/*
|
||||||
* Class: org_libjpegturbo_turbojpeg_TJCompressor
|
* Class: org_libjpegturbo_turbojpeg_TJCompressor
|
||||||
* Method: encodeYUV
|
* Method: encodeYUV
|
||||||
* Signature: ([BIIIIII[BIII)V
|
* Signature: ([BIIIIII[[B[I[III)V
|
||||||
*/
|
*/
|
||||||
JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJCompressor_encodeYUV___3BIIIIII_3BIII
|
JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJCompressor_encodeYUV___3BIIIIII_3_3B_3I_3III
|
||||||
(JNIEnv *, jobject, jbyteArray, jint, jint, jint, jint, jint, jint, jbyteArray, jint, jint, jint);
|
(JNIEnv *, jobject, jbyteArray, jint, jint, jint, jint, jint, jint, jobjectArray, jintArray, jintArray, jint, jint);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Class: org_libjpegturbo_turbojpeg_TJCompressor
|
* Class: org_libjpegturbo_turbojpeg_TJCompressor
|
||||||
@@ -90,10 +90,10 @@ JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJCompressor_encodeYUV___
|
|||||||
/*
|
/*
|
||||||
* Class: org_libjpegturbo_turbojpeg_TJCompressor
|
* Class: org_libjpegturbo_turbojpeg_TJCompressor
|
||||||
* Method: encodeYUV
|
* Method: encodeYUV
|
||||||
* Signature: ([IIIIIII[BIII)V
|
* Signature: ([IIIIIII[[B[I[III)V
|
||||||
*/
|
*/
|
||||||
JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJCompressor_encodeYUV___3IIIIIII_3BIII
|
JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJCompressor_encodeYUV___3IIIIIII_3_3B_3I_3III
|
||||||
(JNIEnv *, jobject, jintArray, jint, jint, jint, jint, jint, jint, jbyteArray, jint, jint, jint);
|
(JNIEnv *, jobject, jintArray, jint, jint, jint, jint, jint, jint, jobjectArray, jintArray, jintArray, jint, jint);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -74,26 +74,26 @@ JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJDecompressor_decompress
|
|||||||
/*
|
/*
|
||||||
* Class: org_libjpegturbo_turbojpeg_TJDecompressor
|
* Class: org_libjpegturbo_turbojpeg_TJDecompressor
|
||||||
* Method: decompressToYUV
|
* Method: decompressToYUV
|
||||||
* Signature: ([BI[BIIII)V
|
* Signature: ([BI[[B[II[III)V
|
||||||
*/
|
*/
|
||||||
JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJDecompressor_decompressToYUV___3BI_3BIIII
|
JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJDecompressor_decompressToYUV___3BI_3_3B_3II_3III
|
||||||
(JNIEnv *, jobject, jbyteArray, jint, jbyteArray, jint, jint, jint, jint);
|
(JNIEnv *, jobject, jbyteArray, jint, jobjectArray, jintArray, jint, jintArray, jint, jint);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Class: org_libjpegturbo_turbojpeg_TJDecompressor
|
* Class: org_libjpegturbo_turbojpeg_TJDecompressor
|
||||||
* Method: decodeYUV
|
* Method: decodeYUV
|
||||||
* Signature: ([BII[BIIIIIII)V
|
* Signature: ([[B[I[II[BIIIIIII)V
|
||||||
*/
|
*/
|
||||||
JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJDecompressor_decodeYUV___3BII_3BIIIIIII
|
JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJDecompressor_decodeYUV___3_3B_3I_3II_3BIIIIIII
|
||||||
(JNIEnv *, jobject, jbyteArray, jint, jint, jbyteArray, jint, jint, jint, jint, jint, jint, jint);
|
(JNIEnv *, jobject, jobjectArray, jintArray, jintArray, jint, jbyteArray, jint, jint, jint, jint, jint, jint, jint);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Class: org_libjpegturbo_turbojpeg_TJDecompressor
|
* Class: org_libjpegturbo_turbojpeg_TJDecompressor
|
||||||
* Method: decodeYUV
|
* Method: decodeYUV
|
||||||
* Signature: ([BII[IIIIIIII)V
|
* Signature: ([[B[I[II[IIIIIIII)V
|
||||||
*/
|
*/
|
||||||
JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJDecompressor_decodeYUV___3BII_3IIIIIIII
|
JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJDecompressor_decodeYUV___3_3B_3I_3II_3IIIIIIII
|
||||||
(JNIEnv *, jobject, jbyteArray, jint, jint, jintArray, jint, jint, jint, jint, jint, jint, jint);
|
(JNIEnv *, jobject, jobjectArray, jintArray, jintArray, jint, jintArray, jint, jint, jint, jint, jint, jint, jint);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|||||||
473
turbojpeg-jni.c
473
turbojpeg-jni.c
@@ -37,6 +37,8 @@
|
|||||||
#include "java/org_libjpegturbo_turbojpeg_TJDecompressor.h"
|
#include "java/org_libjpegturbo_turbojpeg_TJDecompressor.h"
|
||||||
#include "java/org_libjpegturbo_turbojpeg_TJ.h"
|
#include "java/org_libjpegturbo_turbojpeg_TJ.h"
|
||||||
|
|
||||||
|
#define PAD(v, p) ((v+(p)-1)&(~((p)-1)))
|
||||||
|
|
||||||
#define _throw(msg) { \
|
#define _throw(msg) { \
|
||||||
jclass _exccls=(*env)->FindClass(env, "java/lang/Exception"); \
|
jclass _exccls=(*env)->FindClass(env, "java/lang/Exception"); \
|
||||||
if(!_exccls) goto bailout; \
|
if(!_exccls) goto bailout; \
|
||||||
@@ -87,6 +89,41 @@ JNIEXPORT jint JNICALL Java_org_libjpegturbo_turbojpeg_TJ_bufSizeYUV__III
|
|||||||
4, height, subsamp);
|
4, height, subsamp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* TurboJPEG 1.4.x: TJ::planeSizeYUV() */
|
||||||
|
JNIEXPORT jint JNICALL Java_org_libjpegturbo_turbojpeg_TJ_planeSizeYUV__IIIII
|
||||||
|
(JNIEnv *env, jclass cls, jint componentID, jint width, jint stride,
|
||||||
|
jint height, jint subsamp)
|
||||||
|
{
|
||||||
|
jint retval=(jint)tjPlaneSizeYUV(componentID, width, stride, height,
|
||||||
|
subsamp);
|
||||||
|
if(retval==-1) _throw(tjGetErrorStr());
|
||||||
|
|
||||||
|
bailout:
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* TurboJPEG 1.4.x: TJ::planeWidth() */
|
||||||
|
JNIEXPORT jint JNICALL Java_org_libjpegturbo_turbojpeg_TJ_planeWidth__III
|
||||||
|
(JNIEnv *env, jclass cls, jint componentID, jint width, jint subsamp)
|
||||||
|
{
|
||||||
|
jint retval=(jint)tjPlaneWidth(componentID, width, subsamp);
|
||||||
|
if(retval==-1) _throw(tjGetErrorStr());
|
||||||
|
|
||||||
|
bailout:
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* TurboJPEG 1.4.x: TJ::planeHeight() */
|
||||||
|
JNIEXPORT jint JNICALL Java_org_libjpegturbo_turbojpeg_TJ_planeHeight__III
|
||||||
|
(JNIEnv *env, jclass cls, jint componentID, jint height, jint subsamp)
|
||||||
|
{
|
||||||
|
jint retval=(jint)tjPlaneHeight(componentID, height, subsamp);
|
||||||
|
if(retval==-1) _throw(tjGetErrorStr());
|
||||||
|
|
||||||
|
bailout:
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
|
||||||
/* TurboJPEG 1.2.x: TJCompressor::init() */
|
/* TurboJPEG 1.2.x: TJCompressor::init() */
|
||||||
JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJCompressor_init
|
JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJCompressor_init
|
||||||
(JNIEnv *env, jobject obj)
|
(JNIEnv *env, jobject obj)
|
||||||
@@ -203,44 +240,192 @@ JNIEXPORT jint JNICALL Java_org_libjpegturbo_turbojpeg_TJCompressor_compress___3
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* TurboJPEG 1.4.x: TJCompressor::compressFromYUV() */
|
/* TurboJPEG 1.4.x: TJCompressor::compressFromYUV() */
|
||||||
JNIEXPORT jint JNICALL Java_org_libjpegturbo_turbojpeg_TJCompressor_compressFromYUV___3BIIII_3BII
|
JNIEXPORT jint JNICALL Java_org_libjpegturbo_turbojpeg_TJCompressor_compressFromYUV___3_3B_3II_3III_3BII
|
||||||
(JNIEnv *env, jobject obj, jbyteArray src, jint width, jint pad, jint height,
|
(JNIEnv *env, jobject obj, jobjectArray srcobjs, jintArray jSrcOffsets,
|
||||||
jint subsamp, jbyteArray dst, jint jpegQual, jint flags)
|
jint width, jintArray jSrcStrides, jint height, jint subsamp,
|
||||||
|
jbyteArray dst, jint jpegQual, jint flags)
|
||||||
{
|
{
|
||||||
tjhandle handle=0;
|
tjhandle handle=0;
|
||||||
unsigned long jpegSize=0;
|
unsigned long jpegSize=0;
|
||||||
jsize arraySize=0;
|
jbyteArray jSrcPlanes[3]={NULL, NULL, NULL};
|
||||||
unsigned char *srcBuf=NULL, *jpegBuf=NULL;
|
unsigned char *srcPlanes[3], *jpegBuf=NULL;
|
||||||
|
int *srcOffsets=NULL, *srcStrides=NULL;
|
||||||
|
int nc=(subsamp==org_libjpegturbo_turbojpeg_TJ_SAMP_GRAY? 1:3), i;
|
||||||
|
|
||||||
gethandle();
|
gethandle();
|
||||||
|
|
||||||
arraySize=tjBufSizeYUV2(width, pad, height, subsamp);
|
if(subsamp<0 || subsamp>=org_libjpegturbo_turbojpeg_TJ_NUMSAMP)
|
||||||
if((*env)->GetArrayLength(env, src)<arraySize)
|
_throw("Invalid argument in compressFromYUV()");
|
||||||
_throw("Source buffer is not large enough");
|
if(org_libjpegturbo_turbojpeg_TJ_NUMSAMP!=TJ_NUMSAMP)
|
||||||
|
_throw("Mismatch between Java and C API");
|
||||||
|
|
||||||
|
if((*env)->GetArrayLength(env, srcobjs)<nc)
|
||||||
|
_throw("Planes array is too small for the subsampling type");
|
||||||
|
if((*env)->GetArrayLength(env, jSrcOffsets)<nc)
|
||||||
|
_throw("Offsets array is too small for the subsampling type");
|
||||||
|
if((*env)->GetArrayLength(env, jSrcStrides)<nc)
|
||||||
|
_throw("Strides array is too small for the subsampling type");
|
||||||
|
|
||||||
jpegSize=tjBufSize(width, height, subsamp);
|
jpegSize=tjBufSize(width, height, subsamp);
|
||||||
if((*env)->GetArrayLength(env, dst)<(jsize)jpegSize)
|
if((*env)->GetArrayLength(env, dst)<(jsize)jpegSize)
|
||||||
_throw("Destination buffer is not large enough");
|
_throw("Destination buffer is not large enough");
|
||||||
|
|
||||||
bailif0(srcBuf=(*env)->GetPrimitiveArrayCritical(env, src, 0));
|
bailif0(srcOffsets=(*env)->GetPrimitiveArrayCritical(env, jSrcOffsets, 0));
|
||||||
|
bailif0(srcStrides=(*env)->GetPrimitiveArrayCritical(env, jSrcStrides, 0));
|
||||||
|
for(i=0; i<nc; i++)
|
||||||
|
{
|
||||||
|
int planeSize=tjPlaneSizeYUV(i, width, srcStrides[i], height, subsamp);
|
||||||
|
int pw=tjPlaneWidth(i, width, subsamp);
|
||||||
|
|
||||||
|
if(planeSize<0 || pw<0)
|
||||||
|
_throw(tjGetErrorStr());
|
||||||
|
|
||||||
|
if(srcOffsets[i]<0)
|
||||||
|
_throw("Invalid argument in compressFromYUV()");
|
||||||
|
if(srcStrides[i]<0 && srcOffsets[i]-planeSize+pw<0)
|
||||||
|
_throw("Negative plane stride would cause memory to be accessed below plane boundary");
|
||||||
|
|
||||||
|
bailif0(jSrcPlanes[i]=(*env)->GetObjectArrayElement(env, srcobjs, i));
|
||||||
|
if((*env)->GetArrayLength(env, jSrcPlanes[i])<srcOffsets[i]+planeSize)
|
||||||
|
_throw("Source plane is not large enough");
|
||||||
|
|
||||||
|
bailif0(srcPlanes[i]=(*env)->GetPrimitiveArrayCritical(env, jSrcPlanes[i],
|
||||||
|
0));
|
||||||
|
srcPlanes[i]=&srcPlanes[i][srcOffsets[i]];
|
||||||
|
}
|
||||||
bailif0(jpegBuf=(*env)->GetPrimitiveArrayCritical(env, dst, 0));
|
bailif0(jpegBuf=(*env)->GetPrimitiveArrayCritical(env, dst, 0));
|
||||||
|
|
||||||
if(tjCompressFromYUV(handle, srcBuf, width, pad, height, subsamp, &jpegBuf,
|
if(tjCompressFromYUVPlanes(handle, srcPlanes, width, srcStrides, height,
|
||||||
&jpegSize, jpegQual, flags|TJFLAG_NOREALLOC)==-1)
|
subsamp, &jpegBuf, &jpegSize, jpegQual, flags|TJFLAG_NOREALLOC)==-1)
|
||||||
_throw(tjGetErrorStr());
|
_throw(tjGetErrorStr());
|
||||||
|
|
||||||
bailout:
|
bailout:
|
||||||
if(jpegBuf) (*env)->ReleasePrimitiveArrayCritical(env, dst, jpegBuf, 0);
|
if(jpegBuf) (*env)->ReleasePrimitiveArrayCritical(env, dst, jpegBuf, 0);
|
||||||
if(srcBuf) (*env)->ReleasePrimitiveArrayCritical(env, src, srcBuf, 0);
|
for(i=0; i<nc; i++)
|
||||||
|
{
|
||||||
|
if(srcPlanes[i] && jSrcPlanes[i])
|
||||||
|
(*env)->ReleasePrimitiveArrayCritical(env, jSrcPlanes[i], srcPlanes[i],
|
||||||
|
0);
|
||||||
|
}
|
||||||
|
if(srcStrides)
|
||||||
|
(*env)->ReleasePrimitiveArrayCritical(env, jSrcStrides, srcStrides, 0);
|
||||||
|
if(srcOffsets)
|
||||||
|
(*env)->ReleasePrimitiveArrayCritical(env, jSrcOffsets, srcOffsets, 0);
|
||||||
return (jint)jpegSize;
|
return (jint)jpegSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void TJCompressor_encodeYUV
|
static void TJCompressor_encodeYUV
|
||||||
(JNIEnv *env, jobject obj, jarray src, jint srcElementSize, jint x, jint y,
|
(JNIEnv *env, jobject obj, jarray src, jint srcElementSize, jint x, jint y,
|
||||||
jint width, jint pitch, jint height, jint pf, jbyteArray dst, jint pad,
|
jint width, jint pitch, jint height, jint pf, jobjectArray dstobjs,
|
||||||
jint subsamp, jint flags)
|
jintArray jDstOffsets, jintArray jDstStrides, jint subsamp, jint flags)
|
||||||
{
|
{
|
||||||
tjhandle handle=0;
|
tjhandle handle=0;
|
||||||
jsize arraySize=0, actualPitch, yuvSize;
|
jsize arraySize=0, actualPitch;
|
||||||
|
jbyteArray jDstPlanes[3]={NULL, NULL, NULL};
|
||||||
|
unsigned char *srcBuf=NULL, *dstPlanes[3];
|
||||||
|
int *dstOffsets=NULL, *dstStrides=NULL;
|
||||||
|
int nc=(subsamp==org_libjpegturbo_turbojpeg_TJ_SAMP_GRAY? 1:3), i;
|
||||||
|
|
||||||
|
gethandle();
|
||||||
|
|
||||||
|
if(pf<0 || pf>=org_libjpegturbo_turbojpeg_TJ_NUMPF || width<1 || height<1
|
||||||
|
|| pitch<0 || subsamp<0 || subsamp>=org_libjpegturbo_turbojpeg_TJ_NUMSAMP)
|
||||||
|
_throw("Invalid argument in encodeYUV()");
|
||||||
|
if(org_libjpegturbo_turbojpeg_TJ_NUMPF!=TJ_NUMPF
|
||||||
|
|| org_libjpegturbo_turbojpeg_TJ_NUMSAMP!=TJ_NUMSAMP)
|
||||||
|
_throw("Mismatch between Java and C API");
|
||||||
|
|
||||||
|
if((*env)->GetArrayLength(env, dstobjs)<nc)
|
||||||
|
_throw("Planes array is too small for the subsampling type");
|
||||||
|
if((*env)->GetArrayLength(env, jDstOffsets)<nc)
|
||||||
|
_throw("Offsets array is too small for the subsampling type");
|
||||||
|
if((*env)->GetArrayLength(env, jDstStrides)<nc)
|
||||||
|
_throw("Strides array is too small for the subsampling type");
|
||||||
|
|
||||||
|
actualPitch=(pitch==0)? width*tjPixelSize[pf]:pitch;
|
||||||
|
arraySize=(y+height-1)*actualPitch + (x+width)*tjPixelSize[pf];
|
||||||
|
if((*env)->GetArrayLength(env, src)*srcElementSize<arraySize)
|
||||||
|
_throw("Source buffer is not large enough");
|
||||||
|
|
||||||
|
bailif0(dstOffsets=(*env)->GetPrimitiveArrayCritical(env, jDstOffsets, 0));
|
||||||
|
bailif0(dstStrides=(*env)->GetPrimitiveArrayCritical(env, jDstStrides, 0));
|
||||||
|
for(i=0; i<nc; i++)
|
||||||
|
{
|
||||||
|
int planeSize=tjPlaneSizeYUV(i, width, dstStrides[i], height, subsamp);
|
||||||
|
int pw=tjPlaneWidth(i, width, subsamp);
|
||||||
|
|
||||||
|
if(planeSize<0 || pw<0)
|
||||||
|
_throw(tjGetErrorStr());
|
||||||
|
|
||||||
|
if(dstOffsets[i]<0)
|
||||||
|
_throw("Invalid argument in encodeYUV()");
|
||||||
|
if(dstStrides[i]<0 && dstOffsets[i]-planeSize+pw<0)
|
||||||
|
_throw("Negative plane stride would cause memory to be accessed below plane boundary");
|
||||||
|
|
||||||
|
bailif0(jDstPlanes[i]=(*env)->GetObjectArrayElement(env, dstobjs, i));
|
||||||
|
if((*env)->GetArrayLength(env, jDstPlanes[i])<dstOffsets[i]+planeSize)
|
||||||
|
_throw("Destination plane is not large enough");
|
||||||
|
|
||||||
|
bailif0(dstPlanes[i]=(*env)->GetPrimitiveArrayCritical(env, jDstPlanes[i],
|
||||||
|
0));
|
||||||
|
dstPlanes[i]=&dstPlanes[i][dstOffsets[i]];
|
||||||
|
}
|
||||||
|
bailif0(srcBuf=(*env)->GetPrimitiveArrayCritical(env, src, 0));
|
||||||
|
|
||||||
|
if(tjEncodeYUVPlanes(handle, &srcBuf[y*actualPitch + x*tjPixelSize[pf]],
|
||||||
|
width, pitch, height, pf, dstPlanes, dstStrides, subsamp, flags)==-1)
|
||||||
|
_throw(tjGetErrorStr());
|
||||||
|
|
||||||
|
bailout:
|
||||||
|
if(srcBuf) (*env)->ReleasePrimitiveArrayCritical(env, src, srcBuf, 0);
|
||||||
|
for(i=0; i<nc; i++)
|
||||||
|
{
|
||||||
|
if(dstPlanes[i] && jDstPlanes[i])
|
||||||
|
(*env)->ReleasePrimitiveArrayCritical(env, jDstPlanes[i], dstPlanes[i],
|
||||||
|
0);
|
||||||
|
}
|
||||||
|
if(dstStrides)
|
||||||
|
(*env)->ReleasePrimitiveArrayCritical(env, jDstStrides, dstStrides, 0);
|
||||||
|
if(dstOffsets)
|
||||||
|
(*env)->ReleasePrimitiveArrayCritical(env, jDstOffsets, dstOffsets, 0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* TurboJPEG 1.4.x: TJCompressor::encodeYUV() byte source */
|
||||||
|
JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJCompressor_encodeYUV___3BIIIIII_3_3B_3I_3III
|
||||||
|
(JNIEnv *env, jobject obj, jbyteArray src, jint x, jint y, jint width,
|
||||||
|
jint pitch, jint height, jint pf, jobjectArray dstobjs,
|
||||||
|
jintArray jDstOffsets, jintArray jDstStrides, jint subsamp, jint flags)
|
||||||
|
{
|
||||||
|
TJCompressor_encodeYUV(env, obj, src, 1, x, y, width, pitch, height, pf,
|
||||||
|
dstobjs, jDstOffsets, jDstStrides, subsamp, flags);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* TurboJPEG 1.4.x: TJCompressor::encodeYUV() int source */
|
||||||
|
JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJCompressor_encodeYUV___3IIIIIII_3_3B_3I_3III
|
||||||
|
(JNIEnv *env, jobject obj, jintArray src, jint x, jint y, jint width,
|
||||||
|
jint stride, jint height, jint pf, jobjectArray dstobjs,
|
||||||
|
jintArray jDstOffsets, jintArray jDstStrides, jint subsamp, jint flags)
|
||||||
|
{
|
||||||
|
if(pf<0 || pf>=org_libjpegturbo_turbojpeg_TJ_NUMPF)
|
||||||
|
_throw("Invalid argument in encodeYUV()");
|
||||||
|
if(tjPixelSize[pf]!=sizeof(jint))
|
||||||
|
_throw("Pixel format must be 32-bit when encoding from an integer buffer.");
|
||||||
|
|
||||||
|
TJCompressor_encodeYUV(env, obj, src, sizeof(jint), x, y, width,
|
||||||
|
stride*sizeof(jint), height, pf, dstobjs, jDstOffsets, jDstStrides,
|
||||||
|
subsamp, flags);
|
||||||
|
|
||||||
|
bailout:
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
JNIEXPORT void JNICALL TJCompressor_encodeYUV_12
|
||||||
|
(JNIEnv *env, jobject obj, jarray src, jint srcElementSize, jint width,
|
||||||
|
jint pitch, jint height, jint pf, jbyteArray dst, jint subsamp, jint flags)
|
||||||
|
{
|
||||||
|
tjhandle handle=0;
|
||||||
|
jsize arraySize=0;
|
||||||
unsigned char *srcBuf=NULL, *dstBuf=NULL;
|
unsigned char *srcBuf=NULL, *dstBuf=NULL;
|
||||||
|
|
||||||
gethandle();
|
gethandle();
|
||||||
@@ -251,21 +436,18 @@ static void TJCompressor_encodeYUV
|
|||||||
if(org_libjpegturbo_turbojpeg_TJ_NUMPF!=TJ_NUMPF)
|
if(org_libjpegturbo_turbojpeg_TJ_NUMPF!=TJ_NUMPF)
|
||||||
_throw("Mismatch between Java and C API");
|
_throw("Mismatch between Java and C API");
|
||||||
|
|
||||||
actualPitch=(pitch==0)? width*tjPixelSize[pf]:pitch;
|
arraySize=(pitch==0)? width*tjPixelSize[pf]*height:pitch*height;
|
||||||
arraySize=(y+height-1)*actualPitch + (x+width)*tjPixelSize[pf];
|
|
||||||
if((*env)->GetArrayLength(env, src)*srcElementSize<arraySize)
|
if((*env)->GetArrayLength(env, src)*srcElementSize<arraySize)
|
||||||
_throw("Source buffer is not large enough");
|
_throw("Source buffer is not large enough");
|
||||||
yuvSize=(jsize)tjBufSizeYUV2(width, pad, height, subsamp);
|
if((*env)->GetArrayLength(env, dst)
|
||||||
if(yuvSize==(unsigned long)-1)
|
<(jsize)tjBufSizeYUV(width, height, subsamp))
|
||||||
_throw(tjGetErrorStr());
|
|
||||||
if((*env)->GetArrayLength(env, dst)<yuvSize)
|
|
||||||
_throw("Destination buffer is not large enough");
|
_throw("Destination buffer is not large enough");
|
||||||
|
|
||||||
bailif0(srcBuf=(*env)->GetPrimitiveArrayCritical(env, src, 0));
|
bailif0(srcBuf=(*env)->GetPrimitiveArrayCritical(env, src, 0));
|
||||||
bailif0(dstBuf=(*env)->GetPrimitiveArrayCritical(env, dst, 0));
|
bailif0(dstBuf=(*env)->GetPrimitiveArrayCritical(env, dst, 0));
|
||||||
|
|
||||||
if(tjEncodeYUV3(handle, &srcBuf[y*actualPitch + x*tjPixelSize[pf]], width,
|
if(tjEncodeYUV2(handle, srcBuf, width, pitch, height, pf, dstBuf, subsamp,
|
||||||
pitch, height, pf, dstBuf, pad, subsamp, flags)==-1)
|
flags)==-1)
|
||||||
_throw(tjGetErrorStr());
|
_throw(tjGetErrorStr());
|
||||||
|
|
||||||
bailout:
|
bailout:
|
||||||
@@ -274,41 +456,13 @@ static void TJCompressor_encodeYUV
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* TurboJPEG 1.4.x: TJCompressor::encodeYUV() byte source */
|
|
||||||
JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJCompressor_encodeYUV___3BIIIIII_3BIII
|
|
||||||
(JNIEnv *env, jobject obj, jbyteArray src, jint x, jint y, jint width,
|
|
||||||
jint pitch, jint height, jint pf, jbyteArray dst, jint pad, jint subsamp,
|
|
||||||
jint flags)
|
|
||||||
{
|
|
||||||
TJCompressor_encodeYUV(env, obj, src, 1, x, y, width, pitch, height, pf, dst,
|
|
||||||
pad, subsamp, flags);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* TurboJPEG 1.2.x: TJCompressor::encodeYUV() byte source */
|
/* TurboJPEG 1.2.x: TJCompressor::encodeYUV() byte source */
|
||||||
JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJCompressor_encodeYUV___3BIIII_3BII
|
JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJCompressor_encodeYUV___3BIIII_3BII
|
||||||
(JNIEnv *env, jobject obj, jbyteArray src, jint width, jint pitch,
|
(JNIEnv *env, jobject obj, jbyteArray src, jint width, jint pitch,
|
||||||
jint height, jint pf, jbyteArray dst, jint subsamp, jint flags)
|
jint height, jint pf, jbyteArray dst, jint subsamp, jint flags)
|
||||||
{
|
{
|
||||||
TJCompressor_encodeYUV(env, obj, src, 1, 0, 0, width, pitch, height, pf, dst,
|
TJCompressor_encodeYUV_12(env, obj, src, 1, width, pitch, height, pf, dst,
|
||||||
4, subsamp, flags);
|
subsamp, flags);
|
||||||
}
|
|
||||||
|
|
||||||
/* TurboJPEG 1.4.x: TJCompressor::encodeYUV() int source */
|
|
||||||
JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJCompressor_encodeYUV___3IIIIIII_3BIII
|
|
||||||
(JNIEnv *env, jobject obj, jintArray src, jint x, jint y, jint width,
|
|
||||||
jint stride, jint height, jint pf, jbyteArray dst, jint pad, jint subsamp,
|
|
||||||
jint flags)
|
|
||||||
{
|
|
||||||
if(pf<0 || pf>=org_libjpegturbo_turbojpeg_TJ_NUMPF)
|
|
||||||
_throw("Invalid argument in encodeYUV()");
|
|
||||||
if(tjPixelSize[pf]!=sizeof(jint))
|
|
||||||
_throw("Pixel format must be 32-bit when encoding from an integer buffer.");
|
|
||||||
|
|
||||||
TJCompressor_encodeYUV(env, obj, src, sizeof(jint), x, y, width,
|
|
||||||
stride*sizeof(jint), height, pf, dst, pad, subsamp, flags);
|
|
||||||
|
|
||||||
bailout:
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* TurboJPEG 1.2.x: TJCompressor::encodeYUV() int source */
|
/* TurboJPEG 1.2.x: TJCompressor::encodeYUV() int source */
|
||||||
@@ -321,8 +475,8 @@ JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJCompressor_encodeYUV___
|
|||||||
if(tjPixelSize[pf]!=sizeof(jint))
|
if(tjPixelSize[pf]!=sizeof(jint))
|
||||||
_throw("Pixel format must be 32-bit when encoding from an integer buffer.");
|
_throw("Pixel format must be 32-bit when encoding from an integer buffer.");
|
||||||
|
|
||||||
TJCompressor_encodeYUV(env, obj, src, sizeof(jint), 0, 0, width,
|
TJCompressor_encodeYUV_12(env, obj, src, sizeof(jint), width,
|
||||||
stride*sizeof(jint), height, pf, dst, 4, subsamp, flags);
|
stride*sizeof(jint), height, pf, dst, subsamp, flags);
|
||||||
|
|
||||||
bailout:
|
bailout:
|
||||||
return;
|
return;
|
||||||
@@ -518,14 +672,19 @@ JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJDecompressor_decompress
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* TurboJPEG 1.4.x: TJDecompressor::decompressToYUV() */
|
/* TurboJPEG 1.4.x: TJDecompressor::decompressToYUV() */
|
||||||
JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJDecompressor_decompressToYUV___3BI_3BIIII
|
JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJDecompressor_decompressToYUV___3BI_3_3B_3II_3III
|
||||||
(JNIEnv *env, jobject obj, jbyteArray src, jint jpegSize, jbyteArray dst,
|
(JNIEnv *env, jobject obj, jbyteArray src, jint jpegSize,
|
||||||
jint desiredWidth, jint pad, jint desiredHeight, jint flags)
|
jobjectArray dstobjs, jintArray jDstOffsets, jint desiredWidth,
|
||||||
|
jintArray jDstStrides, jint desiredHeight, jint flags)
|
||||||
{
|
{
|
||||||
tjhandle handle=0;
|
tjhandle handle=0;
|
||||||
unsigned char *jpegBuf=NULL, *dstBuf=NULL;
|
jbyteArray jDstPlanes[3]={NULL, NULL, NULL};
|
||||||
|
unsigned char *jpegBuf=NULL, *dstPlanes[3];
|
||||||
|
int *dstOffsets=NULL, *dstStrides=NULL;
|
||||||
int jpegSubsamp=-1, jpegWidth=0, jpegHeight=0;
|
int jpegSubsamp=-1, jpegWidth=0, jpegHeight=0;
|
||||||
jsize yuvSize;
|
int nc=0, i, width, height, scaledWidth, scaledHeight, nsf=0;
|
||||||
|
tjscalingfactor *sf;
|
||||||
|
|
||||||
|
|
||||||
gethandle();
|
gethandle();
|
||||||
|
|
||||||
@@ -538,22 +697,64 @@ JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJDecompressor_decompress
|
|||||||
bailif0(_fid=(*env)->GetFieldID(env, _cls, "jpegHeight", "I"));
|
bailif0(_fid=(*env)->GetFieldID(env, _cls, "jpegHeight", "I"));
|
||||||
jpegHeight=(int)(*env)->GetIntField(env, obj, _fid);
|
jpegHeight=(int)(*env)->GetIntField(env, obj, _fid);
|
||||||
|
|
||||||
yuvSize=(jsize)tjBufSizeYUV2(desiredWidth==0? jpegWidth:desiredWidth,
|
nc=(jpegSubsamp==org_libjpegturbo_turbojpeg_TJ_SAMP_GRAY? 1:3);
|
||||||
pad, desiredHeight==0? jpegHeight:desiredHeight, jpegSubsamp);
|
|
||||||
if(yuvSize==(unsigned long)-1)
|
|
||||||
_throw(tjGetErrorStr());
|
|
||||||
if((*env)->GetArrayLength(env, dst)<yuvSize)
|
|
||||||
_throw("Destination buffer is not large enough");
|
|
||||||
bailif0(jpegBuf=(*env)->GetPrimitiveArrayCritical(env, src, 0));
|
|
||||||
bailif0(dstBuf=(*env)->GetPrimitiveArrayCritical(env, dst, 0));
|
|
||||||
|
|
||||||
if(tjDecompressToYUV2(handle, jpegBuf, (unsigned long)jpegSize, dstBuf,
|
width=desiredWidth; height=desiredHeight;
|
||||||
desiredWidth, pad, desiredHeight, flags)==-1)
|
if(width==0) width=jpegWidth;
|
||||||
|
if(height==0) height=jpegHeight;
|
||||||
|
sf=tjGetScalingFactors(&nsf);
|
||||||
|
if(!sf || nsf<1)
|
||||||
|
_throw(tjGetErrorStr());
|
||||||
|
for(i=0; i<nsf; i++)
|
||||||
|
{
|
||||||
|
scaledWidth=TJSCALED(jpegWidth, sf[i]);
|
||||||
|
scaledHeight=TJSCALED(jpegHeight, sf[i]);
|
||||||
|
if(scaledWidth<=width && scaledHeight<=height)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
bailif0(dstOffsets=(*env)->GetPrimitiveArrayCritical(env, jDstOffsets, 0));
|
||||||
|
bailif0(dstStrides=(*env)->GetPrimitiveArrayCritical(env, jDstStrides, 0));
|
||||||
|
for(i=0; i<nc; i++)
|
||||||
|
{
|
||||||
|
int planeSize=tjPlaneSizeYUV(i, scaledWidth, dstStrides[i], scaledHeight,
|
||||||
|
jpegSubsamp);
|
||||||
|
int pw=tjPlaneWidth(i, scaledWidth, jpegSubsamp);
|
||||||
|
|
||||||
|
if(planeSize<0 || pw<0)
|
||||||
|
_throw(tjGetErrorStr());
|
||||||
|
|
||||||
|
if(dstOffsets[i]<0)
|
||||||
|
_throw("Invalid argument in decompressToYUV()");
|
||||||
|
if(dstStrides[i]<0 && dstOffsets[i]-planeSize+pw<0)
|
||||||
|
_throw("Negative plane stride would cause memory to be accessed below plane boundary");
|
||||||
|
|
||||||
|
bailif0(jDstPlanes[i]=(*env)->GetObjectArrayElement(env, dstobjs, i));
|
||||||
|
if((*env)->GetArrayLength(env, jDstPlanes[i])<dstOffsets[i]+planeSize)
|
||||||
|
_throw("Destination plane is not large enough");
|
||||||
|
|
||||||
|
bailif0(dstPlanes[i]=(*env)->GetPrimitiveArrayCritical(env, jDstPlanes[i],
|
||||||
|
0));
|
||||||
|
dstPlanes[i]=&dstPlanes[i][dstOffsets[i]];
|
||||||
|
}
|
||||||
|
bailif0(jpegBuf=(*env)->GetPrimitiveArrayCritical(env, src, 0));
|
||||||
|
|
||||||
|
if(tjDecompressToYUVPlanes(handle, jpegBuf, (unsigned long)jpegSize,
|
||||||
|
dstPlanes, desiredWidth, dstStrides, desiredHeight, flags)==-1)
|
||||||
_throw(tjGetErrorStr());
|
_throw(tjGetErrorStr());
|
||||||
|
|
||||||
bailout:
|
bailout:
|
||||||
if(dstBuf) (*env)->ReleasePrimitiveArrayCritical(env, dst, dstBuf, 0);
|
|
||||||
if(jpegBuf) (*env)->ReleasePrimitiveArrayCritical(env, src, jpegBuf, 0);
|
if(jpegBuf) (*env)->ReleasePrimitiveArrayCritical(env, src, jpegBuf, 0);
|
||||||
|
for(i=0; i<nc; i++)
|
||||||
|
{
|
||||||
|
if(dstPlanes[i] && jDstPlanes[i])
|
||||||
|
(*env)->ReleasePrimitiveArrayCritical(env, jDstPlanes[i], dstPlanes[i],
|
||||||
|
0);
|
||||||
|
}
|
||||||
|
if(dstStrides)
|
||||||
|
(*env)->ReleasePrimitiveArrayCritical(env, jDstStrides, dstStrides, 0);
|
||||||
|
if(dstOffsets)
|
||||||
|
(*env)->ReleasePrimitiveArrayCritical(env, jDstOffsets, dstOffsets, 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -561,72 +762,140 @@ JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJDecompressor_decompress
|
|||||||
JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJDecompressor_decompressToYUV___3BI_3BI
|
JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJDecompressor_decompressToYUV___3BI_3BI
|
||||||
(JNIEnv *env, jobject obj, jbyteArray src, jint jpegSize, jbyteArray dst,
|
(JNIEnv *env, jobject obj, jbyteArray src, jint jpegSize, jbyteArray dst,
|
||||||
jint flags)
|
jint flags)
|
||||||
{
|
|
||||||
Java_org_libjpegturbo_turbojpeg_TJDecompressor_decompressToYUV___3BI_3BIIII(
|
|
||||||
env, obj, src, jpegSize, dst, 0, 4, 0, flags);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void TJDecompressor_decodeYUV
|
|
||||||
(JNIEnv *env, jobject obj, jbyteArray src, jint pad, jint subsamp,
|
|
||||||
jarray dst, jint dstElementSize, jint x, jint y, jint width, jint pitch,
|
|
||||||
jint height, jint pf, jint flags)
|
|
||||||
{
|
{
|
||||||
tjhandle handle=0;
|
tjhandle handle=0;
|
||||||
jsize arraySize=0, actualPitch;
|
unsigned char *jpegBuf=NULL, *dstBuf=NULL;
|
||||||
unsigned char *srcBuf=NULL, *dstBuf=NULL;
|
int jpegSubsamp=-1, jpegWidth=0, jpegHeight=0;
|
||||||
|
|
||||||
gethandle();
|
gethandle();
|
||||||
|
|
||||||
if(pf<0 || pf>=org_libjpegturbo_turbojpeg_TJ_NUMPF)
|
if((*env)->GetArrayLength(env, src)<jpegSize)
|
||||||
|
_throw("Source buffer is not large enough");
|
||||||
|
bailif0(_fid=(*env)->GetFieldID(env, _cls, "jpegSubsamp", "I"));
|
||||||
|
jpegSubsamp=(int)(*env)->GetIntField(env, obj, _fid);
|
||||||
|
bailif0(_fid=(*env)->GetFieldID(env, _cls, "jpegWidth", "I"));
|
||||||
|
jpegWidth=(int)(*env)->GetIntField(env, obj, _fid);
|
||||||
|
bailif0(_fid=(*env)->GetFieldID(env, _cls, "jpegHeight", "I"));
|
||||||
|
jpegHeight=(int)(*env)->GetIntField(env, obj, _fid);
|
||||||
|
if((*env)->GetArrayLength(env, dst)
|
||||||
|
<(jsize)tjBufSizeYUV(jpegWidth, jpegHeight, jpegSubsamp))
|
||||||
|
_throw("Destination buffer is not large enough");
|
||||||
|
|
||||||
|
bailif0(jpegBuf=(*env)->GetPrimitiveArrayCritical(env, src, 0));
|
||||||
|
bailif0(dstBuf=(*env)->GetPrimitiveArrayCritical(env, dst, 0));
|
||||||
|
|
||||||
|
if(tjDecompressToYUV(handle, jpegBuf, (unsigned long)jpegSize, dstBuf,
|
||||||
|
flags)==-1)
|
||||||
|
_throw(tjGetErrorStr());
|
||||||
|
|
||||||
|
bailout:
|
||||||
|
if(dstBuf) (*env)->ReleasePrimitiveArrayCritical(env, dst, dstBuf, 0);
|
||||||
|
if(jpegBuf) (*env)->ReleasePrimitiveArrayCritical(env, src, jpegBuf, 0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void TJDecompressor_decodeYUV
|
||||||
|
(JNIEnv *env, jobject obj, jobjectArray srcobjs, jintArray jSrcOffsets,
|
||||||
|
jintArray jSrcStrides, jint subsamp, jarray dst, jint dstElementSize,
|
||||||
|
jint x, jint y, jint width, jint pitch, jint height, jint pf, jint flags)
|
||||||
|
{
|
||||||
|
tjhandle handle=0;
|
||||||
|
jsize arraySize=0, actualPitch;
|
||||||
|
jbyteArray jSrcPlanes[3]={NULL, NULL, NULL};
|
||||||
|
unsigned char *srcPlanes[3], *dstBuf=NULL;
|
||||||
|
int *srcOffsets=NULL, *srcStrides=NULL;
|
||||||
|
int nc=(subsamp==org_libjpegturbo_turbojpeg_TJ_SAMP_GRAY? 1:3), i;
|
||||||
|
|
||||||
|
gethandle();
|
||||||
|
|
||||||
|
if(pf<0 || pf>=org_libjpegturbo_turbojpeg_TJ_NUMPF || subsamp<0
|
||||||
|
|| subsamp>=org_libjpegturbo_turbojpeg_TJ_NUMSAMP)
|
||||||
_throw("Invalid argument in decodeYUV()");
|
_throw("Invalid argument in decodeYUV()");
|
||||||
if(org_libjpegturbo_turbojpeg_TJ_NUMPF!=TJ_NUMPF)
|
if(org_libjpegturbo_turbojpeg_TJ_NUMPF!=TJ_NUMPF
|
||||||
|
|| org_libjpegturbo_turbojpeg_TJ_NUMSAMP!=TJ_NUMSAMP)
|
||||||
_throw("Mismatch between Java and C API");
|
_throw("Mismatch between Java and C API");
|
||||||
|
|
||||||
arraySize=tjBufSizeYUV2(width, pad, height, subsamp);
|
if((*env)->GetArrayLength(env, srcobjs)<nc)
|
||||||
if((*env)->GetArrayLength(env, src)<arraySize)
|
_throw("Planes array is too small for the subsampling type");
|
||||||
_throw("Source buffer is not large enough");
|
if((*env)->GetArrayLength(env, jSrcOffsets)<nc)
|
||||||
|
_throw("Offsets array is too small for the subsampling type");
|
||||||
|
if((*env)->GetArrayLength(env, jSrcStrides)<nc)
|
||||||
|
_throw("Strides array is too small for the subsampling type");
|
||||||
|
|
||||||
actualPitch=(pitch==0)? width*tjPixelSize[pf]:pitch;
|
actualPitch=(pitch==0)? width*tjPixelSize[pf]:pitch;
|
||||||
arraySize=(y+height-1)*actualPitch + (x+width)*tjPixelSize[pf];
|
arraySize=(y+height-1)*actualPitch + (x+width)*tjPixelSize[pf];
|
||||||
if((*env)->GetArrayLength(env, dst)*dstElementSize<arraySize)
|
if((*env)->GetArrayLength(env, dst)*dstElementSize<arraySize)
|
||||||
_throw("Destination buffer is not large enough");
|
_throw("Destination buffer is not large enough");
|
||||||
|
|
||||||
bailif0(srcBuf=(*env)->GetPrimitiveArrayCritical(env, src, 0));
|
bailif0(srcOffsets=(*env)->GetPrimitiveArrayCritical(env, jSrcOffsets, 0));
|
||||||
|
bailif0(srcStrides=(*env)->GetPrimitiveArrayCritical(env, jSrcStrides, 0));
|
||||||
|
for(i=0; i<nc; i++)
|
||||||
|
{
|
||||||
|
int planeSize=tjPlaneSizeYUV(i, width, srcStrides[i], height, subsamp);
|
||||||
|
int pw=tjPlaneWidth(i, width, subsamp);
|
||||||
|
|
||||||
|
if(planeSize<0 || pw<0)
|
||||||
|
_throw(tjGetErrorStr());
|
||||||
|
|
||||||
|
if(srcOffsets[i]<0)
|
||||||
|
_throw("Invalid argument in decodeYUV()");
|
||||||
|
if(srcStrides[i]<0 && srcOffsets[i]-planeSize+pw<0)
|
||||||
|
_throw("Negative plane stride would cause memory to be accessed below plane boundary");
|
||||||
|
|
||||||
|
bailif0(jSrcPlanes[i]=(*env)->GetObjectArrayElement(env, srcobjs, i));
|
||||||
|
if((*env)->GetArrayLength(env, jSrcPlanes[i])<srcOffsets[i]+planeSize)
|
||||||
|
_throw("Source plane is not large enough");
|
||||||
|
|
||||||
|
bailif0(srcPlanes[i]=(*env)->GetPrimitiveArrayCritical(env, jSrcPlanes[i],
|
||||||
|
0));
|
||||||
|
srcPlanes[i]=&srcPlanes[i][srcOffsets[i]];
|
||||||
|
}
|
||||||
bailif0(dstBuf=(*env)->GetPrimitiveArrayCritical(env, dst, 0));
|
bailif0(dstBuf=(*env)->GetPrimitiveArrayCritical(env, dst, 0));
|
||||||
|
|
||||||
if(tjDecodeYUV(handle, srcBuf, pad, subsamp,
|
if(tjDecodeYUVPlanes(handle, srcPlanes, srcStrides, subsamp,
|
||||||
&dstBuf[y*actualPitch + x*tjPixelSize[pf]], width, pitch, height, pf,
|
&dstBuf[y*actualPitch + x*tjPixelSize[pf]], width, pitch, height, pf,
|
||||||
flags)==-1)
|
flags)==-1)
|
||||||
_throw(tjGetErrorStr());
|
_throw(tjGetErrorStr());
|
||||||
|
|
||||||
bailout:
|
bailout:
|
||||||
if(dstBuf) (*env)->ReleasePrimitiveArrayCritical(env, dst, dstBuf, 0);
|
if(dstBuf) (*env)->ReleasePrimitiveArrayCritical(env, dst, dstBuf, 0);
|
||||||
if(srcBuf) (*env)->ReleasePrimitiveArrayCritical(env, src, srcBuf, 0);
|
for(i=0; i<nc; i++)
|
||||||
|
{
|
||||||
|
if(srcPlanes[i] && jSrcPlanes[i])
|
||||||
|
(*env)->ReleasePrimitiveArrayCritical(env, jSrcPlanes[i], srcPlanes[i],
|
||||||
|
0);
|
||||||
|
}
|
||||||
|
if(srcStrides)
|
||||||
|
(*env)->ReleasePrimitiveArrayCritical(env, jSrcStrides, srcStrides, 0);
|
||||||
|
if(srcOffsets)
|
||||||
|
(*env)->ReleasePrimitiveArrayCritical(env, jSrcOffsets, srcOffsets, 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* TurboJPEG 1.4.x: TJDecompressor::decodeYUV() byte destination */
|
/* TurboJPEG 1.4.x: TJDecompressor::decodeYUV() byte destination */
|
||||||
JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJDecompressor_decodeYUV___3BII_3BIIIIIII
|
JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJDecompressor_decodeYUV___3_3B_3I_3II_3BIIIIIII
|
||||||
(JNIEnv *env, jobject obj, jbyteArray src, jint pad, jint subsamp,
|
(JNIEnv *env, jobject obj, jobjectArray srcobjs, jintArray jSrcOffsets,
|
||||||
jbyteArray dst, jint x, jint y, jint width, jint pitch, jint height,
|
jintArray jSrcStrides, jint subsamp, jbyteArray dst, jint x, jint y,
|
||||||
jint pf, jint flags)
|
jint width, jint pitch, jint height, jint pf, jint flags)
|
||||||
{
|
{
|
||||||
TJDecompressor_decodeYUV(env, obj, src, pad, subsamp, dst, 1, x, y, width,
|
TJDecompressor_decodeYUV(env, obj, srcobjs, jSrcOffsets, jSrcStrides,
|
||||||
pitch, height, pf, flags);
|
subsamp, dst, 1, x, y, width, pitch, height, pf, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* TurboJPEG 1.4.x: TJDecompressor::decodeYUV() int destination */
|
/* TurboJPEG 1.4.x: TJDecompressor::decodeYUV() int destination */
|
||||||
JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJDecompressor_decodeYUV___3BII_3IIIIIIII
|
JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJDecompressor_decodeYUV___3_3B_3I_3II_3IIIIIIII
|
||||||
(JNIEnv *env, jobject obj, jbyteArray src, jint pad, jint subsamp,
|
(JNIEnv *env, jobject obj, jobjectArray srcobjs, jintArray jSrcOffsets,
|
||||||
jintArray dst, jint x, jint y, jint width, jint stride, jint height,
|
jintArray jSrcStrides, jint subsamp, jintArray dst, jint x, jint y,
|
||||||
jint pf, jint flags)
|
jint width, jint stride, jint height, jint pf, jint flags)
|
||||||
{
|
{
|
||||||
if(pf<0 || pf>=org_libjpegturbo_turbojpeg_TJ_NUMPF)
|
if(pf<0 || pf>=org_libjpegturbo_turbojpeg_TJ_NUMPF)
|
||||||
_throw("Invalid argument in decodeYUV()");
|
_throw("Invalid argument in decodeYUV()");
|
||||||
if(tjPixelSize[pf]!=sizeof(jint))
|
if(tjPixelSize[pf]!=sizeof(jint))
|
||||||
_throw("Pixel format must be 32-bit when decoding to an integer buffer.");
|
_throw("Pixel format must be 32-bit when decoding to an integer buffer.");
|
||||||
|
|
||||||
TJDecompressor_decodeYUV(env, obj, src, pad, subsamp, dst, sizeof(jint), x,
|
TJDecompressor_decodeYUV(env, obj, srcobjs, jSrcOffsets, jSrcStrides,
|
||||||
y, width, stride*sizeof(jint), height, pf, flags);
|
subsamp, dst, sizeof(jint), x, y, width, stride*sizeof(jint), height, pf,
|
||||||
|
flags);
|
||||||
|
|
||||||
bailout:
|
bailout:
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -77,10 +77,13 @@ TURBOJPEG_1.4
|
|||||||
tjEncodeYUV3;
|
tjEncodeYUV3;
|
||||||
tjEncodeYUVPlanes;
|
tjEncodeYUVPlanes;
|
||||||
Java_org_libjpegturbo_turbojpeg_TJ_bufSizeYUV__IIII;
|
Java_org_libjpegturbo_turbojpeg_TJ_bufSizeYUV__IIII;
|
||||||
Java_org_libjpegturbo_turbojpeg_TJCompressor_compressFromYUV___3BIIII_3BII;
|
Java_org_libjpegturbo_turbojpeg_TJCompressor_compressFromYUV___3_3B_3II_3III_3BII;
|
||||||
Java_org_libjpegturbo_turbojpeg_TJCompressor_encodeYUV___3BIIIIII_3BIII;
|
Java_org_libjpegturbo_turbojpeg_TJCompressor_encodeYUV___3BIIIIII_3_3B_3I_3III;
|
||||||
Java_org_libjpegturbo_turbojpeg_TJCompressor_encodeYUV___3IIIIIII_3BIII;
|
Java_org_libjpegturbo_turbojpeg_TJCompressor_encodeYUV___3IIIIIII_3_3B_3I_3III;
|
||||||
Java_org_libjpegturbo_turbojpeg_TJDecompressor_decompressToYUV___3BI_3BIIII;
|
Java_org_libjpegturbo_turbojpeg_TJDecompressor_decompressToYUV___3BI_3_3B_3II_3III;
|
||||||
Java_org_libjpegturbo_turbojpeg_TJDecompressor_decodeYUV___3BII_3BIIIIIII;
|
Java_org_libjpegturbo_turbojpeg_TJDecompressor_decodeYUV___3_3B_3I_3II_3BIIIIIII;
|
||||||
Java_org_libjpegturbo_turbojpeg_TJDecompressor_decodeYUV___3BII_3IIIIIIII;
|
Java_org_libjpegturbo_turbojpeg_TJDecompressor_decodeYUV___3_3B_3I_3II_3IIIIIIII;
|
||||||
|
Java_org_libjpegturbo_turbojpeg_TJ_planeHeight__III;
|
||||||
|
Java_org_libjpegturbo_turbojpeg_TJ_planeSizeYUV__IIIII;
|
||||||
|
Java_org_libjpegturbo_turbojpeg_TJ_planeWidth__III;
|
||||||
} TURBOJPEG_1.3;
|
} TURBOJPEG_1.3;
|
||||||
|
|||||||
282
turbojpeg.c
282
turbojpeg.c
@@ -579,15 +579,19 @@ DLLEXPORT unsigned long DLLCALL TJBUFSIZE(int width, int height)
|
|||||||
DLLEXPORT unsigned long DLLCALL tjBufSizeYUV2(int width, int pad, int height,
|
DLLEXPORT unsigned long DLLCALL tjBufSizeYUV2(int width, int pad, int height,
|
||||||
int subsamp)
|
int subsamp)
|
||||||
{
|
{
|
||||||
unsigned long retval=0;
|
int retval=0, nc, i;
|
||||||
int pw, ph, cw, ch;
|
|
||||||
if(width<1 || height<1 || pad<1 || !isPow2(pad) || subsamp<0
|
if(subsamp<0 || subsamp>=NUMSUBOPT)
|
||||||
|| subsamp>=NUMSUBOPT)
|
|
||||||
_throw("tjBufSizeYUV2(): Invalid argument");
|
_throw("tjBufSizeYUV2(): Invalid argument");
|
||||||
pw=PAD(width, tjMCUWidth[subsamp]/8);
|
|
||||||
ph=PAD(height, tjMCUHeight[subsamp]/8);
|
nc=(subsamp==TJSAMP_GRAY? 1:3);
|
||||||
cw=pw*8/tjMCUWidth[subsamp]; ch=ph*8/tjMCUHeight[subsamp];
|
for(i=0; i<nc; i++)
|
||||||
retval=PAD(pw, pad)*ph + (subsamp==TJSAMP_GRAY? 0:PAD(cw, pad)*ch*2);
|
{
|
||||||
|
int stride=PAD(tjPlaneWidth(i, width, subsamp), pad);
|
||||||
|
int ph=tjPlaneHeight(i, height, subsamp);
|
||||||
|
if(stride<0 || ph<0) return -1;
|
||||||
|
else retval+=stride*ph;
|
||||||
|
}
|
||||||
|
|
||||||
bailout:
|
bailout:
|
||||||
return retval;
|
return retval;
|
||||||
@@ -606,6 +610,70 @@ DLLEXPORT unsigned long DLLCALL TJBUFSIZEYUV(int width, int height,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
DLLEXPORT int tjPlaneWidth(int componentID, int width, int subsamp)
|
||||||
|
{
|
||||||
|
int pw, nc, retval=0;
|
||||||
|
|
||||||
|
if(width<1 || subsamp<0 || subsamp>=TJ_NUMSAMP)
|
||||||
|
_throw("tjPlaneWidth(): Invalid argument");
|
||||||
|
nc=(subsamp==TJSAMP_GRAY? 1:3);
|
||||||
|
if(componentID<0 || componentID>=nc)
|
||||||
|
_throw("tjPlaneWidth(): Invalid argument");
|
||||||
|
|
||||||
|
pw=PAD(width, tjMCUWidth[subsamp]/8);
|
||||||
|
if(componentID==0)
|
||||||
|
retval=pw;
|
||||||
|
else
|
||||||
|
retval=pw*8/tjMCUWidth[subsamp];
|
||||||
|
|
||||||
|
bailout:
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
DLLEXPORT int tjPlaneHeight(int componentID, int height, int subsamp)
|
||||||
|
{
|
||||||
|
int ph, nc, retval=0;
|
||||||
|
|
||||||
|
if(height<1 || subsamp<0 || subsamp>=TJ_NUMSAMP)
|
||||||
|
_throw("tjPlaneHeight(): Invalid argument");
|
||||||
|
nc=(subsamp==TJSAMP_GRAY? 1:3);
|
||||||
|
if(componentID<0 || componentID>=nc)
|
||||||
|
_throw("tjPlaneHeight(): Invalid argument");
|
||||||
|
|
||||||
|
ph=PAD(height, tjMCUHeight[subsamp]/8);
|
||||||
|
if(componentID==0)
|
||||||
|
retval=ph;
|
||||||
|
else
|
||||||
|
retval=ph*8/tjMCUHeight[subsamp];
|
||||||
|
|
||||||
|
bailout:
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
DLLEXPORT unsigned long DLLCALL tjPlaneSizeYUV(int componentID, int width,
|
||||||
|
int stride, int height, int subsamp)
|
||||||
|
{
|
||||||
|
unsigned long retval=0;
|
||||||
|
int pw, ph;
|
||||||
|
|
||||||
|
if(width<1 || height<1 || subsamp<0 || subsamp>=NUMSUBOPT)
|
||||||
|
_throw("tjPlaneSizeYUV(): Invalid argument");
|
||||||
|
|
||||||
|
pw=tjPlaneWidth(componentID, width, subsamp);
|
||||||
|
ph=tjPlaneHeight(componentID, height, subsamp);
|
||||||
|
|
||||||
|
if(stride==0) stride=pw;
|
||||||
|
else stride=abs(stride);
|
||||||
|
|
||||||
|
retval=stride*(ph-1)+pw;
|
||||||
|
|
||||||
|
bailout:
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
DLLEXPORT int DLLCALL tjCompress2(tjhandle handle, unsigned char *srcBuf,
|
DLLEXPORT int DLLCALL tjCompress2(tjhandle handle, unsigned char *srcBuf,
|
||||||
int width, int pitch, int height, int pixelFormat, unsigned char **jpegBuf,
|
int width, int pitch, int height, int pixelFormat, unsigned char **jpegBuf,
|
||||||
unsigned long *jpegSize, int jpegSubsamp, int jpegQual, int flags)
|
unsigned long *jpegSize, int jpegSubsamp, int jpegQual, int flags)
|
||||||
@@ -712,7 +780,7 @@ DLLEXPORT int DLLCALL tjEncodeYUVPlanes(tjhandle handle, unsigned char *srcBuf,
|
|||||||
JSAMPLE *_tmpbuf[MAX_COMPONENTS], *_tmpbuf2[MAX_COMPONENTS];
|
JSAMPLE *_tmpbuf[MAX_COMPONENTS], *_tmpbuf2[MAX_COMPONENTS];
|
||||||
JSAMPROW *tmpbuf[MAX_COMPONENTS], *tmpbuf2[MAX_COMPONENTS];
|
JSAMPROW *tmpbuf[MAX_COMPONENTS], *tmpbuf2[MAX_COMPONENTS];
|
||||||
JSAMPROW *outbuf[MAX_COMPONENTS];
|
JSAMPROW *outbuf[MAX_COMPONENTS];
|
||||||
int row, pw, ph, cw[MAX_COMPONENTS], ch[MAX_COMPONENTS];
|
int row, pw0, ph0, pw[MAX_COMPONENTS], ph[MAX_COMPONENTS];
|
||||||
JSAMPLE *ptr;
|
JSAMPLE *ptr;
|
||||||
jpeg_component_info *compptr;
|
jpeg_component_info *compptr;
|
||||||
#ifndef JCS_EXTENSIONS
|
#ifndef JCS_EXTENSIONS
|
||||||
@@ -780,18 +848,18 @@ DLLEXPORT int DLLCALL tjEncodeYUVPlanes(tjhandle handle, unsigned char *srcBuf,
|
|||||||
jinit_downsampler(cinfo);
|
jinit_downsampler(cinfo);
|
||||||
(*cinfo->cconvert->start_pass)(cinfo);
|
(*cinfo->cconvert->start_pass)(cinfo);
|
||||||
|
|
||||||
pw=PAD(width, cinfo->max_h_samp_factor);
|
pw0=PAD(width, cinfo->max_h_samp_factor);
|
||||||
ph=PAD(height, cinfo->max_v_samp_factor);
|
ph0=PAD(height, cinfo->max_v_samp_factor);
|
||||||
|
|
||||||
if((row_pointer=(JSAMPROW *)malloc(sizeof(JSAMPROW)*ph))==NULL)
|
if((row_pointer=(JSAMPROW *)malloc(sizeof(JSAMPROW)*ph0))==NULL)
|
||||||
_throw("tjEncodeYUVPlanes(): Memory allocation failure");
|
_throw("tjEncodeYUVPlanes(): Memory allocation failure");
|
||||||
for(i=0; i<height; i++)
|
for(i=0; i<height; i++)
|
||||||
{
|
{
|
||||||
if(flags&TJFLAG_BOTTOMUP) row_pointer[i]=&srcBuf[(height-i-1)*pitch];
|
if(flags&TJFLAG_BOTTOMUP) row_pointer[i]=&srcBuf[(height-i-1)*pitch];
|
||||||
else row_pointer[i]=&srcBuf[i*pitch];
|
else row_pointer[i]=&srcBuf[i*pitch];
|
||||||
}
|
}
|
||||||
if(height<ph)
|
if(height<ph0)
|
||||||
for(i=height; i<ph; i++) row_pointer[i]=row_pointer[height-1];
|
for(i=height; i<ph0; i++) row_pointer[i]=row_pointer[height-1];
|
||||||
|
|
||||||
for(i=0; i<cinfo->num_components; i++)
|
for(i=0; i<cinfo->num_components; i++)
|
||||||
{
|
{
|
||||||
@@ -822,19 +890,19 @@ DLLEXPORT int DLLCALL tjEncodeYUVPlanes(tjhandle handle, unsigned char *srcBuf,
|
|||||||
tmpbuf2[i][row]=&_tmpbuf2_aligned[
|
tmpbuf2[i][row]=&_tmpbuf2_aligned[
|
||||||
PAD(compptr->width_in_blocks*DCTSIZE, 16) * row];
|
PAD(compptr->width_in_blocks*DCTSIZE, 16) * row];
|
||||||
}
|
}
|
||||||
cw[i]=pw*compptr->h_samp_factor/cinfo->max_h_samp_factor;
|
pw[i]=pw0*compptr->h_samp_factor/cinfo->max_h_samp_factor;
|
||||||
ch[i]=ph*compptr->v_samp_factor/cinfo->max_v_samp_factor;
|
ph[i]=ph0*compptr->v_samp_factor/cinfo->max_v_samp_factor;
|
||||||
outbuf[i]=(JSAMPROW *)malloc(sizeof(JSAMPROW)*ch[i]);
|
outbuf[i]=(JSAMPROW *)malloc(sizeof(JSAMPROW)*ph[i]);
|
||||||
if(!outbuf[i]) _throw("tjEncodeYUVPlanes(): Memory allocation failure");
|
if(!outbuf[i]) _throw("tjEncodeYUVPlanes(): Memory allocation failure");
|
||||||
ptr=dstPlanes[i];
|
ptr=dstPlanes[i];
|
||||||
for(row=0; row<ch[i]; row++)
|
for(row=0; row<ph[i]; row++)
|
||||||
{
|
{
|
||||||
outbuf[i][row]=ptr;
|
outbuf[i][row]=ptr;
|
||||||
ptr+=(strides && strides[i]>0)? strides[i]:cw[i];
|
ptr+=(strides && strides[i]!=0)? strides[i]:pw[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for(row=0; row<ph; row+=cinfo->max_v_samp_factor)
|
for(row=0; row<ph0; row+=cinfo->max_v_samp_factor)
|
||||||
{
|
{
|
||||||
(*cinfo->cconvert->color_convert)(cinfo, &row_pointer[row], tmpbuf, 0,
|
(*cinfo->cconvert->color_convert)(cinfo, &row_pointer[row], tmpbuf, 0,
|
||||||
cinfo->max_v_samp_factor);
|
cinfo->max_v_samp_factor);
|
||||||
@@ -842,7 +910,7 @@ DLLEXPORT int DLLCALL tjEncodeYUVPlanes(tjhandle handle, unsigned char *srcBuf,
|
|||||||
for(i=0, compptr=cinfo->comp_info; i<cinfo->num_components; i++, compptr++)
|
for(i=0, compptr=cinfo->comp_info; i<cinfo->num_components; i++, compptr++)
|
||||||
jcopy_sample_rows(tmpbuf2[i], 0, outbuf[i],
|
jcopy_sample_rows(tmpbuf2[i], 0, outbuf[i],
|
||||||
row*compptr->v_samp_factor/cinfo->max_v_samp_factor,
|
row*compptr->v_samp_factor/cinfo->max_v_samp_factor,
|
||||||
compptr->v_samp_factor, cw[i]);
|
compptr->v_samp_factor, pw[i]);
|
||||||
}
|
}
|
||||||
cinfo->next_scanline+=height;
|
cinfo->next_scanline+=height;
|
||||||
jpeg_abort_compress(cinfo);
|
jpeg_abort_compress(cinfo);
|
||||||
@@ -869,21 +937,29 @@ DLLEXPORT int DLLCALL tjEncodeYUV3(tjhandle handle, unsigned char *srcBuf,
|
|||||||
int pad, int subsamp, int flags)
|
int pad, int subsamp, int flags)
|
||||||
{
|
{
|
||||||
unsigned char *dstPlanes[3];
|
unsigned char *dstPlanes[3];
|
||||||
int pw, ph, cw, ch, strides[3], retval=-1;
|
int pw0, ph0, strides[3], retval=-1;
|
||||||
|
|
||||||
if(width<=0 || height<=0 || dstBuf==NULL || pad<0 || !isPow2(pad)
|
if(width<=0 || height<=0 || dstBuf==NULL || pad<0 || !isPow2(pad)
|
||||||
|| subsamp<0 || subsamp>=NUMSUBOPT)
|
|| subsamp<0 || subsamp>=NUMSUBOPT)
|
||||||
_throw("tjEncodeYUV3(): Invalid argument");
|
_throw("tjEncodeYUV3(): Invalid argument");
|
||||||
|
|
||||||
pw=PAD(width, tjMCUWidth[subsamp]/8);
|
pw0=tjPlaneWidth(0, width, subsamp);
|
||||||
ph=PAD(height, tjMCUHeight[subsamp]/8);
|
ph0=tjPlaneHeight(0, height, subsamp);
|
||||||
cw=pw*8/tjMCUWidth[subsamp]; ch=ph*8/tjMCUHeight[subsamp];
|
|
||||||
|
|
||||||
strides[0]=PAD(pw, pad);
|
|
||||||
strides[1]=strides[2]=(subsamp==TJSAMP_GRAY? 0:PAD(cw, pad));
|
|
||||||
dstPlanes[0]=dstBuf;
|
dstPlanes[0]=dstBuf;
|
||||||
dstPlanes[1]=(subsamp==TJSAMP_GRAY? NULL:dstPlanes[0]+strides[0]*ph);
|
strides[0]=PAD(pw0, pad);
|
||||||
dstPlanes[2]=(subsamp==TJSAMP_GRAY? NULL:dstPlanes[1]+strides[1]*ch);
|
if(subsamp==TJSAMP_GRAY)
|
||||||
|
{
|
||||||
|
strides[1]=strides[2]=0;
|
||||||
|
dstPlanes[1]=dstPlanes[2]=NULL;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
int pw1=tjPlaneWidth(1, width, subsamp);
|
||||||
|
int ph1=tjPlaneHeight(1, height, subsamp);
|
||||||
|
strides[1]=strides[2]=PAD(pw1, pad);
|
||||||
|
dstPlanes[1]=dstPlanes[0]+strides[0]*ph0;
|
||||||
|
dstPlanes[2]=dstPlanes[1]+strides[1]*ph1;
|
||||||
|
}
|
||||||
|
|
||||||
return tjEncodeYUVPlanes(handle, srcBuf, width, pitch, height, pixelFormat,
|
return tjEncodeYUVPlanes(handle, srcBuf, width, pitch, height, pixelFormat,
|
||||||
dstPlanes, strides, subsamp, flags);
|
dstPlanes, strides, subsamp, flags);
|
||||||
@@ -914,7 +990,7 @@ DLLEXPORT int DLLCALL tjCompressFromYUVPlanes(tjhandle handle,
|
|||||||
unsigned char **jpegBuf, unsigned long *jpegSize, int jpegQual, int flags)
|
unsigned char **jpegBuf, unsigned long *jpegSize, int jpegQual, int flags)
|
||||||
{
|
{
|
||||||
int i, row, retval=0, alloc=1; JSAMPROW *inbuf[MAX_COMPONENTS];
|
int i, row, retval=0, alloc=1; JSAMPROW *inbuf[MAX_COMPONENTS];
|
||||||
int cw[MAX_COMPONENTS], ch[MAX_COMPONENTS], iw[MAX_COMPONENTS],
|
int pw[MAX_COMPONENTS], ph[MAX_COMPONENTS], iw[MAX_COMPONENTS],
|
||||||
tmpbufsize=0, usetmpbuf=0, th[MAX_COMPONENTS];
|
tmpbufsize=0, usetmpbuf=0, th[MAX_COMPONENTS];
|
||||||
JSAMPLE *_tmpbuf=NULL, *ptr; JSAMPROW *tmpbuf[MAX_COMPONENTS];
|
JSAMPLE *_tmpbuf=NULL, *ptr; JSAMPROW *tmpbuf[MAX_COMPONENTS];
|
||||||
|
|
||||||
@@ -965,20 +1041,20 @@ DLLEXPORT int DLLCALL tjCompressFromYUVPlanes(tjhandle handle,
|
|||||||
int ih;
|
int ih;
|
||||||
iw[i]=compptr->width_in_blocks*DCTSIZE;
|
iw[i]=compptr->width_in_blocks*DCTSIZE;
|
||||||
ih=compptr->height_in_blocks*DCTSIZE;
|
ih=compptr->height_in_blocks*DCTSIZE;
|
||||||
cw[i]=PAD(cinfo->image_width, cinfo->max_h_samp_factor)
|
pw[i]=PAD(cinfo->image_width, cinfo->max_h_samp_factor)
|
||||||
*compptr->h_samp_factor/cinfo->max_h_samp_factor;
|
*compptr->h_samp_factor/cinfo->max_h_samp_factor;
|
||||||
ch[i]=PAD(cinfo->image_height, cinfo->max_v_samp_factor)
|
ph[i]=PAD(cinfo->image_height, cinfo->max_v_samp_factor)
|
||||||
*compptr->v_samp_factor/cinfo->max_v_samp_factor;
|
*compptr->v_samp_factor/cinfo->max_v_samp_factor;
|
||||||
if(iw[i]!=cw[i] || ih!=ch[i]) usetmpbuf=1;
|
if(iw[i]!=pw[i] || ih!=ph[i]) usetmpbuf=1;
|
||||||
th[i]=compptr->v_samp_factor*DCTSIZE;
|
th[i]=compptr->v_samp_factor*DCTSIZE;
|
||||||
tmpbufsize+=iw[i]*th[i];
|
tmpbufsize+=iw[i]*th[i];
|
||||||
if((inbuf[i]=(JSAMPROW *)malloc(sizeof(JSAMPROW)*ch[i]))==NULL)
|
if((inbuf[i]=(JSAMPROW *)malloc(sizeof(JSAMPROW)*ph[i]))==NULL)
|
||||||
_throw("tjCompressFromYUVPlanes(): Memory allocation failure");
|
_throw("tjCompressFromYUVPlanes(): Memory allocation failure");
|
||||||
ptr=srcPlanes[i];
|
ptr=srcPlanes[i];
|
||||||
for(row=0; row<ch[i]; row++)
|
for(row=0; row<ph[i]; row++)
|
||||||
{
|
{
|
||||||
inbuf[i][row]=ptr;
|
inbuf[i][row]=ptr;
|
||||||
ptr+=(strides && strides[i]>0)? strides[i]:cw[i];
|
ptr+=(strides && strides[i]!=0)? strides[i]:pw[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(usetmpbuf)
|
if(usetmpbuf)
|
||||||
@@ -1010,15 +1086,15 @@ DLLEXPORT int DLLCALL tjCompressFromYUVPlanes(tjhandle handle,
|
|||||||
if(usetmpbuf)
|
if(usetmpbuf)
|
||||||
{
|
{
|
||||||
int j, k;
|
int j, k;
|
||||||
for(j=0; j<min(th[i], ch[i]-crow[i]); j++)
|
for(j=0; j<min(th[i], ph[i]-crow[i]); j++)
|
||||||
{
|
{
|
||||||
memcpy(tmpbuf[i][j], inbuf[i][crow[i]+j], cw[i]);
|
memcpy(tmpbuf[i][j], inbuf[i][crow[i]+j], pw[i]);
|
||||||
/* Duplicate last sample in row to fill out MCU */
|
/* Duplicate last sample in row to fill out MCU */
|
||||||
for(k=cw[i]; k<iw[i]; k++) tmpbuf[i][j][k]=tmpbuf[i][j][cw[i]-1];
|
for(k=pw[i]; k<iw[i]; k++) tmpbuf[i][j][k]=tmpbuf[i][j][pw[i]-1];
|
||||||
}
|
}
|
||||||
/* Duplicate last row to fill out MCU */
|
/* Duplicate last row to fill out MCU */
|
||||||
for(j=ch[i]-crow[i]; j<th[i]; j++)
|
for(j=ph[i]-crow[i]; j<th[i]; j++)
|
||||||
memcpy(tmpbuf[i][j], tmpbuf[i][ch[i]-crow[i]-1], iw[i]);
|
memcpy(tmpbuf[i][j], tmpbuf[i][ph[i]-crow[i]-1], iw[i]);
|
||||||
yuvptr[i]=tmpbuf[i];
|
yuvptr[i]=tmpbuf[i];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -1044,21 +1120,29 @@ DLLEXPORT int DLLCALL tjCompressFromYUV(tjhandle handle, unsigned char *srcBuf,
|
|||||||
unsigned long *jpegSize, int jpegQual, int flags)
|
unsigned long *jpegSize, int jpegQual, int flags)
|
||||||
{
|
{
|
||||||
unsigned char *srcPlanes[3];
|
unsigned char *srcPlanes[3];
|
||||||
int pw, ph, cw, ch, strides[3], retval=-1;
|
int pw0, ph0, strides[3], retval=-1;
|
||||||
|
|
||||||
if(srcBuf==NULL || width<=0 || pad<1 || height<=0 || subsamp<0
|
if(srcBuf==NULL || width<=0 || pad<1 || height<=0 || subsamp<0
|
||||||
|| subsamp>=NUMSUBOPT)
|
|| subsamp>=NUMSUBOPT)
|
||||||
_throw("tjCompressFromYUV(): Invalid argument");
|
_throw("tjCompressFromYUV(): Invalid argument");
|
||||||
|
|
||||||
pw=PAD(width, tjMCUWidth[subsamp]/8);
|
pw0=tjPlaneWidth(0, width, subsamp);
|
||||||
ph=PAD(height, tjMCUHeight[subsamp]/8);
|
ph0=tjPlaneHeight(0, height, subsamp);
|
||||||
cw=pw*8/tjMCUWidth[subsamp]; ch=ph*8/tjMCUHeight[subsamp];
|
|
||||||
|
|
||||||
strides[0]=PAD(pw, pad);
|
|
||||||
strides[1]=strides[2]=(subsamp==TJSAMP_GRAY? 0:PAD(cw, pad));
|
|
||||||
srcPlanes[0]=srcBuf;
|
srcPlanes[0]=srcBuf;
|
||||||
srcPlanes[1]=(subsamp==TJSAMP_GRAY? NULL:srcPlanes[0]+strides[0]*ph);
|
strides[0]=PAD(pw0, pad);
|
||||||
srcPlanes[2]=(subsamp==TJSAMP_GRAY? NULL:srcPlanes[1]+strides[1]*ch);
|
if(subsamp==TJSAMP_GRAY)
|
||||||
|
{
|
||||||
|
strides[1]=strides[2]=0;
|
||||||
|
srcPlanes[1]=srcPlanes[2]=NULL;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
int pw1=tjPlaneWidth(1, width, subsamp);
|
||||||
|
int ph1=tjPlaneHeight(1, height, subsamp);
|
||||||
|
strides[1]=strides[2]=PAD(pw1, pad);
|
||||||
|
srcPlanes[1]=srcPlanes[0]+strides[0]*ph0;
|
||||||
|
srcPlanes[2]=srcPlanes[1]+strides[1]*ph1;
|
||||||
|
}
|
||||||
|
|
||||||
return tjCompressFromYUVPlanes(handle, srcPlanes, width, strides, height,
|
return tjCompressFromYUVPlanes(handle, srcPlanes, width, strides, height,
|
||||||
subsamp, jpegBuf, jpegSize, jpegQual, flags);
|
subsamp, jpegBuf, jpegSize, jpegQual, flags);
|
||||||
@@ -1361,7 +1445,7 @@ DLLEXPORT int DLLCALL tjDecodeYUVPlanes(tjhandle handle,
|
|||||||
int i, retval=0; JSAMPROW *row_pointer=NULL;
|
int i, retval=0; JSAMPROW *row_pointer=NULL;
|
||||||
JSAMPLE *_tmpbuf[MAX_COMPONENTS];
|
JSAMPLE *_tmpbuf[MAX_COMPONENTS];
|
||||||
JSAMPROW *tmpbuf[MAX_COMPONENTS], *inbuf[MAX_COMPONENTS];
|
JSAMPROW *tmpbuf[MAX_COMPONENTS], *inbuf[MAX_COMPONENTS];
|
||||||
int row, pw, ph, cw[MAX_COMPONENTS], ch[MAX_COMPONENTS];
|
int row, pw0, ph0, pw[MAX_COMPONENTS], ph[MAX_COMPONENTS];
|
||||||
JSAMPLE *ptr;
|
JSAMPLE *ptr;
|
||||||
jpeg_component_info *compptr;
|
jpeg_component_info *compptr;
|
||||||
#ifndef JCS_EXTENSIONS
|
#ifndef JCS_EXTENSIONS
|
||||||
@@ -1426,8 +1510,8 @@ DLLEXPORT int DLLCALL tjDecodeYUVPlanes(tjhandle handle,
|
|||||||
jinit_master_decompress(dinfo);
|
jinit_master_decompress(dinfo);
|
||||||
(*dinfo->upsample->start_pass)(dinfo);
|
(*dinfo->upsample->start_pass)(dinfo);
|
||||||
|
|
||||||
pw=PAD(width, dinfo->max_h_samp_factor);
|
pw0=PAD(width, dinfo->max_h_samp_factor);
|
||||||
ph=PAD(height, dinfo->max_v_samp_factor);
|
ph0=PAD(height, dinfo->max_v_samp_factor);
|
||||||
|
|
||||||
if(pitch==0) pitch=dinfo->output_width*tjPixelSize[pixelFormat];
|
if(pitch==0) pitch=dinfo->output_width*tjPixelSize[pixelFormat];
|
||||||
|
|
||||||
@@ -1445,15 +1529,15 @@ DLLEXPORT int DLLCALL tjDecodeYUVPlanes(tjhandle handle,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if((row_pointer=(JSAMPROW *)malloc(sizeof(JSAMPROW)*ph))==NULL)
|
if((row_pointer=(JSAMPROW *)malloc(sizeof(JSAMPROW)*ph0))==NULL)
|
||||||
_throw("tjDecodeYUVPlanes(): Memory allocation failure");
|
_throw("tjDecodeYUVPlanes(): Memory allocation failure");
|
||||||
for(i=0; i<height; i++)
|
for(i=0; i<height; i++)
|
||||||
{
|
{
|
||||||
if(flags&TJFLAG_BOTTOMUP) row_pointer[i]=&dstBuf[(height-i-1)*pitch];
|
if(flags&TJFLAG_BOTTOMUP) row_pointer[i]=&dstBuf[(height-i-1)*pitch];
|
||||||
else row_pointer[i]=&dstBuf[i*pitch];
|
else row_pointer[i]=&dstBuf[i*pitch];
|
||||||
}
|
}
|
||||||
if(height<ph)
|
if(height<ph0)
|
||||||
for(i=height; i<ph; i++) row_pointer[i]=row_pointer[height-1];
|
for(i=height; i<ph0; i++) row_pointer[i]=row_pointer[height-1];
|
||||||
|
|
||||||
for(i=0; i<dinfo->num_components; i++)
|
for(i=0; i<dinfo->num_components; i++)
|
||||||
{
|
{
|
||||||
@@ -1470,25 +1554,25 @@ DLLEXPORT int DLLCALL tjDecodeYUVPlanes(tjhandle handle,
|
|||||||
tmpbuf[i][row]=&_tmpbuf_aligned[
|
tmpbuf[i][row]=&_tmpbuf_aligned[
|
||||||
PAD(compptr->width_in_blocks*DCTSIZE, 16) * row];
|
PAD(compptr->width_in_blocks*DCTSIZE, 16) * row];
|
||||||
}
|
}
|
||||||
cw[i]=pw*compptr->h_samp_factor/dinfo->max_h_samp_factor;
|
pw[i]=pw0*compptr->h_samp_factor/dinfo->max_h_samp_factor;
|
||||||
ch[i]=ph*compptr->v_samp_factor/dinfo->max_v_samp_factor;
|
ph[i]=ph0*compptr->v_samp_factor/dinfo->max_v_samp_factor;
|
||||||
inbuf[i]=(JSAMPROW *)malloc(sizeof(JSAMPROW)*ch[i]);
|
inbuf[i]=(JSAMPROW *)malloc(sizeof(JSAMPROW)*ph[i]);
|
||||||
if(!inbuf[i]) _throw("tjDecodeYUVPlanes(): Memory allocation failure");
|
if(!inbuf[i]) _throw("tjDecodeYUVPlanes(): Memory allocation failure");
|
||||||
ptr=srcPlanes[i];
|
ptr=srcPlanes[i];
|
||||||
for(row=0; row<ch[i]; row++)
|
for(row=0; row<ph[i]; row++)
|
||||||
{
|
{
|
||||||
inbuf[i][row]=ptr;
|
inbuf[i][row]=ptr;
|
||||||
ptr+=(strides && strides[i]>0)? strides[i]:cw[i];
|
ptr+=(strides && strides[i]!=0)? strides[i]:pw[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for(row=0; row<ph; row+=dinfo->max_v_samp_factor)
|
for(row=0; row<ph0; row+=dinfo->max_v_samp_factor)
|
||||||
{
|
{
|
||||||
JDIMENSION inrow=0, outrow=0;
|
JDIMENSION inrow=0, outrow=0;
|
||||||
for(i=0, compptr=dinfo->comp_info; i<dinfo->num_components; i++, compptr++)
|
for(i=0, compptr=dinfo->comp_info; i<dinfo->num_components; i++, compptr++)
|
||||||
jcopy_sample_rows(inbuf[i],
|
jcopy_sample_rows(inbuf[i],
|
||||||
row*compptr->v_samp_factor/dinfo->max_v_samp_factor, tmpbuf[i], 0,
|
row*compptr->v_samp_factor/dinfo->max_v_samp_factor, tmpbuf[i], 0,
|
||||||
compptr->v_samp_factor, cw[i]);
|
compptr->v_samp_factor, pw[i]);
|
||||||
(dinfo->upsample->upsample)(dinfo, tmpbuf, &inrow,
|
(dinfo->upsample->upsample)(dinfo, tmpbuf, &inrow,
|
||||||
dinfo->max_v_samp_factor, &row_pointer[row], &outrow,
|
dinfo->max_v_samp_factor, &row_pointer[row], &outrow,
|
||||||
dinfo->max_v_samp_factor);
|
dinfo->max_v_samp_factor);
|
||||||
@@ -1519,21 +1603,29 @@ DLLEXPORT int DLLCALL tjDecodeYUV(tjhandle handle, unsigned char *srcBuf,
|
|||||||
int height, int pixelFormat, int flags)
|
int height, int pixelFormat, int flags)
|
||||||
{
|
{
|
||||||
unsigned char *srcPlanes[3];
|
unsigned char *srcPlanes[3];
|
||||||
int pw, ph, cw, ch, strides[3], retval=-1;
|
int pw0, ph0, strides[3], retval=-1;
|
||||||
|
|
||||||
if(srcBuf==NULL || pad<0 || !isPow2(pad) || subsamp<0 || subsamp>=NUMSUBOPT
|
if(srcBuf==NULL || pad<0 || !isPow2(pad) || subsamp<0 || subsamp>=NUMSUBOPT
|
||||||
|| width<=0 || height<=0)
|
|| width<=0 || height<=0)
|
||||||
_throw("tjDecodeYUV(): Invalid argument");
|
_throw("tjDecodeYUV(): Invalid argument");
|
||||||
|
|
||||||
pw=PAD(width, tjMCUWidth[subsamp]/8);
|
pw0=tjPlaneWidth(0, width, subsamp);
|
||||||
ph=PAD(height, tjMCUHeight[subsamp]/8);
|
ph0=tjPlaneHeight(0, height, subsamp);
|
||||||
cw=pw*8/tjMCUWidth[subsamp]; ch=ph*8/tjMCUHeight[subsamp];
|
|
||||||
|
|
||||||
strides[0]=PAD(pw, pad);
|
|
||||||
strides[1]=strides[2]=(subsamp==TJSAMP_GRAY? 0:PAD(cw, pad));
|
|
||||||
srcPlanes[0]=srcBuf;
|
srcPlanes[0]=srcBuf;
|
||||||
srcPlanes[1]=(subsamp==TJSAMP_GRAY? NULL:srcPlanes[0]+strides[0]*ph);
|
strides[0]=PAD(pw0, pad);
|
||||||
srcPlanes[2]=(subsamp==TJSAMP_GRAY? NULL:srcPlanes[1]+strides[1]*ch);
|
if(subsamp==TJSAMP_GRAY)
|
||||||
|
{
|
||||||
|
strides[1]=strides[2]=0;
|
||||||
|
srcPlanes[1]=srcPlanes[2]=NULL;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
int pw1=tjPlaneWidth(1, width, subsamp);
|
||||||
|
int ph1=tjPlaneHeight(1, height, subsamp);
|
||||||
|
strides[1]=strides[2]=PAD(pw1, pad);
|
||||||
|
srcPlanes[1]=srcPlanes[0]+strides[0]*ph0;
|
||||||
|
srcPlanes[2]=srcPlanes[1]+strides[1]*ph1;
|
||||||
|
}
|
||||||
|
|
||||||
return tjDecodeYUVPlanes(handle, srcPlanes, strides, subsamp, dstBuf, width,
|
return tjDecodeYUVPlanes(handle, srcPlanes, strides, subsamp, dstBuf, width,
|
||||||
pitch, height, pixelFormat, flags);
|
pitch, height, pixelFormat, flags);
|
||||||
@@ -1548,7 +1640,7 @@ DLLEXPORT int DLLCALL tjDecompressToYUVPlanes(tjhandle handle,
|
|||||||
{
|
{
|
||||||
int i, sfi, row, retval=0; JSAMPROW *outbuf[MAX_COMPONENTS];
|
int i, sfi, row, retval=0; JSAMPROW *outbuf[MAX_COMPONENTS];
|
||||||
int jpegwidth, jpegheight, jpegSubsamp, scaledw, scaledh;
|
int jpegwidth, jpegheight, jpegSubsamp, scaledw, scaledh;
|
||||||
int cw[MAX_COMPONENTS], ch[MAX_COMPONENTS], iw[MAX_COMPONENTS],
|
int pw[MAX_COMPONENTS], ph[MAX_COMPONENTS], iw[MAX_COMPONENTS],
|
||||||
tmpbufsize=0, usetmpbuf=0, th[MAX_COMPONENTS];
|
tmpbufsize=0, usetmpbuf=0, th[MAX_COMPONENTS];
|
||||||
JSAMPLE *_tmpbuf=NULL, *ptr; JSAMPROW *tmpbuf[MAX_COMPONENTS];
|
JSAMPLE *_tmpbuf=NULL, *ptr; JSAMPROW *tmpbuf[MAX_COMPONENTS];
|
||||||
int dctsize;
|
int dctsize;
|
||||||
@@ -1620,20 +1712,20 @@ DLLEXPORT int DLLCALL tjDecompressToYUVPlanes(tjhandle handle,
|
|||||||
int ih;
|
int ih;
|
||||||
iw[i]=compptr->width_in_blocks*dctsize;
|
iw[i]=compptr->width_in_blocks*dctsize;
|
||||||
ih=compptr->height_in_blocks*dctsize;
|
ih=compptr->height_in_blocks*dctsize;
|
||||||
cw[i]=PAD(dinfo->output_width, dinfo->max_h_samp_factor)
|
pw[i]=PAD(dinfo->output_width, dinfo->max_h_samp_factor)
|
||||||
*compptr->h_samp_factor/dinfo->max_h_samp_factor;
|
*compptr->h_samp_factor/dinfo->max_h_samp_factor;
|
||||||
ch[i]=PAD(dinfo->output_height, dinfo->max_v_samp_factor)
|
ph[i]=PAD(dinfo->output_height, dinfo->max_v_samp_factor)
|
||||||
*compptr->v_samp_factor/dinfo->max_v_samp_factor;
|
*compptr->v_samp_factor/dinfo->max_v_samp_factor;
|
||||||
if(iw[i]!=cw[i] || ih!=ch[i]) usetmpbuf=1;
|
if(iw[i]!=pw[i] || ih!=ph[i]) usetmpbuf=1;
|
||||||
th[i]=compptr->v_samp_factor*dctsize;
|
th[i]=compptr->v_samp_factor*dctsize;
|
||||||
tmpbufsize+=iw[i]*th[i];
|
tmpbufsize+=iw[i]*th[i];
|
||||||
if((outbuf[i]=(JSAMPROW *)malloc(sizeof(JSAMPROW)*ch[i]))==NULL)
|
if((outbuf[i]=(JSAMPROW *)malloc(sizeof(JSAMPROW)*ph[i]))==NULL)
|
||||||
_throw("tjDecompressToYUVPlanes(): Memory allocation failure");
|
_throw("tjDecompressToYUVPlanes(): Memory allocation failure");
|
||||||
ptr=dstPlanes[i];
|
ptr=dstPlanes[i];
|
||||||
for(row=0; row<ch[i]; row++)
|
for(row=0; row<ph[i]; row++)
|
||||||
{
|
{
|
||||||
outbuf[i][row]=ptr;
|
outbuf[i][row]=ptr;
|
||||||
ptr+=(strides && strides[i]>0)? strides[i]:cw[i];
|
ptr+=(strides && strides[i]!=0)? strides[i]:pw[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(usetmpbuf)
|
if(usetmpbuf)
|
||||||
@@ -1695,9 +1787,9 @@ DLLEXPORT int DLLCALL tjDecompressToYUVPlanes(tjhandle handle,
|
|||||||
int j;
|
int j;
|
||||||
for(i=0; i<dinfo->num_components; i++)
|
for(i=0; i<dinfo->num_components; i++)
|
||||||
{
|
{
|
||||||
for(j=0; j<min(th[i], ch[i]-crow[i]); j++)
|
for(j=0; j<min(th[i], ph[i]-crow[i]); j++)
|
||||||
{
|
{
|
||||||
memcpy(outbuf[i][crow[i]+j], tmpbuf[i][j], cw[i]);
|
memcpy(outbuf[i][crow[i]+j], tmpbuf[i][j], pw[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1720,7 +1812,7 @@ DLLEXPORT int DLLCALL tjDecompressToYUV2(tjhandle handle,
|
|||||||
int width, int pad, int height, int flags)
|
int width, int pad, int height, int flags)
|
||||||
{
|
{
|
||||||
unsigned char *dstPlanes[3];
|
unsigned char *dstPlanes[3];
|
||||||
int pw, ph, cw, ch, strides[3], retval=-1, jpegSubsamp=-1;
|
int pw0, ph0, strides[3], retval=-1, jpegSubsamp=-1;
|
||||||
int i, jpegwidth, jpegheight, scaledw, scaledh;
|
int i, jpegwidth, jpegheight, scaledw, scaledh;
|
||||||
|
|
||||||
getdinstance(handle);
|
getdinstance(handle);
|
||||||
@@ -1749,15 +1841,23 @@ DLLEXPORT int DLLCALL tjDecompressToYUV2(tjhandle handle,
|
|||||||
if(scaledw>width || scaledh>height)
|
if(scaledw>width || scaledh>height)
|
||||||
_throw("tjDecompressToYUV2(): Could not scale down to desired image dimensions");
|
_throw("tjDecompressToYUV2(): Could not scale down to desired image dimensions");
|
||||||
|
|
||||||
pw=PAD(scaledw, tjMCUWidth[jpegSubsamp]/8);
|
pw0=tjPlaneWidth(0, width, jpegSubsamp);
|
||||||
ph=PAD(scaledh, tjMCUHeight[jpegSubsamp]/8);
|
ph0=tjPlaneHeight(0, height, jpegSubsamp);
|
||||||
cw=pw*8/tjMCUWidth[jpegSubsamp]; ch=ph*8/tjMCUHeight[jpegSubsamp];
|
|
||||||
|
|
||||||
strides[0]=PAD(pw, pad);
|
|
||||||
strides[1]=strides[2]=(jpegSubsamp==TJSAMP_GRAY? 0:PAD(cw, pad));
|
|
||||||
dstPlanes[0]=dstBuf;
|
dstPlanes[0]=dstBuf;
|
||||||
dstPlanes[1]=(jpegSubsamp==TJSAMP_GRAY? NULL:dstPlanes[0]+strides[0]*ph);
|
strides[0]=PAD(pw0, pad);
|
||||||
dstPlanes[2]=(jpegSubsamp==TJSAMP_GRAY? NULL:dstPlanes[1]+strides[1]*ch);
|
if(jpegSubsamp==TJSAMP_GRAY)
|
||||||
|
{
|
||||||
|
strides[1]=strides[2]=0;
|
||||||
|
dstPlanes[1]=dstPlanes[2]=NULL;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
int pw1=tjPlaneWidth(1, width, jpegSubsamp);
|
||||||
|
int ph1=tjPlaneHeight(1, height, jpegSubsamp);
|
||||||
|
strides[1]=strides[2]=PAD(pw1, pad);
|
||||||
|
dstPlanes[1]=dstPlanes[0]+strides[0]*ph0;
|
||||||
|
dstPlanes[2]=dstPlanes[1]+strides[1]*ph1;
|
||||||
|
}
|
||||||
|
|
||||||
this->headerRead=1;
|
this->headerRead=1;
|
||||||
return tjDecompressToYUVPlanes(handle, jpegBuf, jpegSize, dstPlanes, width,
|
return tjDecompressToYUVPlanes(handle, jpegBuf, jpegSize, dstPlanes, width,
|
||||||
|
|||||||
218
turbojpeg.h
218
turbojpeg.h
@@ -52,20 +52,18 @@
|
|||||||
*
|
*
|
||||||
* Each plane is simply a 2D array of bytes, each byte representing the value
|
* Each plane is simply a 2D array of bytes, each byte representing the value
|
||||||
* of one of the components (Y, Cb, or Cr) at a particular location in the
|
* of one of the components (Y, Cb, or Cr) at a particular location in the
|
||||||
* image. The "component width" and "component height" of each plane are
|
* image. The width and height of each plane are determined by the image
|
||||||
* determined by the image width, height, and level of chrominance subsampling.
|
* width, height, and level of chrominance subsampling. The luminance plane
|
||||||
* For the luminance plane, the component width is the image width padded to
|
* width is the image width padded to the nearest multiple of the horizontal
|
||||||
* the nearest multiple of the horizontal subsampling factor (2 in the case of
|
* subsampling factor (2 in the case of 4:2:0 and 4:2:2, 4 in the case of
|
||||||
* 4:2:0 and 4:2:2, 4 in the case of 4:1:1, 1 in the case of 4:4:4 or
|
* 4:1:1, 1 in the case of 4:4:4 or grayscale.) Similarly, the luminance plane
|
||||||
* grayscale.) Similarly, the component height of the luminance plane is the
|
* height is the image height padded to the nearest multiple of the vertical
|
||||||
* image height padded to the nearest multiple of the vertical subsampling
|
* subsampling factor (2 in the case of 4:2:0 or 4:4:0, 1 in the case of 4:4:4
|
||||||
* factor (2 in the case of 4:2:0 or 4:4:0, 1 in the case of 4:4:4 or
|
* or grayscale.) This is irrespective of any additional padding that may be
|
||||||
* grayscale.) This is irrespective of any additional padding that may be
|
* specified as an argument to the various YUV functions. The chrominance
|
||||||
* specified as an argument to the various YUV functions. The component width
|
* plane width is equal to the luminance plane width divided by the horizontal
|
||||||
* of the chrominance planes is equal to the component width of the luminance
|
* subsampling factor, and the chrominance plane height is equal to the
|
||||||
* plane divided by the horizontal subsampling factor, and the component height
|
* luminance plane height divided by the vertical subsampling factor.
|
||||||
* of the chrominance planes is equal to the component height of the luminance
|
|
||||||
* plane divided by the vertical subsampling factor.
|
|
||||||
*
|
*
|
||||||
* For example, if the source image is 35 x 35 pixels and 4:2:2 subsampling is
|
* For example, if the source image is 35 x 35 pixels and 4:2:2 subsampling is
|
||||||
* used, then the luminance plane would be 36 x 35 bytes, and each of the
|
* used, then the luminance plane would be 36 x 35 bytes, and each of the
|
||||||
@@ -625,7 +623,7 @@ DLLEXPORT tjhandle DLLCALL tjInitCompress(void);
|
|||||||
*
|
*
|
||||||
* @param width width (in pixels) of the source image
|
* @param width width (in pixels) of the source image
|
||||||
*
|
*
|
||||||
* @param pitch bytes per line of the source image. Normally, this should be
|
* @param pitch bytes per line in the source image. Normally, this should be
|
||||||
* <tt>width * #tjPixelSize[pixelFormat]</tt> if the image is unpadded, or
|
* <tt>width * #tjPixelSize[pixelFormat]</tt> if the image is unpadded, or
|
||||||
* <tt>#TJPAD(width * #tjPixelSize[pixelFormat])</tt> if each line of the image
|
* <tt>#TJPAD(width * #tjPixelSize[pixelFormat])</tt> if each line of the image
|
||||||
* is padded to the nearest 32-bit boundary, as is the case for Windows
|
* is padded to the nearest 32-bit boundary, as is the case for Windows
|
||||||
@@ -668,7 +666,7 @@ DLLEXPORT tjhandle DLLCALL tjInitCompress(void);
|
|||||||
* 100 = best)
|
* 100 = best)
|
||||||
*
|
*
|
||||||
* @param flags the bitwise OR of one or more of the @ref TJFLAG_BOTTOMUP
|
* @param flags the bitwise OR of one or more of the @ref TJFLAG_BOTTOMUP
|
||||||
* "flags".
|
* "flags"
|
||||||
*
|
*
|
||||||
* @return 0 if successful, or -1 if an error occurred (see #tjGetErrorStr().)
|
* @return 0 if successful, or -1 if an error occurred (see #tjGetErrorStr().)
|
||||||
*/
|
*/
|
||||||
@@ -730,7 +728,7 @@ DLLEXPORT int DLLCALL tjCompress2(tjhandle handle, unsigned char *srcBuf,
|
|||||||
* 100 = best)
|
* 100 = best)
|
||||||
*
|
*
|
||||||
* @param flags the bitwise OR of one or more of the @ref TJFLAG_BOTTOMUP
|
* @param flags the bitwise OR of one or more of the @ref TJFLAG_BOTTOMUP
|
||||||
* "flags".
|
* "flags"
|
||||||
*
|
*
|
||||||
* @return 0 if successful, or -1 if an error occurred (see #tjGetErrorStr().)
|
* @return 0 if successful, or -1 if an error occurred (see #tjGetErrorStr().)
|
||||||
*/
|
*/
|
||||||
@@ -747,10 +745,10 @@ DLLEXPORT int DLLCALL tjCompressFromYUV(tjhandle handle, unsigned char *srcBuf,
|
|||||||
* @param srcPlanes an array of pointers to Y, U (Cb), and V (Cr) image planes
|
* @param srcPlanes an array of pointers to Y, U (Cb), and V (Cr) image planes
|
||||||
* (or just a Y plane, if compressing a grayscale image) that contain a YUV
|
* (or just a Y plane, if compressing a grayscale image) that contain a YUV
|
||||||
* image to be compressed. These planes can be contiguous or non-contiguous in
|
* image to be compressed. These planes can be contiguous or non-contiguous in
|
||||||
* memory. Each plane should be at least
|
* memory. The size of each plane should match the value returned by
|
||||||
* <b><i>{component stride} * {component height}</i></b> bytes in size. (See
|
* #tjPlaneSizeYUV() for the given image width, height, strides, and level of
|
||||||
* below for a description of stride, and refer to @ref YUVnotes
|
* chrominance subsampling. Refer to @ref YUVnotes "YUV Image Format Notes"
|
||||||
* "YUV Image Format Notes" for a description of component height.)
|
* for more details.
|
||||||
*
|
*
|
||||||
* @param width width (in pixels) of the source image. If the width is not an
|
* @param width width (in pixels) of the source image. If the width is not an
|
||||||
* even multiple of the MCU block width (see #tjMCUWidth), then an intermediate
|
* even multiple of the MCU block width (see #tjMCUWidth), then an intermediate
|
||||||
@@ -758,11 +756,12 @@ DLLEXPORT int DLLCALL tjCompressFromYUV(tjhandle handle, unsigned char *srcBuf,
|
|||||||
*
|
*
|
||||||
* @param strides an array of integers, each specifying the number of bytes per
|
* @param strides an array of integers, each specifying the number of bytes per
|
||||||
* line in the corresponding plane of the YUV source image. Setting the stride
|
* line in the corresponding plane of the YUV source image. Setting the stride
|
||||||
* for any plane to 0 is the same as setting it to the component width for the
|
* for any plane to 0 is the same as setting it to the plane width (see
|
||||||
* plane. If <tt>strides</tt> is NULL, then the strides for all planes will be
|
* @ref YUVnotes "YUV Image Format Notes".) If <tt>strides</tt> is NULL, then
|
||||||
* set to their respective component widths. You can adjust the strides in
|
* the strides for all planes will be set to their respective plane widths.
|
||||||
* order to specify an arbitrary amount of line padding in each plane or to
|
* You can adjust the strides in order to specify an arbitrary amount of line
|
||||||
* create a JPEG image from a subregion of a larger YUV planar image.
|
* padding in each plane or to create a JPEG image from a subregion of a larger
|
||||||
|
* YUV planar image.
|
||||||
*
|
*
|
||||||
* @param height height (in pixels) of the source image. If the height is not
|
* @param height height (in pixels) of the source image. If the height is not
|
||||||
* an even multiple of the MCU block height (see #tjMCUHeight), then an
|
* an even multiple of the MCU block height (see #tjMCUHeight), then an
|
||||||
@@ -797,7 +796,7 @@ DLLEXPORT int DLLCALL tjCompressFromYUV(tjhandle handle, unsigned char *srcBuf,
|
|||||||
* 100 = best)
|
* 100 = best)
|
||||||
*
|
*
|
||||||
* @param flags the bitwise OR of one or more of the @ref TJFLAG_BOTTOMUP
|
* @param flags the bitwise OR of one or more of the @ref TJFLAG_BOTTOMUP
|
||||||
* "flags".
|
* "flags"
|
||||||
*
|
*
|
||||||
* @return 0 if successful, or -1 if an error occurred (see #tjGetErrorStr().)
|
* @return 0 if successful, or -1 if an error occurred (see #tjGetErrorStr().)
|
||||||
*/
|
*/
|
||||||
@@ -817,9 +816,9 @@ DLLEXPORT int DLLCALL tjCompressFromYUVPlanes(tjhandle handle,
|
|||||||
* size of a JPEG image prior to compression, the corner case has to be
|
* size of a JPEG image prior to compression, the corner case has to be
|
||||||
* handled.
|
* handled.
|
||||||
*
|
*
|
||||||
* @param width width of the image (in pixels)
|
* @param width width (in pixels) of the image
|
||||||
*
|
*
|
||||||
* @param height height of the image (in pixels)
|
* @param height height (in pixels) of the image
|
||||||
*
|
*
|
||||||
* @param jpegSubsamp the level of chrominance subsampling to be used when
|
* @param jpegSubsamp the level of chrominance subsampling to be used when
|
||||||
* generating the JPEG image (see @ref TJSAMP
|
* generating the JPEG image (see @ref TJSAMP
|
||||||
@@ -836,12 +835,12 @@ DLLEXPORT unsigned long DLLCALL tjBufSize(int width, int height,
|
|||||||
* The size of the buffer (in bytes) required to hold a YUV planar image with
|
* The size of the buffer (in bytes) required to hold a YUV planar image with
|
||||||
* the given parameters.
|
* the given parameters.
|
||||||
*
|
*
|
||||||
* @param width width of the image (in pixels)
|
* @param width width (in pixels) of the image
|
||||||
*
|
*
|
||||||
* @param pad the width of each line in each plane of the image is padded to
|
* @param pad the width of each line in each plane of the image is padded to
|
||||||
* the nearest multiple of this number of bytes (must be a power of 2.)
|
* the nearest multiple of this number of bytes (must be a power of 2.)
|
||||||
*
|
*
|
||||||
* @param height height of the image (in pixels)
|
* @param height height (in pixels) of the image
|
||||||
*
|
*
|
||||||
* @param subsamp level of chrominance subsampling in the image (see
|
* @param subsamp level of chrominance subsampling in the image (see
|
||||||
* @ref TJSAMP "Chrominance subsampling options".)
|
* @ref TJSAMP "Chrominance subsampling options".)
|
||||||
@@ -853,6 +852,65 @@ DLLEXPORT unsigned long DLLCALL tjBufSizeYUV2(int width, int pad, int height,
|
|||||||
int subsamp);
|
int subsamp);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The size of the buffer (in bytes) required to hold a YUV image plane with
|
||||||
|
* the given parameters.
|
||||||
|
*
|
||||||
|
* @param componentID ID number of the image plane (0 = Y, 1 = U/Cb, 2 = V/Cr)
|
||||||
|
*
|
||||||
|
* @param width width (in pixels) of the YUV image. NOTE: this is the width of
|
||||||
|
* the whole image, not the plane width.
|
||||||
|
*
|
||||||
|
* @param stride bytes per line in the image plane. Setting this to 0 is the
|
||||||
|
* equivalent of setting it to the plane width.
|
||||||
|
*
|
||||||
|
* @param height height (in pixels) of the YUV image. NOTE: this is the height
|
||||||
|
* of the whole image, not the plane height.
|
||||||
|
*
|
||||||
|
* @param subsamp level of chrominance subsampling in the image (see
|
||||||
|
* @ref TJSAMP "Chrominance subsampling options".)
|
||||||
|
*
|
||||||
|
* @return the size of the buffer (in bytes) required to hold the YUV image
|
||||||
|
* plane, or -1 if the arguments are out of bounds.
|
||||||
|
*/
|
||||||
|
DLLEXPORT unsigned long DLLCALL tjPlaneSizeYUV(int componentID, int width,
|
||||||
|
int stride, int height, int subsamp);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The plane width of a YUV image plane with the given parameters. Refer to
|
||||||
|
* @ref YUVnotes "YUV Image Format Notes" for a description of plane width.
|
||||||
|
*
|
||||||
|
* @param componentID ID number of the image plane (0 = Y, 1 = U/Cb, 2 = V/Cr)
|
||||||
|
*
|
||||||
|
* @param width width (in pixels) of the YUV image
|
||||||
|
*
|
||||||
|
* @param subsamp level of chrominance subsampling in the image (see
|
||||||
|
* @ref TJSAMP "Chrominance subsampling options".)
|
||||||
|
*
|
||||||
|
* @return the plane width of a YUV image plane with the given parameters, or
|
||||||
|
* -1 if the arguments are out of bounds.
|
||||||
|
*/
|
||||||
|
DLLEXPORT int tjPlaneWidth(int componentID, int width, int subsamp);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The plane height of a YUV image plane with the given parameters. Refer to
|
||||||
|
* @ref YUVnotes "YUV Image Format Notes" for a description of plane height.
|
||||||
|
*
|
||||||
|
* @param componentID ID number of the image plane (0 = Y, 1 = U/Cb, 2 = V/Cr)
|
||||||
|
*
|
||||||
|
* @param height height (in pixels) of the YUV image
|
||||||
|
*
|
||||||
|
* @param subsamp level of chrominance subsampling in the image (see
|
||||||
|
* @ref TJSAMP "Chrominance subsampling options".)
|
||||||
|
*
|
||||||
|
* @return the plane height of a YUV image plane with the given parameters, or
|
||||||
|
* -1 if the arguments are out of bounds.
|
||||||
|
*/
|
||||||
|
DLLEXPORT int tjPlaneHeight(int componentID, int height, int subsamp);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Encode an RGB or grayscale image into a YUV planar image. This function
|
* Encode an RGB or grayscale image into a YUV planar image. This function
|
||||||
* uses the accelerated color conversion routines in the underlying
|
* uses the accelerated color conversion routines in the underlying
|
||||||
@@ -866,7 +924,7 @@ DLLEXPORT unsigned long DLLCALL tjBufSizeYUV2(int width, int pad, int height,
|
|||||||
*
|
*
|
||||||
* @param width width (in pixels) of the source image
|
* @param width width (in pixels) of the source image
|
||||||
*
|
*
|
||||||
* @param pitch bytes per line of the source image. Normally, this should be
|
* @param pitch bytes per line in the source image. Normally, this should be
|
||||||
* <tt>width * #tjPixelSize[pixelFormat]</tt> if the image is unpadded, or
|
* <tt>width * #tjPixelSize[pixelFormat]</tt> if the image is unpadded, or
|
||||||
* <tt>#TJPAD(width * #tjPixelSize[pixelFormat])</tt> if each line of the image
|
* <tt>#TJPAD(width * #tjPixelSize[pixelFormat])</tt> if each line of the image
|
||||||
* is padded to the nearest 32-bit boundary, as is the case for Windows
|
* is padded to the nearest 32-bit boundary, as is the case for Windows
|
||||||
@@ -897,7 +955,7 @@ DLLEXPORT unsigned long DLLCALL tjBufSizeYUV2(int width, int pad, int height,
|
|||||||
* image compatible with the I420 (AKA "YUV420P") format.
|
* image compatible with the I420 (AKA "YUV420P") format.
|
||||||
*
|
*
|
||||||
* @param flags the bitwise OR of one or more of the @ref TJFLAG_BOTTOMUP
|
* @param flags the bitwise OR of one or more of the @ref TJFLAG_BOTTOMUP
|
||||||
* "flags".
|
* "flags"
|
||||||
*
|
*
|
||||||
* @return 0 if successful, or -1 if an error occurred (see #tjGetErrorStr().)
|
* @return 0 if successful, or -1 if an error occurred (see #tjGetErrorStr().)
|
||||||
*/
|
*/
|
||||||
@@ -919,7 +977,7 @@ DLLEXPORT int DLLCALL tjEncodeYUV3(tjhandle handle,
|
|||||||
*
|
*
|
||||||
* @param width width (in pixels) of the source image
|
* @param width width (in pixels) of the source image
|
||||||
*
|
*
|
||||||
* @param pitch bytes per line of the source image. Normally, this should be
|
* @param pitch bytes per line in the source image. Normally, this should be
|
||||||
* <tt>width * #tjPixelSize[pixelFormat]</tt> if the image is unpadded, or
|
* <tt>width * #tjPixelSize[pixelFormat]</tt> if the image is unpadded, or
|
||||||
* <tt>#TJPAD(width * #tjPixelSize[pixelFormat])</tt> if each line of the image
|
* <tt>#TJPAD(width * #tjPixelSize[pixelFormat])</tt> if each line of the image
|
||||||
* is padded to the nearest 32-bit boundary, as is the case for Windows
|
* is padded to the nearest 32-bit boundary, as is the case for Windows
|
||||||
@@ -935,18 +993,18 @@ DLLEXPORT int DLLCALL tjEncodeYUV3(tjhandle handle,
|
|||||||
* @param dstPlanes an array of pointers to Y, U (Cb), and V (Cr) image planes
|
* @param dstPlanes an array of pointers to Y, U (Cb), and V (Cr) image planes
|
||||||
* (or just a Y plane, if generating a grayscale image) that will receive the
|
* (or just a Y plane, if generating a grayscale image) that will receive the
|
||||||
* encoded image. These planes can be contiguous or non-contiguous in memory.
|
* encoded image. These planes can be contiguous or non-contiguous in memory.
|
||||||
* Each plane should be at least
|
* Use #tjPlaneSizeYUV() to determine the appropriate size for each plane based
|
||||||
* <b><i>{component stride} * {component height}</i></b> bytes in size.
|
* on the image width, height, strides, and level of chrominance subsampling.
|
||||||
* (See below for a description of stride, and refer to @ref YUVnotes
|
* Refer to @ref YUVnotes "YUV Image Format Notes" for more details.
|
||||||
* "YUV Image Format Notes" for a description of component height.)
|
|
||||||
*
|
*
|
||||||
* @param strides an array of integers, each specifying the number of bytes per
|
* @param strides an array of integers, each specifying the number of bytes per
|
||||||
* line in the corresponding plane of the output image. Setting the stride for
|
* line in the corresponding plane of the output image. Setting the stride for
|
||||||
* any plane to 0 is the same as setting it to the component width for the
|
* any plane to 0 is the same as setting it to the plane width (see
|
||||||
* plane. If <tt>strides</tt> is NULL, then the strides for all planes will be
|
* @ref YUVnotes "YUV Image Format Notes".) If <tt>strides</tt> is NULL, then
|
||||||
* set to their respective component widths. You can adjust the strides in
|
* the strides for all planes will be set to their respective plane widths.
|
||||||
* order to add an arbitrary amount of line padding to each plane or to encode
|
* You can adjust the strides in order to add an arbitrary amount of line
|
||||||
* an RGB or grayscale image into a subregion of a larger YUV planar image.
|
* padding to each plane or to encode an RGB or grayscale image into a
|
||||||
|
* subregion of a larger YUV planar image.
|
||||||
*
|
*
|
||||||
* @param subsamp the level of chrominance subsampling to be used when
|
* @param subsamp the level of chrominance subsampling to be used when
|
||||||
* generating the YUV image (see @ref TJSAMP
|
* generating the YUV image (see @ref TJSAMP
|
||||||
@@ -955,7 +1013,7 @@ DLLEXPORT int DLLCALL tjEncodeYUV3(tjhandle handle,
|
|||||||
* image compatible with the I420 (AKA "YUV420P") format.
|
* image compatible with the I420 (AKA "YUV420P") format.
|
||||||
*
|
*
|
||||||
* @param flags the bitwise OR of one or more of the @ref TJFLAG_BOTTOMUP
|
* @param flags the bitwise OR of one or more of the @ref TJFLAG_BOTTOMUP
|
||||||
* "flags".
|
* "flags"
|
||||||
*
|
*
|
||||||
* @return 0 if successful, or -1 if an error occurred (see #tjGetErrorStr().)
|
* @return 0 if successful, or -1 if an error occurred (see #tjGetErrorStr().)
|
||||||
*/
|
*/
|
||||||
@@ -989,8 +1047,8 @@ DLLEXPORT tjhandle DLLCALL tjInitDecompress(void);
|
|||||||
* (in pixels) of the JPEG image
|
* (in pixels) of the JPEG image
|
||||||
*
|
*
|
||||||
* @param jpegSubsamp pointer to an integer variable that will receive the
|
* @param jpegSubsamp pointer to an integer variable that will receive the
|
||||||
* level of chrominance subsampling used when compressing the JPEG image (see
|
* level of chrominance subsampling used when the JPEG image was compressed
|
||||||
* @ref TJSAMP "Chrominance subsampling options".)
|
* (see @ref TJSAMP "Chrominance subsampling options".)
|
||||||
*
|
*
|
||||||
* @param jpegColorspace pointer to an integer variable that will receive one
|
* @param jpegColorspace pointer to an integer variable that will receive one
|
||||||
* of the JPEG colorspace constants, indicating the colorspace of the JPEG
|
* of the JPEG colorspace constants, indicating the colorspace of the JPEG
|
||||||
@@ -1039,7 +1097,7 @@ DLLEXPORT tjscalingfactor* DLLCALL tjGetScalingFactors(int *numscalingfactors);
|
|||||||
* set to 0, then only the height will be considered when determining the
|
* set to 0, then only the height will be considered when determining the
|
||||||
* scaled image size.
|
* scaled image size.
|
||||||
*
|
*
|
||||||
* @param pitch bytes per line of the destination image. Normally, this is
|
* @param pitch bytes per line in the destination image. Normally, this is
|
||||||
* <tt>scaledWidth * #tjPixelSize[pixelFormat]</tt> if the decompressed image
|
* <tt>scaledWidth * #tjPixelSize[pixelFormat]</tt> if the decompressed image
|
||||||
* is unpadded, else <tt>#TJPAD(scaledWidth * #tjPixelSize[pixelFormat])</tt>
|
* is unpadded, else <tt>#TJPAD(scaledWidth * #tjPixelSize[pixelFormat])</tt>
|
||||||
* if each line of the decompressed image is padded to the nearest 32-bit
|
* if each line of the decompressed image is padded to the nearest 32-bit
|
||||||
@@ -1061,7 +1119,7 @@ DLLEXPORT tjscalingfactor* DLLCALL tjGetScalingFactors(int *numscalingfactors);
|
|||||||
* TJPF "Pixel formats".)
|
* TJPF "Pixel formats".)
|
||||||
*
|
*
|
||||||
* @param flags the bitwise OR of one or more of the @ref TJFLAG_BOTTOMUP
|
* @param flags the bitwise OR of one or more of the @ref TJFLAG_BOTTOMUP
|
||||||
* "flags".
|
* "flags"
|
||||||
*
|
*
|
||||||
* @return 0 if successful, or -1 if an error occurred (see #tjGetErrorStr().)
|
* @return 0 if successful, or -1 if an error occurred (see #tjGetErrorStr().)
|
||||||
*/
|
*/
|
||||||
@@ -1111,7 +1169,7 @@ DLLEXPORT int DLLCALL tjDecompress2(tjhandle handle,
|
|||||||
* performed within TurboJPEG.
|
* performed within TurboJPEG.
|
||||||
*
|
*
|
||||||
* @param flags the bitwise OR of one or more of the @ref TJFLAG_BOTTOMUP
|
* @param flags the bitwise OR of one or more of the @ref TJFLAG_BOTTOMUP
|
||||||
* "flags".
|
* "flags"
|
||||||
*
|
*
|
||||||
* @return 0 if successful, or -1 if an error occurred (see #tjGetErrorStr().)
|
* @return 0 if successful, or -1 if an error occurred (see #tjGetErrorStr().)
|
||||||
*/
|
*/
|
||||||
@@ -1134,10 +1192,10 @@ DLLEXPORT int DLLCALL tjDecompressToYUV2(tjhandle handle,
|
|||||||
* @param dstPlanes an array of pointers to Y, U (Cb), and V (Cr) image planes
|
* @param dstPlanes an array of pointers to Y, U (Cb), and V (Cr) image planes
|
||||||
* (or just a Y plane, if decompressing a grayscale image) that will receive
|
* (or just a Y plane, if decompressing a grayscale image) that will receive
|
||||||
* the YUV image. These planes can be contiguous or non-contiguous in memory.
|
* the YUV image. These planes can be contiguous or non-contiguous in memory.
|
||||||
* Each plane should be at least
|
* Use #tjPlaneSizeYUV() to determine the appropriate size for each plane based
|
||||||
* <b><i>{component stride} * {scaled component height}</i></b> bytes in size.
|
* on the scaled image width, scaled image height, strides, and level of
|
||||||
* (See below for a description of stride, and refer to @ref YUVnotes
|
* chrominance subsampling. Refer to @ref YUVnotes "YUV Image Format Notes"
|
||||||
* "YUV Image Format Notes" for a description of component height.)
|
* for more details.
|
||||||
*
|
*
|
||||||
* @param width desired width (in pixels) of the YUV image. If this is
|
* @param width desired width (in pixels) of the YUV image. If this is
|
||||||
* different than the width of the JPEG image being decompressed, then
|
* different than the width of the JPEG image being decompressed, then
|
||||||
@@ -1150,11 +1208,12 @@ DLLEXPORT int DLLCALL tjDecompressToYUV2(tjhandle handle,
|
|||||||
*
|
*
|
||||||
* @param strides an array of integers, each specifying the number of bytes per
|
* @param strides an array of integers, each specifying the number of bytes per
|
||||||
* line in the corresponding plane of the output image. Setting the stride for
|
* line in the corresponding plane of the output image. Setting the stride for
|
||||||
* any plane to 0 is the same as setting it to the scaled component width for
|
* any plane to 0 is the same as setting it to the scaled plane width (see
|
||||||
* the plane. If <tt>strides</tt> is NULL, then the strides for all planes
|
* @ref YUVnotes "YUV Image Format Notes".) If <tt>strides</tt> is NULL, then
|
||||||
* will be set to their respective scaled component widths. You can adjust the
|
* the strides for all planes will be set to their respective scaled plane
|
||||||
* strides in order to add an arbitrary amount of line padding to each plane or
|
* widths. You can adjust the strides in order to add an arbitrary amount of
|
||||||
* to decompress the JPEG image into a subregion of a larger YUV planar image.
|
* line padding to each plane or to decompress the JPEG image into a subregion
|
||||||
|
* of a larger YUV planar image.
|
||||||
*
|
*
|
||||||
* @param height desired height (in pixels) of the YUV image. If this is
|
* @param height desired height (in pixels) of the YUV image. If this is
|
||||||
* different than the height of the JPEG image being decompressed, then
|
* different than the height of the JPEG image being decompressed, then
|
||||||
@@ -1166,7 +1225,7 @@ DLLEXPORT int DLLCALL tjDecompressToYUV2(tjhandle handle,
|
|||||||
* performed within TurboJPEG.
|
* performed within TurboJPEG.
|
||||||
*
|
*
|
||||||
* @param flags the bitwise OR of one or more of the @ref TJFLAG_BOTTOMUP
|
* @param flags the bitwise OR of one or more of the @ref TJFLAG_BOTTOMUP
|
||||||
* "flags".
|
* "flags"
|
||||||
*
|
*
|
||||||
* @return 0 if successful, or -1 if an error occurred (see #tjGetErrorStr().)
|
* @return 0 if successful, or -1 if an error occurred (see #tjGetErrorStr().)
|
||||||
*/
|
*/
|
||||||
@@ -1204,7 +1263,7 @@ DLLEXPORT int DLLCALL tjDecompressToYUVPlanes(tjhandle handle,
|
|||||||
*
|
*
|
||||||
* @param width width (in pixels) of the source and destination images
|
* @param width width (in pixels) of the source and destination images
|
||||||
*
|
*
|
||||||
* @param pitch bytes per line of the destination image. Normally, this should
|
* @param pitch bytes per line in the destination image. Normally, this should
|
||||||
* be <tt>width * #tjPixelSize[pixelFormat]</tt> if the destination image is
|
* be <tt>width * #tjPixelSize[pixelFormat]</tt> if the destination image is
|
||||||
* unpadded, or <tt>#TJPAD(width * #tjPixelSize[pixelFormat])</tt> if each line
|
* unpadded, or <tt>#TJPAD(width * #tjPixelSize[pixelFormat])</tt> if each line
|
||||||
* of the destination image should be padded to the nearest 32-bit boundary, as
|
* of the destination image should be padded to the nearest 32-bit boundary, as
|
||||||
@@ -1218,7 +1277,7 @@ DLLEXPORT int DLLCALL tjDecompressToYUVPlanes(tjhandle handle,
|
|||||||
* "Pixel formats".)
|
* "Pixel formats".)
|
||||||
*
|
*
|
||||||
* @param flags the bitwise OR of one or more of the @ref TJFLAG_BOTTOMUP
|
* @param flags the bitwise OR of one or more of the @ref TJFLAG_BOTTOMUP
|
||||||
* "flags".
|
* "flags"
|
||||||
*
|
*
|
||||||
* @return 0 if successful, or -1 if an error occurred (see #tjGetErrorStr().)
|
* @return 0 if successful, or -1 if an error occurred (see #tjGetErrorStr().)
|
||||||
*/
|
*/
|
||||||
@@ -1238,18 +1297,18 @@ DLLEXPORT int DLLCALL tjDecodeYUV(tjhandle handle, unsigned char *srcBuf,
|
|||||||
* @param srcPlanes an array of pointers to Y, U (Cb), and V (Cr) image planes
|
* @param srcPlanes an array of pointers to Y, U (Cb), and V (Cr) image planes
|
||||||
* (or just a Y plane, if decoding a grayscale image) that contain a YUV image
|
* (or just a Y plane, if decoding a grayscale image) that contain a YUV image
|
||||||
* to be decoded. These planes can be contiguous or non-contiguous in memory.
|
* to be decoded. These planes can be contiguous or non-contiguous in memory.
|
||||||
* Each plane should be at least
|
* The size of each plane should match the value returned by #tjPlaneSizeYUV()
|
||||||
* <b><i>{component stride} * {component height}</i></b> bytes in size.
|
* for the given image width, height, strides, and level of chrominance
|
||||||
* (See below for a description of stride, and refer to @ref YUVnotes
|
* subsampling. Refer to @ref YUVnotes "YUV Image Format Notes" for more
|
||||||
* "YUV Image Format Notes" for a description of component height.)
|
* details.
|
||||||
*
|
*
|
||||||
* @param strides an array of integers, each specifying the number of bytes per
|
* @param strides an array of integers, each specifying the number of bytes per
|
||||||
* line in the corresponding plane of the YUV source image. Setting the stride
|
* line in the corresponding plane of the YUV source image. Setting the stride
|
||||||
* for any plane to 0 is the same as setting it to the component width for the
|
* for any plane to 0 is the same as setting it to the plane width (see
|
||||||
* plane. If <tt>strides</tt> is NULL, then the strides for all planes will be
|
* @ref YUVnotes "YUV Image Format Notes".) If <tt>strides</tt> is NULL, then
|
||||||
* set to their respective component widths. You can adjust the strides in
|
* the strides for all planes will be set to their respective plane widths.
|
||||||
* order to specify an arbitrary amount of line padding in each plane or to
|
* You can adjust the strides in order to specify an arbitrary amount of line
|
||||||
* decode a subregion of a larger YUV planar image.
|
* padding in each plane or to decode a subregion of a larger YUV planar image.
|
||||||
*
|
*
|
||||||
* @param subsamp the level of chrominance subsampling used in the YUV source
|
* @param subsamp the level of chrominance subsampling used in the YUV source
|
||||||
* image (see @ref TJSAMP "Chrominance subsampling options".)
|
* image (see @ref TJSAMP "Chrominance subsampling options".)
|
||||||
@@ -1261,7 +1320,7 @@ DLLEXPORT int DLLCALL tjDecodeYUV(tjhandle handle, unsigned char *srcBuf,
|
|||||||
*
|
*
|
||||||
* @param width width (in pixels) of the source and destination images
|
* @param width width (in pixels) of the source and destination images
|
||||||
*
|
*
|
||||||
* @param pitch bytes per line of the destination image. Normally, this should
|
* @param pitch bytes per line in the destination image. Normally, this should
|
||||||
* be <tt>width * #tjPixelSize[pixelFormat]</tt> if the destination image is
|
* be <tt>width * #tjPixelSize[pixelFormat]</tt> if the destination image is
|
||||||
* unpadded, or <tt>#TJPAD(width * #tjPixelSize[pixelFormat])</tt> if each line
|
* unpadded, or <tt>#TJPAD(width * #tjPixelSize[pixelFormat])</tt> if each line
|
||||||
* of the destination image should be padded to the nearest 32-bit boundary, as
|
* of the destination image should be padded to the nearest 32-bit boundary, as
|
||||||
@@ -1275,7 +1334,7 @@ DLLEXPORT int DLLCALL tjDecodeYUV(tjhandle handle, unsigned char *srcBuf,
|
|||||||
* "Pixel formats".)
|
* "Pixel formats".)
|
||||||
*
|
*
|
||||||
* @param flags the bitwise OR of one or more of the @ref TJFLAG_BOTTOMUP
|
* @param flags the bitwise OR of one or more of the @ref TJFLAG_BOTTOMUP
|
||||||
* "flags".
|
* "flags"
|
||||||
*
|
*
|
||||||
* @return 0 if successful, or -1 if an error occurred (see #tjGetErrorStr().)
|
* @return 0 if successful, or -1 if an error occurred (see #tjGetErrorStr().)
|
||||||
*/
|
*/
|
||||||
@@ -1295,9 +1354,9 @@ DLLEXPORT tjhandle DLLCALL tjInitTransform(void);
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Losslessly transform a JPEG image into another JPEG image. Lossless
|
* Losslessly transform a JPEG image into another JPEG image. Lossless
|
||||||
* transforms work by moving the raw coefficients from one JPEG image structure
|
* transforms work by moving the raw DCT coefficients from one JPEG image
|
||||||
* to another without altering the values of the coefficients. While this is
|
* structure to another without altering the values of the coefficients. While
|
||||||
* typically faster than decompressing the image, transforming it, and
|
* this is typically faster than decompressing the image, transforming it, and
|
||||||
* re-compressing it, lossless transforms are not free. Each lossless
|
* re-compressing it, lossless transforms are not free. Each lossless
|
||||||
* transform requires reading and performing Huffman decoding on all of the
|
* transform requires reading and performing Huffman decoding on all of the
|
||||||
* coefficients in the source image, regardless of the size of the destination
|
* coefficients in the source image, regardless of the size of the destination
|
||||||
@@ -1308,9 +1367,10 @@ DLLEXPORT tjhandle DLLCALL tjInitTransform(void);
|
|||||||
*
|
*
|
||||||
* @param handle a handle to a TurboJPEG transformer instance
|
* @param handle a handle to a TurboJPEG transformer instance
|
||||||
*
|
*
|
||||||
* @param jpegBuf pointer to a buffer containing the JPEG image to transform
|
* @param jpegBuf pointer to a buffer containing the JPEG source image to
|
||||||
|
* transform
|
||||||
*
|
*
|
||||||
* @param jpegSize size of the JPEG image (in bytes)
|
* @param jpegSize size of the JPEG source image (in bytes)
|
||||||
*
|
*
|
||||||
* @param n the number of transformed JPEG images to generate
|
* @param n the number of transformed JPEG images to generate
|
||||||
*
|
*
|
||||||
@@ -1343,7 +1403,7 @@ DLLEXPORT tjhandle DLLCALL tjInitTransform(void);
|
|||||||
* corresponding transformed output image.
|
* corresponding transformed output image.
|
||||||
*
|
*
|
||||||
* @param flags the bitwise OR of one or more of the @ref TJFLAG_BOTTOMUP
|
* @param flags the bitwise OR of one or more of the @ref TJFLAG_BOTTOMUP
|
||||||
* "flags".
|
* "flags"
|
||||||
*
|
*
|
||||||
* @return 0 if successful, or -1 if an error occurred (see #tjGetErrorStr().)
|
* @return 0 if successful, or -1 if an error occurred (see #tjGetErrorStr().)
|
||||||
*/
|
*/
|
||||||
@@ -1372,7 +1432,7 @@ DLLEXPORT int DLLCALL tjDestroy(tjhandle handle);
|
|||||||
* @param bytes the number of bytes to allocate
|
* @param bytes the number of bytes to allocate
|
||||||
*
|
*
|
||||||
* @return a pointer to a newly-allocated buffer with the specified number of
|
* @return a pointer to a newly-allocated buffer with the specified number of
|
||||||
* bytes
|
* bytes.
|
||||||
*
|
*
|
||||||
* @sa tjFree()
|
* @sa tjFree()
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user