TurboJPEG: Numerous documentation improvements
- Wordsmithing, formatting, and grammar tweaks
- Various clarifications and corrections, including specifying whether
a particular buffer or image is used as a source or destination
- Accommodate/mention features that were introduced since the API
documentation was created.
- For clarity, use "packed-pixel" to describe uncompressed
source/destination images that are not planar YUV.
- Use "row" rather than "line" to refer to a single horizontal group of
pixels or component values, for consistency with the libjpeg API
documentation. (libjpeg also uses "scanline", which is a more archaic
term.)
- Use "alignment" rather than "padding" to refer to the number of bytes
by which a row's width is evenly divisible. This consistifies the
documention of the YUV functions and tjLoadImage(). ("Padding"
typically refers to the number of bytes added to each row, which is
not the same thing.)
- Remove all references to "the underlying codec." Although the
TurboJPEG API originated as a cross-platform wrapper for the Intel
Integrated Performance Primitives, Sun mediaLib, QuickTime, and
libjpeg, none of those TurboJPEG implementations has been maintained
since 2009. Nothing would prevent someone from implementing the
TurboJPEG API without libjpeg-turbo, but such an implementation would
not necessarily have an "underlying codec." (It could be fully
self-contained.)
- Use "destination image" rather than "output image", for consistency,
or describe the type of image that will be output.
- Avoid the term "image buffer" and instead use "byte buffer" to
refer to buffers that will hold JPEG images, or describe the type of
image that will be contained in the buffer. (The Java documentation
doesn't use "byte buffer", because the buffer arrays literally have
"byte" in front of them, and since Java doesn't have pointers, it is
not possible for mere mortals to store any other type of data in those
arrays.)
- C: Use "unified" to describe YUV images stored in a single buffer, for
consistency with the Java documentation.
- Use "planar YUV" rather than "YUV planar". Is is our convention to
describe images using {component layout} {colorspace/pixel format}
{image function}, e.g. "packed-pixel RGB source image" or "planar YUV
destination image."
- C: Document the TurboJPEG API version in which a particular function
or macro was introduced, and reorder the backward compatibility
function stubs in turbojpeg.h alphabetically by API version.
- C: Use Markdown rather than HTML tags, where possible, in the Doxygen
comments.
This commit is contained in:
@@ -29,9 +29,9 @@ jpegtran `-drop` and `-trim` options to losslessly transform a
|
|||||||
specially-crafted malformed JPEG image.
|
specially-crafted malformed JPEG image.
|
||||||
|
|
||||||
5. Fixed an issue in `tjBufSizeYUV2()` whereby it returned a bogus result,
|
5. Fixed an issue in `tjBufSizeYUV2()` whereby it returned a bogus result,
|
||||||
rather than throwing an error, if the `pad` parameter was not a power of 2.
|
rather than throwing an error, if the `align` parameter was not a power of 2.
|
||||||
Fixed a similar issue in `tjCompressFromYUV()` whereby it generated a corrupt
|
Fixed a similar issue in `tjCompressFromYUV()` whereby it generated a corrupt
|
||||||
JPEG image in certain cases, rather than throwing an error, if the `pad`
|
JPEG image in certain cases, rather than throwing an error, if the `align`
|
||||||
parameter was not a power of 2.
|
parameter was not a power of 2.
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -102,22 +102,22 @@ Macros</h2></td></tr>
|
|||||||
<tr class="memdesc:ga39f57a6fb02d9cf32e7b6890099b5a71"><td class="mdescLeft"> </td><td class="mdescRight">The number of JPEG colorspaces. <a href="group___turbo_j_p_e_g.html#ga39f57a6fb02d9cf32e7b6890099b5a71">More...</a><br /></td></tr>
|
<tr class="memdesc:ga39f57a6fb02d9cf32e7b6890099b5a71"><td class="mdescLeft"> </td><td class="mdescRight">The number of JPEG colorspaces. <a href="group___turbo_j_p_e_g.html#ga39f57a6fb02d9cf32e7b6890099b5a71">More...</a><br /></td></tr>
|
||||||
<tr class="separator:ga39f57a6fb02d9cf32e7b6890099b5a71"><td class="memSeparator" colspan="2"> </td></tr>
|
<tr class="separator:ga39f57a6fb02d9cf32e7b6890099b5a71"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
<tr class="memitem:ga72ecf4ebe6eb702d3c6f5ca27455e1ec"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#ga72ecf4ebe6eb702d3c6f5ca27455e1ec">TJFLAG_BOTTOMUP</a></td></tr>
|
<tr class="memitem:ga72ecf4ebe6eb702d3c6f5ca27455e1ec"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#ga72ecf4ebe6eb702d3c6f5ca27455e1ec">TJFLAG_BOTTOMUP</a></td></tr>
|
||||||
<tr class="memdesc:ga72ecf4ebe6eb702d3c6f5ca27455e1ec"><td class="mdescLeft"> </td><td class="mdescRight">The uncompressed source/destination image is stored in bottom-up (Windows, OpenGL) order, not top-down (X11) order. <a href="group___turbo_j_p_e_g.html#ga72ecf4ebe6eb702d3c6f5ca27455e1ec">More...</a><br /></td></tr>
|
<tr class="memdesc:ga72ecf4ebe6eb702d3c6f5ca27455e1ec"><td class="mdescLeft"> </td><td class="mdescRight">Rows in the packed-pixel source/destination image are stored in bottom-up (Windows, OpenGL) order rather than in top-down (X11) order. <a href="group___turbo_j_p_e_g.html#ga72ecf4ebe6eb702d3c6f5ca27455e1ec">More...</a><br /></td></tr>
|
||||||
<tr class="separator:ga72ecf4ebe6eb702d3c6f5ca27455e1ec"><td class="memSeparator" colspan="2"> </td></tr>
|
<tr class="separator:ga72ecf4ebe6eb702d3c6f5ca27455e1ec"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
<tr class="memitem:ga4ee4506c81177a06f77e2504a22efd2d"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#ga4ee4506c81177a06f77e2504a22efd2d">TJFLAG_FASTUPSAMPLE</a></td></tr>
|
<tr class="memitem:ga4ee4506c81177a06f77e2504a22efd2d"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#ga4ee4506c81177a06f77e2504a22efd2d">TJFLAG_FASTUPSAMPLE</a></td></tr>
|
||||||
<tr class="memdesc:ga4ee4506c81177a06f77e2504a22efd2d"><td class="mdescLeft"> </td><td class="mdescRight">When decompressing an image that was compressed using chrominance subsampling, use the fastest chrominance upsampling algorithm available in the underlying codec. <a href="group___turbo_j_p_e_g.html#ga4ee4506c81177a06f77e2504a22efd2d">More...</a><br /></td></tr>
|
<tr class="memdesc:ga4ee4506c81177a06f77e2504a22efd2d"><td class="mdescLeft"> </td><td class="mdescRight">When decompressing an image that was compressed using chrominance subsampling, use the fastest chrominance upsampling algorithm available. <a href="group___turbo_j_p_e_g.html#ga4ee4506c81177a06f77e2504a22efd2d">More...</a><br /></td></tr>
|
||||||
<tr class="separator:ga4ee4506c81177a06f77e2504a22efd2d"><td class="memSeparator" colspan="2"> </td></tr>
|
<tr class="separator:ga4ee4506c81177a06f77e2504a22efd2d"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
<tr class="memitem:ga8808d403c68b62aaa58a4c1e58e98963"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#ga8808d403c68b62aaa58a4c1e58e98963">TJFLAG_NOREALLOC</a></td></tr>
|
<tr class="memitem:ga8808d403c68b62aaa58a4c1e58e98963"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#ga8808d403c68b62aaa58a4c1e58e98963">TJFLAG_NOREALLOC</a></td></tr>
|
||||||
<tr class="memdesc:ga8808d403c68b62aaa58a4c1e58e98963"><td class="mdescLeft"> </td><td class="mdescRight">Disable buffer (re)allocation. <a href="group___turbo_j_p_e_g.html#ga8808d403c68b62aaa58a4c1e58e98963">More...</a><br /></td></tr>
|
<tr class="memdesc:ga8808d403c68b62aaa58a4c1e58e98963"><td class="mdescLeft"> </td><td class="mdescRight">Disable JPEG buffer (re)allocation. <a href="group___turbo_j_p_e_g.html#ga8808d403c68b62aaa58a4c1e58e98963">More...</a><br /></td></tr>
|
||||||
<tr class="separator:ga8808d403c68b62aaa58a4c1e58e98963"><td class="memSeparator" colspan="2"> </td></tr>
|
<tr class="separator:ga8808d403c68b62aaa58a4c1e58e98963"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
<tr class="memitem:gaabce235db80d3f698b27f36cbd453da2"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#gaabce235db80d3f698b27f36cbd453da2">TJFLAG_FASTDCT</a></td></tr>
|
<tr class="memitem:gaabce235db80d3f698b27f36cbd453da2"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#gaabce235db80d3f698b27f36cbd453da2">TJFLAG_FASTDCT</a></td></tr>
|
||||||
<tr class="memdesc:gaabce235db80d3f698b27f36cbd453da2"><td class="mdescLeft"> </td><td class="mdescRight">Use the fastest DCT/IDCT algorithm available in the underlying codec. <a href="group___turbo_j_p_e_g.html#gaabce235db80d3f698b27f36cbd453da2">More...</a><br /></td></tr>
|
<tr class="memdesc:gaabce235db80d3f698b27f36cbd453da2"><td class="mdescLeft"> </td><td class="mdescRight">Use the fastest DCT/IDCT algorithm available. <a href="group___turbo_j_p_e_g.html#gaabce235db80d3f698b27f36cbd453da2">More...</a><br /></td></tr>
|
||||||
<tr class="separator:gaabce235db80d3f698b27f36cbd453da2"><td class="memSeparator" colspan="2"> </td></tr>
|
<tr class="separator:gaabce235db80d3f698b27f36cbd453da2"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
<tr class="memitem:gacb233cfd722d66d1ccbf48a7de81f0e0"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#gacb233cfd722d66d1ccbf48a7de81f0e0">TJFLAG_ACCURATEDCT</a></td></tr>
|
<tr class="memitem:gacb233cfd722d66d1ccbf48a7de81f0e0"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#gacb233cfd722d66d1ccbf48a7de81f0e0">TJFLAG_ACCURATEDCT</a></td></tr>
|
||||||
<tr class="memdesc:gacb233cfd722d66d1ccbf48a7de81f0e0"><td class="mdescLeft"> </td><td class="mdescRight">Use the most accurate DCT/IDCT algorithm available in the underlying codec. <a href="group___turbo_j_p_e_g.html#gacb233cfd722d66d1ccbf48a7de81f0e0">More...</a><br /></td></tr>
|
<tr class="memdesc:gacb233cfd722d66d1ccbf48a7de81f0e0"><td class="mdescLeft"> </td><td class="mdescRight">Use the most accurate DCT/IDCT algorithm available. <a href="group___turbo_j_p_e_g.html#gacb233cfd722d66d1ccbf48a7de81f0e0">More...</a><br /></td></tr>
|
||||||
<tr class="separator:gacb233cfd722d66d1ccbf48a7de81f0e0"><td class="memSeparator" colspan="2"> </td></tr>
|
<tr class="separator:gacb233cfd722d66d1ccbf48a7de81f0e0"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
<tr class="memitem:ga519cfa4ef6c18d9e5b455fdf59306a3a"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#ga519cfa4ef6c18d9e5b455fdf59306a3a">TJFLAG_STOPONWARNING</a></td></tr>
|
<tr class="memitem:ga519cfa4ef6c18d9e5b455fdf59306a3a"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#ga519cfa4ef6c18d9e5b455fdf59306a3a">TJFLAG_STOPONWARNING</a></td></tr>
|
||||||
<tr class="memdesc:ga519cfa4ef6c18d9e5b455fdf59306a3a"><td class="mdescLeft"> </td><td class="mdescRight">Immediately discontinue the current compression/decompression/transform operation if the underlying codec throws a warning (non-fatal error). <a href="group___turbo_j_p_e_g.html#ga519cfa4ef6c18d9e5b455fdf59306a3a">More...</a><br /></td></tr>
|
<tr class="memdesc:ga519cfa4ef6c18d9e5b455fdf59306a3a"><td class="mdescLeft"> </td><td class="mdescRight">Immediately discontinue the current compression/decompression/transform operation if a warning (non-fatal error) occurs. <a href="group___turbo_j_p_e_g.html#ga519cfa4ef6c18d9e5b455fdf59306a3a">More...</a><br /></td></tr>
|
||||||
<tr class="separator:ga519cfa4ef6c18d9e5b455fdf59306a3a"><td class="memSeparator" colspan="2"> </td></tr>
|
<tr class="separator:ga519cfa4ef6c18d9e5b455fdf59306a3a"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
<tr class="memitem:ga43b426750b46190a25d34a67ef76df1b"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#ga43b426750b46190a25d34a67ef76df1b">TJFLAG_PROGRESSIVE</a></td></tr>
|
<tr class="memitem:ga43b426750b46190a25d34a67ef76df1b"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#ga43b426750b46190a25d34a67ef76df1b">TJFLAG_PROGRESSIVE</a></td></tr>
|
||||||
<tr class="memdesc:ga43b426750b46190a25d34a67ef76df1b"><td class="mdescLeft"> </td><td class="mdescRight">Use progressive entropy coding in JPEG images generated by the compression and transform functions. <a href="group___turbo_j_p_e_g.html#ga43b426750b46190a25d34a67ef76df1b">More...</a><br /></td></tr>
|
<tr class="memdesc:ga43b426750b46190a25d34a67ef76df1b"><td class="mdescLeft"> </td><td class="mdescRight">Use progressive entropy coding in JPEG images generated by the compression and transform functions. <a href="group___turbo_j_p_e_g.html#ga43b426750b46190a25d34a67ef76df1b">More...</a><br /></td></tr>
|
||||||
@@ -141,19 +141,19 @@ Macros</h2></td></tr>
|
|||||||
<tr class="memdesc:ga9c771a757fc1294add611906b89ab2d2"><td class="mdescLeft"> </td><td class="mdescRight">This option will enable lossless cropping. <a href="group___turbo_j_p_e_g.html#ga9c771a757fc1294add611906b89ab2d2">More...</a><br /></td></tr>
|
<tr class="memdesc:ga9c771a757fc1294add611906b89ab2d2"><td class="mdescLeft"> </td><td class="mdescRight">This option will enable lossless cropping. <a href="group___turbo_j_p_e_g.html#ga9c771a757fc1294add611906b89ab2d2">More...</a><br /></td></tr>
|
||||||
<tr class="separator:ga9c771a757fc1294add611906b89ab2d2"><td class="memSeparator" colspan="2"> </td></tr>
|
<tr class="separator:ga9c771a757fc1294add611906b89ab2d2"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
<tr class="memitem:ga3acee7b48ade1b99e5588736007c2589"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#ga3acee7b48ade1b99e5588736007c2589">TJXOPT_GRAY</a></td></tr>
|
<tr class="memitem:ga3acee7b48ade1b99e5588736007c2589"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#ga3acee7b48ade1b99e5588736007c2589">TJXOPT_GRAY</a></td></tr>
|
||||||
<tr class="memdesc:ga3acee7b48ade1b99e5588736007c2589"><td class="mdescLeft"> </td><td class="mdescRight">This option will discard the color data in the input image and produce a grayscale output image. <a href="group___turbo_j_p_e_g.html#ga3acee7b48ade1b99e5588736007c2589">More...</a><br /></td></tr>
|
<tr class="memdesc:ga3acee7b48ade1b99e5588736007c2589"><td class="mdescLeft"> </td><td class="mdescRight">This option will discard the color data in the source image and produce a grayscale destination image. <a href="group___turbo_j_p_e_g.html#ga3acee7b48ade1b99e5588736007c2589">More...</a><br /></td></tr>
|
||||||
<tr class="separator:ga3acee7b48ade1b99e5588736007c2589"><td class="memSeparator" colspan="2"> </td></tr>
|
<tr class="separator:ga3acee7b48ade1b99e5588736007c2589"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
<tr class="memitem:gafbf992bbf6e006705886333703ffab31"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#gafbf992bbf6e006705886333703ffab31">TJXOPT_NOOUTPUT</a></td></tr>
|
<tr class="memitem:gafbf992bbf6e006705886333703ffab31"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#gafbf992bbf6e006705886333703ffab31">TJXOPT_NOOUTPUT</a></td></tr>
|
||||||
<tr class="memdesc:gafbf992bbf6e006705886333703ffab31"><td class="mdescLeft"> </td><td class="mdescRight">This option will prevent <a class="el" href="group___turbo_j_p_e_g.html#ga9cb8abf4cc91881e04a0329b2270be25" title="Losslessly transform a JPEG image into another JPEG image.">tjTransform()</a> from outputting a JPEG image for this particular transform (this can be used in conjunction with a custom filter to capture the transformed DCT coefficients without transcoding them.) <a href="group___turbo_j_p_e_g.html#gafbf992bbf6e006705886333703ffab31">More...</a><br /></td></tr>
|
<tr class="memdesc:gafbf992bbf6e006705886333703ffab31"><td class="mdescLeft"> </td><td class="mdescRight">This option will prevent <a class="el" href="group___turbo_j_p_e_g.html#ga9cb8abf4cc91881e04a0329b2270be25" title="Losslessly transform a JPEG image into another JPEG image.">tjTransform()</a> from outputting a JPEG image for this particular transform. <a href="group___turbo_j_p_e_g.html#gafbf992bbf6e006705886333703ffab31">More...</a><br /></td></tr>
|
||||||
<tr class="separator:gafbf992bbf6e006705886333703ffab31"><td class="memSeparator" colspan="2"> </td></tr>
|
<tr class="separator:gafbf992bbf6e006705886333703ffab31"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
<tr class="memitem:gad2371c80674584ecc1a7d75e564cf026"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#gad2371c80674584ecc1a7d75e564cf026">TJXOPT_PROGRESSIVE</a></td></tr>
|
<tr class="memitem:gad2371c80674584ecc1a7d75e564cf026"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#gad2371c80674584ecc1a7d75e564cf026">TJXOPT_PROGRESSIVE</a></td></tr>
|
||||||
<tr class="memdesc:gad2371c80674584ecc1a7d75e564cf026"><td class="mdescLeft"> </td><td class="mdescRight">This option will enable progressive entropy coding in the output image generated by this particular transform. <a href="group___turbo_j_p_e_g.html#gad2371c80674584ecc1a7d75e564cf026">More...</a><br /></td></tr>
|
<tr class="memdesc:gad2371c80674584ecc1a7d75e564cf026"><td class="mdescLeft"> </td><td class="mdescRight">This option will enable progressive entropy coding in the JPEG image generated by this particular transform. <a href="group___turbo_j_p_e_g.html#gad2371c80674584ecc1a7d75e564cf026">More...</a><br /></td></tr>
|
||||||
<tr class="separator:gad2371c80674584ecc1a7d75e564cf026"><td class="memSeparator" colspan="2"> </td></tr>
|
<tr class="separator:gad2371c80674584ecc1a7d75e564cf026"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
<tr class="memitem:ga153b468cfb905d0de61706c838986fe8"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#ga153b468cfb905d0de61706c838986fe8">TJXOPT_COPYNONE</a></td></tr>
|
<tr class="memitem:ga153b468cfb905d0de61706c838986fe8"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#ga153b468cfb905d0de61706c838986fe8">TJXOPT_COPYNONE</a></td></tr>
|
||||||
<tr class="memdesc:ga153b468cfb905d0de61706c838986fe8"><td class="mdescLeft"> </td><td class="mdescRight">This option will prevent <a class="el" href="group___turbo_j_p_e_g.html#ga9cb8abf4cc91881e04a0329b2270be25" title="Losslessly transform a JPEG image into another JPEG image.">tjTransform()</a> from copying any extra markers (including EXIF and ICC profile data) from the source image to the output image. <a href="group___turbo_j_p_e_g.html#ga153b468cfb905d0de61706c838986fe8">More...</a><br /></td></tr>
|
<tr class="memdesc:ga153b468cfb905d0de61706c838986fe8"><td class="mdescLeft"> </td><td class="mdescRight">This option will prevent <a class="el" href="group___turbo_j_p_e_g.html#ga9cb8abf4cc91881e04a0329b2270be25" title="Losslessly transform a JPEG image into another JPEG image.">tjTransform()</a> from copying any extra markers (including EXIF and ICC profile data) from the source image to the destination image. <a href="group___turbo_j_p_e_g.html#ga153b468cfb905d0de61706c838986fe8">More...</a><br /></td></tr>
|
||||||
<tr class="separator:ga153b468cfb905d0de61706c838986fe8"><td class="memSeparator" colspan="2"> </td></tr>
|
<tr class="separator:ga153b468cfb905d0de61706c838986fe8"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
<tr class="memitem:ga0aba955473315e405295d978f0c16511"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#ga0aba955473315e405295d978f0c16511">TJPAD</a>(width)</td></tr>
|
<tr class="memitem:ga0aba955473315e405295d978f0c16511"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#ga0aba955473315e405295d978f0c16511">TJPAD</a>(width)</td></tr>
|
||||||
<tr class="memdesc:ga0aba955473315e405295d978f0c16511"><td class="mdescLeft"> </td><td class="mdescRight">Pad the given width to the nearest 32-bit boundary. <a href="group___turbo_j_p_e_g.html#ga0aba955473315e405295d978f0c16511">More...</a><br /></td></tr>
|
<tr class="memdesc:ga0aba955473315e405295d978f0c16511"><td class="mdescLeft"> </td><td class="mdescRight">Pad the given width to the nearest multiple of 4. <a href="group___turbo_j_p_e_g.html#ga0aba955473315e405295d978f0c16511">More...</a><br /></td></tr>
|
||||||
<tr class="separator:ga0aba955473315e405295d978f0c16511"><td class="memSeparator" colspan="2"> </td></tr>
|
<tr class="separator:ga0aba955473315e405295d978f0c16511"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
<tr class="memitem:ga84878bb65404204743aa18cac02781df"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#ga84878bb65404204743aa18cac02781df">TJSCALED</a>(dimension, scalingFactor)</td></tr>
|
<tr class="memitem:ga84878bb65404204743aa18cac02781df"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#ga84878bb65404204743aa18cac02781df">TJSCALED</a>(dimension, scalingFactor)</td></tr>
|
||||||
<tr class="memdesc:ga84878bb65404204743aa18cac02781df"><td class="mdescLeft"> </td><td class="mdescRight">Compute the scaled value of <code>dimension</code> using the given scaling factor. <a href="group___turbo_j_p_e_g.html#ga84878bb65404204743aa18cac02781df">More...</a><br /></td></tr>
|
<tr class="memdesc:ga84878bb65404204743aa18cac02781df"><td class="mdescLeft"> </td><td class="mdescRight">Compute the scaled value of <code>dimension</code> using the given scaling factor. <a href="group___turbo_j_p_e_g.html#ga84878bb65404204743aa18cac02781df">More...</a><br /></td></tr>
|
||||||
@@ -240,20 +240,20 @@ Functions</h2></td></tr>
|
|||||||
<tr class="memdesc:ga9d63a05fc6d813f4aae06107041a37e8"><td class="mdescLeft"> </td><td class="mdescRight">Create a TurboJPEG compressor instance. <a href="group___turbo_j_p_e_g.html#ga9d63a05fc6d813f4aae06107041a37e8">More...</a><br /></td></tr>
|
<tr class="memdesc:ga9d63a05fc6d813f4aae06107041a37e8"><td class="mdescLeft"> </td><td class="mdescRight">Create a TurboJPEG compressor instance. <a href="group___turbo_j_p_e_g.html#ga9d63a05fc6d813f4aae06107041a37e8">More...</a><br /></td></tr>
|
||||||
<tr class="separator:ga9d63a05fc6d813f4aae06107041a37e8"><td class="memSeparator" colspan="2"> </td></tr>
|
<tr class="separator:ga9d63a05fc6d813f4aae06107041a37e8"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
<tr class="memitem:gafbdce0112fd78fd38efae841443a9bcf"><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#gafbdce0112fd78fd38efae841443a9bcf">tjCompress2</a> (<a class="el" href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> handle, const unsigned char *srcBuf, int width, int pitch, int height, int pixelFormat, unsigned char **jpegBuf, unsigned long *jpegSize, int jpegSubsamp, int jpegQual, int flags)</td></tr>
|
<tr class="memitem:gafbdce0112fd78fd38efae841443a9bcf"><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#gafbdce0112fd78fd38efae841443a9bcf">tjCompress2</a> (<a class="el" href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> handle, const unsigned char *srcBuf, int width, int pitch, int height, int pixelFormat, unsigned char **jpegBuf, unsigned long *jpegSize, int jpegSubsamp, int jpegQual, int flags)</td></tr>
|
||||||
<tr class="memdesc:gafbdce0112fd78fd38efae841443a9bcf"><td class="mdescLeft"> </td><td class="mdescRight">Compress an RGB, grayscale, or CMYK image into a JPEG image. <a href="group___turbo_j_p_e_g.html#gafbdce0112fd78fd38efae841443a9bcf">More...</a><br /></td></tr>
|
<tr class="memdesc:gafbdce0112fd78fd38efae841443a9bcf"><td class="mdescLeft"> </td><td class="mdescRight">Compress a packed-pixel RGB, grayscale, or CMYK image into a JPEG image. <a href="group___turbo_j_p_e_g.html#gafbdce0112fd78fd38efae841443a9bcf">More...</a><br /></td></tr>
|
||||||
<tr class="separator:gafbdce0112fd78fd38efae841443a9bcf"><td class="memSeparator" colspan="2"> </td></tr>
|
<tr class="separator:gafbdce0112fd78fd38efae841443a9bcf"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
<tr class="memitem:ga7622a459b79aa1007e005b58783f875b"><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#ga7622a459b79aa1007e005b58783f875b">tjCompressFromYUV</a> (<a class="el" href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> handle, const unsigned char *srcBuf, int width, int pad, int height, int subsamp, unsigned char **jpegBuf, unsigned long *jpegSize, int jpegQual, int flags)</td></tr>
|
<tr class="memitem:gab40f5096a72fd7e5bda9d6b58fa37e2e"><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#gab40f5096a72fd7e5bda9d6b58fa37e2e">tjCompressFromYUV</a> (<a class="el" href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> handle, const unsigned char *srcBuf, int width, int align, int height, int subsamp, unsigned char **jpegBuf, unsigned long *jpegSize, int jpegQual, int flags)</td></tr>
|
||||||
<tr class="memdesc:ga7622a459b79aa1007e005b58783f875b"><td class="mdescLeft"> </td><td class="mdescRight">Compress a YUV planar image into a JPEG image. <a href="group___turbo_j_p_e_g.html#ga7622a459b79aa1007e005b58783f875b">More...</a><br /></td></tr>
|
<tr class="memdesc:gab40f5096a72fd7e5bda9d6b58fa37e2e"><td class="mdescLeft"> </td><td class="mdescRight">Compress a unified planar YUV image into a JPEG image. <a href="group___turbo_j_p_e_g.html#gab40f5096a72fd7e5bda9d6b58fa37e2e">More...</a><br /></td></tr>
|
||||||
<tr class="separator:ga7622a459b79aa1007e005b58783f875b"><td class="memSeparator" colspan="2"> </td></tr>
|
<tr class="separator:gab40f5096a72fd7e5bda9d6b58fa37e2e"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
<tr class="memitem:ga29ec5dfbd2d84b8724e951d6fa0d5d9e"><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#ga29ec5dfbd2d84b8724e951d6fa0d5d9e">tjCompressFromYUVPlanes</a> (<a class="el" href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> handle, const unsigned char **srcPlanes, int width, const int *strides, int height, int subsamp, unsigned char **jpegBuf, unsigned long *jpegSize, int jpegQual, int flags)</td></tr>
|
<tr class="memitem:ga29ec5dfbd2d84b8724e951d6fa0d5d9e"><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#ga29ec5dfbd2d84b8724e951d6fa0d5d9e">tjCompressFromYUVPlanes</a> (<a class="el" href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> handle, const unsigned char **srcPlanes, int width, const int *strides, int height, int subsamp, unsigned char **jpegBuf, unsigned long *jpegSize, int jpegQual, int flags)</td></tr>
|
||||||
<tr class="memdesc:ga29ec5dfbd2d84b8724e951d6fa0d5d9e"><td class="mdescLeft"> </td><td class="mdescRight">Compress a set of Y, U (Cb), and V (Cr) image planes into a JPEG image. <a href="group___turbo_j_p_e_g.html#ga29ec5dfbd2d84b8724e951d6fa0d5d9e">More...</a><br /></td></tr>
|
<tr class="memdesc:ga29ec5dfbd2d84b8724e951d6fa0d5d9e"><td class="mdescLeft"> </td><td class="mdescRight">Compress a set of Y, U (Cb), and V (Cr) image planes into a JPEG image. <a href="group___turbo_j_p_e_g.html#ga29ec5dfbd2d84b8724e951d6fa0d5d9e">More...</a><br /></td></tr>
|
||||||
<tr class="separator:ga29ec5dfbd2d84b8724e951d6fa0d5d9e"><td class="memSeparator" colspan="2"> </td></tr>
|
<tr class="separator:ga29ec5dfbd2d84b8724e951d6fa0d5d9e"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
<tr class="memitem:ga67ac12fee79073242cb216e07c9f1f90"><td class="memItemLeft" align="right" valign="top">DLLEXPORT unsigned long </td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#ga67ac12fee79073242cb216e07c9f1f90">tjBufSize</a> (int width, int height, int jpegSubsamp)</td></tr>
|
<tr class="memitem:ga67ac12fee79073242cb216e07c9f1f90"><td class="memItemLeft" align="right" valign="top">DLLEXPORT unsigned long </td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#ga67ac12fee79073242cb216e07c9f1f90">tjBufSize</a> (int width, int height, int jpegSubsamp)</td></tr>
|
||||||
<tr class="memdesc:ga67ac12fee79073242cb216e07c9f1f90"><td class="mdescLeft"> </td><td class="mdescRight">The maximum size of the buffer (in bytes) required to hold a JPEG image with the given parameters. <a href="group___turbo_j_p_e_g.html#ga67ac12fee79073242cb216e07c9f1f90">More...</a><br /></td></tr>
|
<tr class="memdesc:ga67ac12fee79073242cb216e07c9f1f90"><td class="mdescLeft"> </td><td class="mdescRight">The maximum size of the buffer (in bytes) required to hold a JPEG image with the given parameters. <a href="group___turbo_j_p_e_g.html#ga67ac12fee79073242cb216e07c9f1f90">More...</a><br /></td></tr>
|
||||||
<tr class="separator:ga67ac12fee79073242cb216e07c9f1f90"><td class="memSeparator" colspan="2"> </td></tr>
|
<tr class="separator:ga67ac12fee79073242cb216e07c9f1f90"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
<tr class="memitem:ga2be2b9969d4df9ecce9b05deed273194"><td class="memItemLeft" align="right" valign="top">DLLEXPORT unsigned long </td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#ga2be2b9969d4df9ecce9b05deed273194">tjBufSizeYUV2</a> (int width, int pad, int height, int subsamp)</td></tr>
|
<tr class="memitem:ga5e5aac9e8bcf17049279301e2466474c"><td class="memItemLeft" align="right" valign="top">DLLEXPORT unsigned long </td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#ga5e5aac9e8bcf17049279301e2466474c">tjBufSizeYUV2</a> (int width, int align, int height, int subsamp)</td></tr>
|
||||||
<tr class="memdesc:ga2be2b9969d4df9ecce9b05deed273194"><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="group___turbo_j_p_e_g.html#ga2be2b9969d4df9ecce9b05deed273194">More...</a><br /></td></tr>
|
<tr class="memdesc:ga5e5aac9e8bcf17049279301e2466474c"><td class="mdescLeft"> </td><td class="mdescRight">The size of the buffer (in bytes) required to hold a unified planar YUV image with the given parameters. <a href="group___turbo_j_p_e_g.html#ga5e5aac9e8bcf17049279301e2466474c">More...</a><br /></td></tr>
|
||||||
<tr class="separator:ga2be2b9969d4df9ecce9b05deed273194"><td class="memSeparator" colspan="2"> </td></tr>
|
<tr class="separator:ga5e5aac9e8bcf17049279301e2466474c"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
<tr class="memitem:gab4ab7b24f6e797d79abaaa670373961d"><td class="memItemLeft" align="right" valign="top">DLLEXPORT unsigned long </td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#gab4ab7b24f6e797d79abaaa670373961d">tjPlaneSizeYUV</a> (int componentID, int width, int stride, int height, int subsamp)</td></tr>
|
<tr class="memitem:gab4ab7b24f6e797d79abaaa670373961d"><td class="memItemLeft" align="right" valign="top">DLLEXPORT unsigned long </td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#gab4ab7b24f6e797d79abaaa670373961d">tjPlaneSizeYUV</a> (int componentID, int width, int stride, int height, int subsamp)</td></tr>
|
||||||
<tr class="memdesc:gab4ab7b24f6e797d79abaaa670373961d"><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="group___turbo_j_p_e_g.html#gab4ab7b24f6e797d79abaaa670373961d">More...</a><br /></td></tr>
|
<tr class="memdesc:gab4ab7b24f6e797d79abaaa670373961d"><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="group___turbo_j_p_e_g.html#gab4ab7b24f6e797d79abaaa670373961d">More...</a><br /></td></tr>
|
||||||
<tr class="separator:gab4ab7b24f6e797d79abaaa670373961d"><td class="memSeparator" colspan="2"> </td></tr>
|
<tr class="separator:gab4ab7b24f6e797d79abaaa670373961d"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
@@ -263,11 +263,11 @@ Functions</h2></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="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="group___turbo_j_p_e_g.html#ga1a209696c6a80748f20e134b3c64789f">More...</a><br /></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="group___turbo_j_p_e_g.html#ga1a209696c6a80748f20e134b3c64789f">More...</a><br /></td></tr>
|
||||||
<tr class="separator:ga1a209696c6a80748f20e134b3c64789f"><td class="memSeparator" colspan="2"> </td></tr>
|
<tr class="separator:ga1a209696c6a80748f20e134b3c64789f"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
<tr class="memitem:gac519b922cdf446e97d0cdcba513636bf"><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#gac519b922cdf446e97d0cdcba513636bf">tjEncodeYUV3</a> (<a class="el" href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> handle, const 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:ga5d619e0a02b71e05a8dffb764f6d7a64"><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#ga5d619e0a02b71e05a8dffb764f6d7a64">tjEncodeYUV3</a> (<a class="el" href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> handle, const unsigned char *srcBuf, int width, int pitch, int height, int pixelFormat, unsigned char *dstBuf, int align, int subsamp, int flags)</td></tr>
|
||||||
<tr class="memdesc:gac519b922cdf446e97d0cdcba513636bf"><td class="mdescLeft"> </td><td class="mdescRight">Encode an RGB or grayscale image into a YUV planar image. <a href="group___turbo_j_p_e_g.html#gac519b922cdf446e97d0cdcba513636bf">More...</a><br /></td></tr>
|
<tr class="memdesc:ga5d619e0a02b71e05a8dffb764f6d7a64"><td class="mdescLeft"> </td><td class="mdescRight">Encode a packed-pixel RGB or grayscale image into a unified planar YUV image. <a href="group___turbo_j_p_e_g.html#ga5d619e0a02b71e05a8dffb764f6d7a64">More...</a><br /></td></tr>
|
||||||
<tr class="separator:gac519b922cdf446e97d0cdcba513636bf"><td class="memSeparator" colspan="2"> </td></tr>
|
<tr class="separator:ga5d619e0a02b71e05a8dffb764f6d7a64"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
<tr class="memitem:gae2d04c72457fe7f4d60cf78ab1b1feb1"><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#gae2d04c72457fe7f4d60cf78ab1b1feb1">tjEncodeYUVPlanes</a> (<a class="el" href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> handle, const unsigned char *srcBuf, int width, int pitch, int height, int pixelFormat, unsigned char **dstPlanes, int *strides, int subsamp, int flags)</td></tr>
|
<tr class="memitem:gae2d04c72457fe7f4d60cf78ab1b1feb1"><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#gae2d04c72457fe7f4d60cf78ab1b1feb1">tjEncodeYUVPlanes</a> (<a class="el" href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> handle, const unsigned char *srcBuf, int width, int pitch, int height, int pixelFormat, unsigned char **dstPlanes, int *strides, int subsamp, int flags)</td></tr>
|
||||||
<tr class="memdesc:gae2d04c72457fe7f4d60cf78ab1b1feb1"><td class="mdescLeft"> </td><td class="mdescRight">Encode an RGB or grayscale image into separate Y, U (Cb), and V (Cr) image planes. <a href="group___turbo_j_p_e_g.html#gae2d04c72457fe7f4d60cf78ab1b1feb1">More...</a><br /></td></tr>
|
<tr class="memdesc:gae2d04c72457fe7f4d60cf78ab1b1feb1"><td class="mdescLeft"> </td><td class="mdescRight">Encode a packed-pixel RGB or grayscale image into separate Y, U (Cb), and V (Cr) image planes. <a href="group___turbo_j_p_e_g.html#gae2d04c72457fe7f4d60cf78ab1b1feb1">More...</a><br /></td></tr>
|
||||||
<tr class="separator:gae2d04c72457fe7f4d60cf78ab1b1feb1"><td class="memSeparator" colspan="2"> </td></tr>
|
<tr class="separator:gae2d04c72457fe7f4d60cf78ab1b1feb1"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
<tr class="memitem:ga52300eac3f3d9ef4bab303bc244f62d3"><td class="memItemLeft" align="right" valign="top">DLLEXPORT <a class="el" href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#ga52300eac3f3d9ef4bab303bc244f62d3">tjInitDecompress</a> (void)</td></tr>
|
<tr class="memitem:ga52300eac3f3d9ef4bab303bc244f62d3"><td class="memItemLeft" align="right" valign="top">DLLEXPORT <a class="el" href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#ga52300eac3f3d9ef4bab303bc244f62d3">tjInitDecompress</a> (void)</td></tr>
|
||||||
<tr class="memdesc:ga52300eac3f3d9ef4bab303bc244f62d3"><td class="mdescLeft"> </td><td class="mdescRight">Create a TurboJPEG decompressor instance. <a href="group___turbo_j_p_e_g.html#ga52300eac3f3d9ef4bab303bc244f62d3">More...</a><br /></td></tr>
|
<tr class="memdesc:ga52300eac3f3d9ef4bab303bc244f62d3"><td class="mdescLeft"> </td><td class="mdescRight">Create a TurboJPEG decompressor instance. <a href="group___turbo_j_p_e_g.html#ga52300eac3f3d9ef4bab303bc244f62d3">More...</a><br /></td></tr>
|
||||||
@@ -275,23 +275,23 @@ Functions</h2></td></tr>
|
|||||||
<tr class="memitem:ga0595681096bba7199cc6f3533cb25f77"><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#ga0595681096bba7199cc6f3533cb25f77">tjDecompressHeader3</a> (<a class="el" href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> handle, const unsigned char *jpegBuf, unsigned long jpegSize, int *width, int *height, int *jpegSubsamp, int *jpegColorspace)</td></tr>
|
<tr class="memitem:ga0595681096bba7199cc6f3533cb25f77"><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#ga0595681096bba7199cc6f3533cb25f77">tjDecompressHeader3</a> (<a class="el" href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> handle, const unsigned char *jpegBuf, unsigned long jpegSize, int *width, int *height, int *jpegSubsamp, int *jpegColorspace)</td></tr>
|
||||||
<tr class="memdesc:ga0595681096bba7199cc6f3533cb25f77"><td class="mdescLeft"> </td><td class="mdescRight">Retrieve information about a JPEG image without decompressing it, or prime the decompressor with quantization and Huffman tables. <a href="group___turbo_j_p_e_g.html#ga0595681096bba7199cc6f3533cb25f77">More...</a><br /></td></tr>
|
<tr class="memdesc:ga0595681096bba7199cc6f3533cb25f77"><td class="mdescLeft"> </td><td class="mdescRight">Retrieve information about a JPEG image without decompressing it, or prime the decompressor with quantization and Huffman tables. <a href="group___turbo_j_p_e_g.html#ga0595681096bba7199cc6f3533cb25f77">More...</a><br /></td></tr>
|
||||||
<tr class="separator:ga0595681096bba7199cc6f3533cb25f77"><td class="memSeparator" colspan="2"> </td></tr>
|
<tr class="separator:ga0595681096bba7199cc6f3533cb25f77"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
<tr class="memitem:gac3854476006b10787bd128f7ede48057"><td class="memItemLeft" align="right" valign="top">DLLEXPORT <a class="el" href="structtjscalingfactor.html">tjscalingfactor</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#gac3854476006b10787bd128f7ede48057">tjGetScalingFactors</a> (int *numscalingfactors)</td></tr>
|
<tr class="memitem:ga193d0977b3b9966d53a6c402e90899b1"><td class="memItemLeft" align="right" valign="top">DLLEXPORT <a class="el" href="structtjscalingfactor.html">tjscalingfactor</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#ga193d0977b3b9966d53a6c402e90899b1">tjGetScalingFactors</a> (int *numScalingFactors)</td></tr>
|
||||||
<tr class="memdesc:gac3854476006b10787bd128f7ede48057"><td class="mdescLeft"> </td><td class="mdescRight">Returns a list of fractional scaling factors that the JPEG decompressor in this implementation of TurboJPEG supports. <a href="group___turbo_j_p_e_g.html#gac3854476006b10787bd128f7ede48057">More...</a><br /></td></tr>
|
<tr class="memdesc:ga193d0977b3b9966d53a6c402e90899b1"><td class="mdescLeft"> </td><td class="mdescRight">Returns a list of fractional scaling factors that the JPEG decompressor supports. <a href="group___turbo_j_p_e_g.html#ga193d0977b3b9966d53a6c402e90899b1">More...</a><br /></td></tr>
|
||||||
<tr class="separator:gac3854476006b10787bd128f7ede48057"><td class="memSeparator" colspan="2"> </td></tr>
|
<tr class="separator:ga193d0977b3b9966d53a6c402e90899b1"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
<tr class="memitem:gae9eccef8b682a48f43a9117c231ed013"><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#gae9eccef8b682a48f43a9117c231ed013">tjDecompress2</a> (<a class="el" href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> handle, const unsigned char *jpegBuf, unsigned long jpegSize, unsigned char *dstBuf, int width, int pitch, int height, int pixelFormat, int flags)</td></tr>
|
<tr class="memitem:gae9eccef8b682a48f43a9117c231ed013"><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#gae9eccef8b682a48f43a9117c231ed013">tjDecompress2</a> (<a class="el" href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> handle, const unsigned char *jpegBuf, unsigned long jpegSize, unsigned char *dstBuf, int width, int pitch, int height, int pixelFormat, int flags)</td></tr>
|
||||||
<tr class="memdesc:gae9eccef8b682a48f43a9117c231ed013"><td class="mdescLeft"> </td><td class="mdescRight">Decompress a JPEG image to an RGB, grayscale, or CMYK image. <a href="group___turbo_j_p_e_g.html#gae9eccef8b682a48f43a9117c231ed013">More...</a><br /></td></tr>
|
<tr class="memdesc:gae9eccef8b682a48f43a9117c231ed013"><td class="mdescLeft"> </td><td class="mdescRight">Decompress a JPEG image into a packed-pixel RGB, grayscale, or CMYK image. <a href="group___turbo_j_p_e_g.html#gae9eccef8b682a48f43a9117c231ed013">More...</a><br /></td></tr>
|
||||||
<tr class="separator:gae9eccef8b682a48f43a9117c231ed013"><td class="memSeparator" colspan="2"> </td></tr>
|
<tr class="separator:gae9eccef8b682a48f43a9117c231ed013"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
<tr class="memitem:ga04d1e839ff9a0860dd1475cff78d3364"><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#ga04d1e839ff9a0860dd1475cff78d3364">tjDecompressToYUV2</a> (<a class="el" href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> handle, const unsigned char *jpegBuf, unsigned long jpegSize, unsigned char *dstBuf, int width, int pad, int height, int flags)</td></tr>
|
<tr class="memitem:ga5a3093e325598c17a9f004323af6fafa"><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#ga5a3093e325598c17a9f004323af6fafa">tjDecompressToYUV2</a> (<a class="el" href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> handle, const unsigned char *jpegBuf, unsigned long jpegSize, unsigned char *dstBuf, int width, int align, int height, int flags)</td></tr>
|
||||||
<tr class="memdesc:ga04d1e839ff9a0860dd1475cff78d3364"><td class="mdescLeft"> </td><td class="mdescRight">Decompress a JPEG image to a YUV planar image. <a href="group___turbo_j_p_e_g.html#ga04d1e839ff9a0860dd1475cff78d3364">More...</a><br /></td></tr>
|
<tr class="memdesc:ga5a3093e325598c17a9f004323af6fafa"><td class="mdescLeft"> </td><td class="mdescRight">Decompress a JPEG image into a unified planar YUV image. <a href="group___turbo_j_p_e_g.html#ga5a3093e325598c17a9f004323af6fafa">More...</a><br /></td></tr>
|
||||||
<tr class="separator:ga04d1e839ff9a0860dd1475cff78d3364"><td class="memSeparator" colspan="2"> </td></tr>
|
<tr class="separator:ga5a3093e325598c17a9f004323af6fafa"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
<tr class="memitem:gaa59f901a5258ada5bd0185ad59368540"><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#gaa59f901a5258ada5bd0185ad59368540">tjDecompressToYUVPlanes</a> (<a class="el" href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> handle, const unsigned char *jpegBuf, unsigned long jpegSize, unsigned char **dstPlanes, int width, int *strides, int height, int flags)</td></tr>
|
<tr class="memitem:gaa59f901a5258ada5bd0185ad59368540"><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#gaa59f901a5258ada5bd0185ad59368540">tjDecompressToYUVPlanes</a> (<a class="el" href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> handle, const unsigned char *jpegBuf, unsigned long jpegSize, unsigned char **dstPlanes, int width, int *strides, int height, int flags)</td></tr>
|
||||||
<tr class="memdesc:gaa59f901a5258ada5bd0185ad59368540"><td class="mdescLeft"> </td><td class="mdescRight">Decompress a JPEG image into separate Y, U (Cb), and V (Cr) image planes. <a href="group___turbo_j_p_e_g.html#gaa59f901a5258ada5bd0185ad59368540">More...</a><br /></td></tr>
|
<tr class="memdesc:gaa59f901a5258ada5bd0185ad59368540"><td class="mdescLeft"> </td><td class="mdescRight">Decompress a JPEG image into separate Y, U (Cb), and V (Cr) image planes. <a href="group___turbo_j_p_e_g.html#gaa59f901a5258ada5bd0185ad59368540">More...</a><br /></td></tr>
|
||||||
<tr class="separator:gaa59f901a5258ada5bd0185ad59368540"><td class="memSeparator" colspan="2"> </td></tr>
|
<tr class="separator:gaa59f901a5258ada5bd0185ad59368540"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
<tr class="memitem:ga70abbf38f77a26fd6da8813bef96f695"><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#ga70abbf38f77a26fd6da8813bef96f695">tjDecodeYUV</a> (<a class="el" href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> handle, const unsigned char *srcBuf, int pad, int subsamp, unsigned char *dstBuf, int width, int pitch, int height, int pixelFormat, int flags)</td></tr>
|
<tr class="memitem:ga97c2cedc1e2bade15a84164c94e503c1"><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#ga97c2cedc1e2bade15a84164c94e503c1">tjDecodeYUV</a> (<a class="el" href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> handle, const unsigned char *srcBuf, int align, int subsamp, unsigned char *dstBuf, int width, int pitch, int height, int pixelFormat, int flags)</td></tr>
|
||||||
<tr class="memdesc:ga70abbf38f77a26fd6da8813bef96f695"><td class="mdescLeft"> </td><td class="mdescRight">Decode a YUV planar image into an RGB or grayscale image. <a href="group___turbo_j_p_e_g.html#ga70abbf38f77a26fd6da8813bef96f695">More...</a><br /></td></tr>
|
<tr class="memdesc:ga97c2cedc1e2bade15a84164c94e503c1"><td class="mdescLeft"> </td><td class="mdescRight">Decode a unified planar YUV image into a packed-pixel RGB or grayscale image. <a href="group___turbo_j_p_e_g.html#ga97c2cedc1e2bade15a84164c94e503c1">More...</a><br /></td></tr>
|
||||||
<tr class="separator:ga70abbf38f77a26fd6da8813bef96f695"><td class="memSeparator" colspan="2"> </td></tr>
|
<tr class="separator:ga97c2cedc1e2bade15a84164c94e503c1"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
<tr class="memitem:ga10e837c07fa9d25770565b237d3898d9"><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#ga10e837c07fa9d25770565b237d3898d9">tjDecodeYUVPlanes</a> (<a class="el" href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> handle, const unsigned char **srcPlanes, const int *strides, int subsamp, unsigned char *dstBuf, int width, int pitch, int height, int pixelFormat, int flags)</td></tr>
|
<tr class="memitem:ga10e837c07fa9d25770565b237d3898d9"><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#ga10e837c07fa9d25770565b237d3898d9">tjDecodeYUVPlanes</a> (<a class="el" href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> handle, const unsigned char **srcPlanes, const int *strides, int subsamp, unsigned char *dstBuf, int width, int pitch, int height, int pixelFormat, int flags)</td></tr>
|
||||||
<tr class="memdesc:ga10e837c07fa9d25770565b237d3898d9"><td class="mdescLeft"> </td><td class="mdescRight">Decode a set of Y, U (Cb), and V (Cr) image planes into an RGB or grayscale image. <a href="group___turbo_j_p_e_g.html#ga10e837c07fa9d25770565b237d3898d9">More...</a><br /></td></tr>
|
<tr class="memdesc:ga10e837c07fa9d25770565b237d3898d9"><td class="mdescLeft"> </td><td class="mdescRight">Decode a set of Y, U (Cb), and V (Cr) image planes into a packed-pixel RGB or grayscale image. <a href="group___turbo_j_p_e_g.html#ga10e837c07fa9d25770565b237d3898d9">More...</a><br /></td></tr>
|
||||||
<tr class="separator:ga10e837c07fa9d25770565b237d3898d9"><td class="memSeparator" colspan="2"> </td></tr>
|
<tr class="separator:ga10e837c07fa9d25770565b237d3898d9"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
<tr class="memitem:ga928beff6ac248ceadf01089fc6b41957"><td class="memItemLeft" align="right" valign="top">DLLEXPORT <a class="el" href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#ga928beff6ac248ceadf01089fc6b41957">tjInitTransform</a> (void)</td></tr>
|
<tr class="memitem:ga928beff6ac248ceadf01089fc6b41957"><td class="memItemLeft" align="right" valign="top">DLLEXPORT <a class="el" href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#ga928beff6ac248ceadf01089fc6b41957">tjInitTransform</a> (void)</td></tr>
|
||||||
<tr class="memdesc:ga928beff6ac248ceadf01089fc6b41957"><td class="mdescLeft"> </td><td class="mdescRight">Create a new TurboJPEG transformer instance. <a href="group___turbo_j_p_e_g.html#ga928beff6ac248ceadf01089fc6b41957">More...</a><br /></td></tr>
|
<tr class="memdesc:ga928beff6ac248ceadf01089fc6b41957"><td class="mdescLeft"> </td><td class="mdescRight">Create a new TurboJPEG transformer instance. <a href="group___turbo_j_p_e_g.html#ga928beff6ac248ceadf01089fc6b41957">More...</a><br /></td></tr>
|
||||||
@@ -303,16 +303,16 @@ Functions</h2></td></tr>
|
|||||||
<tr class="memdesc:ga75f355fa27225ba1a4ee392c852394d2"><td class="mdescLeft"> </td><td class="mdescRight">Destroy a TurboJPEG compressor, decompressor, or transformer instance. <a href="group___turbo_j_p_e_g.html#ga75f355fa27225ba1a4ee392c852394d2">More...</a><br /></td></tr>
|
<tr class="memdesc:ga75f355fa27225ba1a4ee392c852394d2"><td class="mdescLeft"> </td><td class="mdescRight">Destroy a TurboJPEG compressor, decompressor, or transformer instance. <a href="group___turbo_j_p_e_g.html#ga75f355fa27225ba1a4ee392c852394d2">More...</a><br /></td></tr>
|
||||||
<tr class="separator:ga75f355fa27225ba1a4ee392c852394d2"><td class="memSeparator" colspan="2"> </td></tr>
|
<tr class="separator:ga75f355fa27225ba1a4ee392c852394d2"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
<tr class="memitem:gaec627dd4c5f30b7a775a7aea3bec5d83"><td class="memItemLeft" align="right" valign="top">DLLEXPORT unsigned char * </td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#gaec627dd4c5f30b7a775a7aea3bec5d83">tjAlloc</a> (int bytes)</td></tr>
|
<tr class="memitem:gaec627dd4c5f30b7a775a7aea3bec5d83"><td class="memItemLeft" align="right" valign="top">DLLEXPORT unsigned char * </td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#gaec627dd4c5f30b7a775a7aea3bec5d83">tjAlloc</a> (int bytes)</td></tr>
|
||||||
<tr class="memdesc:gaec627dd4c5f30b7a775a7aea3bec5d83"><td class="mdescLeft"> </td><td class="mdescRight">Allocate an image buffer for use with TurboJPEG. <a href="group___turbo_j_p_e_g.html#gaec627dd4c5f30b7a775a7aea3bec5d83">More...</a><br /></td></tr>
|
<tr class="memdesc:gaec627dd4c5f30b7a775a7aea3bec5d83"><td class="mdescLeft"> </td><td class="mdescRight">Allocate a byte buffer for use with TurboJPEG. <a href="group___turbo_j_p_e_g.html#gaec627dd4c5f30b7a775a7aea3bec5d83">More...</a><br /></td></tr>
|
||||||
<tr class="separator:gaec627dd4c5f30b7a775a7aea3bec5d83"><td class="memSeparator" colspan="2"> </td></tr>
|
<tr class="separator:gaec627dd4c5f30b7a775a7aea3bec5d83"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
<tr class="memitem:gaffbd83c375e79f5db4b5c5d8ad4466e7"><td class="memItemLeft" align="right" valign="top">DLLEXPORT unsigned char * </td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#gaffbd83c375e79f5db4b5c5d8ad4466e7">tjLoadImage</a> (const char *filename, int *width, int align, int *height, int *pixelFormat, int flags)</td></tr>
|
<tr class="memitem:gaffbd83c375e79f5db4b5c5d8ad4466e7"><td class="memItemLeft" align="right" valign="top">DLLEXPORT unsigned char * </td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#gaffbd83c375e79f5db4b5c5d8ad4466e7">tjLoadImage</a> (const char *filename, int *width, int align, int *height, int *pixelFormat, int flags)</td></tr>
|
||||||
<tr class="memdesc:gaffbd83c375e79f5db4b5c5d8ad4466e7"><td class="mdescLeft"> </td><td class="mdescRight">Load an uncompressed image from disk into memory. <a href="group___turbo_j_p_e_g.html#gaffbd83c375e79f5db4b5c5d8ad4466e7">More...</a><br /></td></tr>
|
<tr class="memdesc:gaffbd83c375e79f5db4b5c5d8ad4466e7"><td class="mdescLeft"> </td><td class="mdescRight">Load a packed-pixel image from disk into memory. <a href="group___turbo_j_p_e_g.html#gaffbd83c375e79f5db4b5c5d8ad4466e7">More...</a><br /></td></tr>
|
||||||
<tr class="separator:gaffbd83c375e79f5db4b5c5d8ad4466e7"><td class="memSeparator" colspan="2"> </td></tr>
|
<tr class="separator:gaffbd83c375e79f5db4b5c5d8ad4466e7"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
<tr class="memitem:ga6f445b22d8933ae4815b3370a538d879"><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#ga6f445b22d8933ae4815b3370a538d879">tjSaveImage</a> (const char *filename, unsigned char *buffer, int width, int pitch, int height, int pixelFormat, int flags)</td></tr>
|
<tr class="memitem:ga6f445b22d8933ae4815b3370a538d879"><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#ga6f445b22d8933ae4815b3370a538d879">tjSaveImage</a> (const char *filename, unsigned char *buffer, int width, int pitch, int height, int pixelFormat, int flags)</td></tr>
|
||||||
<tr class="memdesc:ga6f445b22d8933ae4815b3370a538d879"><td class="mdescLeft"> </td><td class="mdescRight">Save an uncompressed image from memory to disk. <a href="group___turbo_j_p_e_g.html#ga6f445b22d8933ae4815b3370a538d879">More...</a><br /></td></tr>
|
<tr class="memdesc:ga6f445b22d8933ae4815b3370a538d879"><td class="mdescLeft"> </td><td class="mdescRight">Save a packed-pixel image from memory to disk. <a href="group___turbo_j_p_e_g.html#ga6f445b22d8933ae4815b3370a538d879">More...</a><br /></td></tr>
|
||||||
<tr class="separator:ga6f445b22d8933ae4815b3370a538d879"><td class="memSeparator" colspan="2"> </td></tr>
|
<tr class="separator:ga6f445b22d8933ae4815b3370a538d879"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
<tr class="memitem:gaea863d2da0cdb609563aabdf9196514b"><td class="memItemLeft" align="right" valign="top">DLLEXPORT void </td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#gaea863d2da0cdb609563aabdf9196514b">tjFree</a> (unsigned char *buffer)</td></tr>
|
<tr class="memitem:gaea863d2da0cdb609563aabdf9196514b"><td class="memItemLeft" align="right" valign="top">DLLEXPORT void </td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#gaea863d2da0cdb609563aabdf9196514b">tjFree</a> (unsigned char *buffer)</td></tr>
|
||||||
<tr class="memdesc:gaea863d2da0cdb609563aabdf9196514b"><td class="mdescLeft"> </td><td class="mdescRight">Free an image buffer previously allocated by TurboJPEG. <a href="group___turbo_j_p_e_g.html#gaea863d2da0cdb609563aabdf9196514b">More...</a><br /></td></tr>
|
<tr class="memdesc:gaea863d2da0cdb609563aabdf9196514b"><td class="mdescLeft"> </td><td class="mdescRight">Free a byte buffer previously allocated by TurboJPEG. <a href="group___turbo_j_p_e_g.html#gaea863d2da0cdb609563aabdf9196514b">More...</a><br /></td></tr>
|
||||||
<tr class="separator:gaea863d2da0cdb609563aabdf9196514b"><td class="memSeparator" colspan="2"> </td></tr>
|
<tr class="separator:gaea863d2da0cdb609563aabdf9196514b"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
<tr class="memitem:ga1ead8574f9f39fbafc6b497124e7aafa"><td class="memItemLeft" align="right" valign="top">DLLEXPORT char * </td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#ga1ead8574f9f39fbafc6b497124e7aafa">tjGetErrorStr2</a> (<a class="el" href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> handle)</td></tr>
|
<tr class="memitem:ga1ead8574f9f39fbafc6b497124e7aafa"><td class="memItemLeft" align="right" valign="top">DLLEXPORT char * </td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#ga1ead8574f9f39fbafc6b497124e7aafa">tjGetErrorStr2</a> (<a class="el" href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> handle)</td></tr>
|
||||||
<tr class="memdesc:ga1ead8574f9f39fbafc6b497124e7aafa"><td class="mdescLeft"> </td><td class="mdescRight">Returns a descriptive error message explaining why the last command failed. <a href="group___turbo_j_p_e_g.html#ga1ead8574f9f39fbafc6b497124e7aafa">More...</a><br /></td></tr>
|
<tr class="memdesc:ga1ead8574f9f39fbafc6b497124e7aafa"><td class="mdescLeft"> </td><td class="mdescRight">Returns a descriptive error message explaining why the last command failed. <a href="group___turbo_j_p_e_g.html#ga1ead8574f9f39fbafc6b497124e7aafa">More...</a><br /></td></tr>
|
||||||
@@ -352,8 +352,8 @@ Variables</h2></td></tr>
|
|||||||
<h2><a class="anchor" id="autotoc_md0"></a>
|
<h2><a class="anchor" id="autotoc_md0"></a>
|
||||||
YUV Image Format Notes</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 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>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 (1 in the case of 4:4:4, grayscale, or 4:4:0; 2 in the case of 4:2:2 or 4:2:0; 4 in the case of 4:1:1.) Similarly, the luminance plane height is the image height padded to the nearest multiple of the vertical subsampling factor (1 in the case of 4:4:4, 4:2:2, grayscale, or 4:1:1; 2 in the case of 4:2:0 or 4:4:0.) 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 row alignment 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 id="ga39f57a6fb02d9cf32e7b6890099b5a71"></a>
|
<a id="ga39f57a6fb02d9cf32e7b6890099b5a71"></a>
|
||||||
<h2 class="memtitle"><span class="permalink"><a href="#ga39f57a6fb02d9cf32e7b6890099b5a71">◆ </a></span>TJ_NUMCS</h2>
|
<h2 class="memtitle"><span class="permalink"><a href="#ga39f57a6fb02d9cf32e7b6890099b5a71">◆ </a></span>TJ_NUMCS</h2>
|
||||||
@@ -447,8 +447,8 @@ YUV Image Format Notes</h2>
|
|||||||
</table>
|
</table>
|
||||||
</div><div class="memdoc">
|
</div><div class="memdoc">
|
||||||
|
|
||||||
<p>Use the most accurate DCT/IDCT algorithm available in the underlying codec. </p>
|
<p>Use the most accurate DCT/IDCT algorithm available. </p>
|
||||||
<p>The default if this flag is not specified is implementation-specific. For example, the implementation of TurboJPEG for libjpeg[-turbo] uses the fast algorithm by default when compressing, because this has been shown to have only a very slight effect on accuracy, but it uses the accurate algorithm when decompressing, because this has been shown to have a larger effect. </p>
|
<p>The default if this flag is not specified is implementation-specific. For example, the implementation of the TurboJPEG API in libjpeg-turbo uses the fast algorithm by default when compressing, because this has been shown to have only a very slight effect on accuracy, but it uses the accurate algorithm when decompressing, because this has been shown to have a larger effect. </p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -464,7 +464,7 @@ YUV Image Format Notes</h2>
|
|||||||
</table>
|
</table>
|
||||||
</div><div class="memdoc">
|
</div><div class="memdoc">
|
||||||
|
|
||||||
<p>The uncompressed source/destination image is stored in bottom-up (Windows, OpenGL) order, not top-down (X11) order. </p>
|
<p>Rows in the packed-pixel source/destination image are stored in bottom-up (Windows, OpenGL) order rather than in top-down (X11) order. </p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -480,8 +480,8 @@ YUV Image Format Notes</h2>
|
|||||||
</table>
|
</table>
|
||||||
</div><div class="memdoc">
|
</div><div class="memdoc">
|
||||||
|
|
||||||
<p>Use the fastest DCT/IDCT algorithm available in the underlying codec. </p>
|
<p>Use the fastest DCT/IDCT algorithm available. </p>
|
||||||
<p>The default if this flag is not specified is implementation-specific. For example, the implementation of TurboJPEG for libjpeg[-turbo] uses the fast algorithm by default when compressing, because this has been shown to have only a very slight effect on accuracy, but it uses the accurate algorithm when decompressing, because this has been shown to have a larger effect. </p>
|
<p>The default if this flag is not specified is implementation-specific. For example, the implementation of the TurboJPEG API in libjpeg-turbo uses the fast algorithm by default when compressing, because this has been shown to have only a very slight effect on accuracy, but it uses the accurate algorithm when decompressing, because this has been shown to have a larger effect. </p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -497,7 +497,7 @@ YUV Image Format Notes</h2>
|
|||||||
</table>
|
</table>
|
||||||
</div><div class="memdoc">
|
</div><div class="memdoc">
|
||||||
|
|
||||||
<p>When decompressing an image that was compressed using chrominance subsampling, use the fastest chrominance upsampling algorithm available in the underlying codec. </p>
|
<p>When decompressing an image that was compressed using chrominance subsampling, use the fastest chrominance upsampling algorithm available. </p>
|
||||||
<p>The default is to use smooth upsampling, which creates a smooth transition between neighboring chrominance components in order to reduce upsampling artifacts in the decompressed image. </p>
|
<p>The default is to use smooth upsampling, which creates a smooth transition between neighboring chrominance components in order to reduce upsampling artifacts in the decompressed image. </p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -531,8 +531,8 @@ YUV Image Format Notes</h2>
|
|||||||
</table>
|
</table>
|
||||||
</div><div class="memdoc">
|
</div><div class="memdoc">
|
||||||
|
|
||||||
<p>Disable buffer (re)allocation. </p>
|
<p>Disable JPEG buffer (re)allocation. </p>
|
||||||
<p>If passed to one of the JPEG compression or transform functions, this flag will cause those functions to generate an error if the JPEG image buffer is invalid or too small rather than attempting to allocate or reallocate that buffer. This reproduces the behavior of earlier versions of TurboJPEG. </p>
|
<p>If passed to one of the JPEG compression or transform functions, this flag will cause those functions to generate an error if the JPEG destination buffer is invalid or too small, rather than attempt to allocate or reallocate that buffer. </p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -565,7 +565,7 @@ YUV Image Format Notes</h2>
|
|||||||
</table>
|
</table>
|
||||||
</div><div class="memdoc">
|
</div><div class="memdoc">
|
||||||
|
|
||||||
<p>Immediately discontinue the current compression/decompression/transform operation if the underlying codec throws a warning (non-fatal error). </p>
|
<p>Immediately discontinue the current compression/decompression/transform operation if a warning (non-fatal error) occurs. </p>
|
||||||
<p>The default behavior is to allow the operation to complete unless a fatal error is encountered. </p>
|
<p>The default behavior is to allow the operation to complete unless a fatal error is encountered. </p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -586,7 +586,7 @@ YUV Image Format Notes</h2>
|
|||||||
</table>
|
</table>
|
||||||
</div><div class="memdoc">
|
</div><div class="memdoc">
|
||||||
|
|
||||||
<p>Pad the given width to the nearest 32-bit boundary. </p>
|
<p>Pad the given width to the nearest multiple of 4. </p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -633,7 +633,7 @@ YUV Image Format Notes</h2>
|
|||||||
</table>
|
</table>
|
||||||
</div><div class="memdoc">
|
</div><div class="memdoc">
|
||||||
|
|
||||||
<p>This option will prevent <a class="el" href="group___turbo_j_p_e_g.html#ga9cb8abf4cc91881e04a0329b2270be25" title="Losslessly transform a JPEG image into another JPEG image.">tjTransform()</a> from copying any extra markers (including EXIF and ICC profile data) from the source image to the output image. </p>
|
<p>This option will prevent <a class="el" href="group___turbo_j_p_e_g.html#ga9cb8abf4cc91881e04a0329b2270be25" title="Losslessly transform a JPEG image into another JPEG image.">tjTransform()</a> from copying any extra markers (including EXIF and ICC profile data) from the source image to the destination image. </p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -666,7 +666,7 @@ YUV Image Format Notes</h2>
|
|||||||
</table>
|
</table>
|
||||||
</div><div class="memdoc">
|
</div><div class="memdoc">
|
||||||
|
|
||||||
<p>This option will discard the color data in the input image and produce a grayscale output image. </p>
|
<p>This option will discard the color data in the source image and produce a grayscale destination image. </p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -682,7 +682,8 @@ YUV Image Format Notes</h2>
|
|||||||
</table>
|
</table>
|
||||||
</div><div class="memdoc">
|
</div><div class="memdoc">
|
||||||
|
|
||||||
<p>This option will prevent <a class="el" href="group___turbo_j_p_e_g.html#ga9cb8abf4cc91881e04a0329b2270be25" title="Losslessly transform a JPEG image into another JPEG image.">tjTransform()</a> from outputting a JPEG image for this particular transform (this can be used in conjunction with a custom filter to capture the transformed DCT coefficients without transcoding them.) </p>
|
<p>This option will prevent <a class="el" href="group___turbo_j_p_e_g.html#ga9cb8abf4cc91881e04a0329b2270be25" title="Losslessly transform a JPEG image into another JPEG image.">tjTransform()</a> from outputting a JPEG image for this particular transform. </p>
|
||||||
|
<p>(This can be used in conjunction with a custom filter to capture the transformed DCT coefficients without transcoding them.) </p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -715,7 +716,7 @@ YUV Image Format Notes</h2>
|
|||||||
</table>
|
</table>
|
||||||
</div><div class="memdoc">
|
</div><div class="memdoc">
|
||||||
|
|
||||||
<p>This option will enable progressive entropy coding in the output image generated by this particular transform. </p>
|
<p>This option will enable progressive entropy coding in the JPEG image generated by this particular transform. </p>
|
||||||
<p>Progressive entropy coding will generally improve compression relative to baseline entropy coding (the default), but it will reduce compression and decompression performance considerably. </p>
|
<p>Progressive entropy coding will generally improve compression relative to baseline entropy coding (the default), but it will reduce compression and decompression performance considerably. </p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -785,19 +786,19 @@ YUV Image Format Notes</h2>
|
|||||||
<p>JPEG colorspaces. </p>
|
<p>JPEG colorspaces. </p>
|
||||||
<table class="fieldtable">
|
<table class="fieldtable">
|
||||||
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="gga4f83ad3368e0e29d1957be0efa7c3720a677cb7ccb85c4038ac41964a2e09e555"></a>TJCS_RGB </td><td class="fielddoc"><p>RGB colorspace. </p>
|
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="gga4f83ad3368e0e29d1957be0efa7c3720a677cb7ccb85c4038ac41964a2e09e555"></a>TJCS_RGB </td><td class="fielddoc"><p>RGB colorspace. </p>
|
||||||
<p>When compressing the JPEG image, the R, G, and B components in the source image are reordered into image planes, but no colorspace conversion or subsampling is performed. RGB JPEG images can be decompressed to any of the extended RGB pixel formats or grayscale, but they cannot be decompressed to YUV images. </p>
|
<p>When compressing the JPEG image, the R, G, and B components in the source image are reordered into image planes, but no colorspace conversion or subsampling is performed. RGB JPEG images can be decompressed to packed-pixel images with any of the extended RGB or grayscale pixel formats, but they cannot be decompressed to planar YUV images. </p>
|
||||||
</td></tr>
|
</td></tr>
|
||||||
<tr><td class="fieldname"><a id="gga4f83ad3368e0e29d1957be0efa7c3720a7389b8f65bb387ffedce3efd0d78ec75"></a>TJCS_YCbCr </td><td class="fielddoc"><p>YCbCr colorspace. </p>
|
<tr><td class="fieldname"><a id="gga4f83ad3368e0e29d1957be0efa7c3720a7389b8f65bb387ffedce3efd0d78ec75"></a>TJCS_YCbCr </td><td class="fielddoc"><p>YCbCr colorspace. </p>
|
||||||
<p>YCbCr is not an absolute colorspace but rather a mathematical transformation of RGB designed solely for storage and transmission. YCbCr images must be converted to RGB before they can actually be displayed. In the YCbCr colorspace, the Y (luminance) component represents the black & white portion of the original image, and the Cb and Cr (chrominance) components represent the color portion of the original image. Originally, the analog equivalent of this transformation allowed the same signal to drive both black & white and color televisions, but JPEG images use YCbCr primarily because it allows the color data to be optionally subsampled for the purposes of reducing bandwidth or disk space. YCbCr is the most common JPEG colorspace, and YCbCr JPEG images can be compressed from and decompressed to any of the extended RGB pixel formats or grayscale, or they can be decompressed to YUV planar images. </p>
|
<p>YCbCr is not an absolute colorspace but rather a mathematical transformation of RGB designed solely for storage and transmission. YCbCr images must be converted to RGB before they can actually be displayed. In the YCbCr colorspace, the Y (luminance) component represents the black & white portion of the original image, and the Cb and Cr (chrominance) components represent the color portion of the original image. Originally, the analog equivalent of this transformation allowed the same signal to drive both black & white and color televisions, but JPEG images use YCbCr primarily because it allows the color data to be optionally subsampled for the purposes of reducing network or disk usage. YCbCr is the most common JPEG colorspace, and YCbCr JPEG images can be compressed from and decompressed to packed-pixel images with any of the extended RGB or grayscale pixel formats. YCbCr JPEG images can also be compressed from and decompressed to planar YUV images. </p>
|
||||||
</td></tr>
|
</td></tr>
|
||||||
<tr><td class="fieldname"><a id="gga4f83ad3368e0e29d1957be0efa7c3720ab3e7d6a87f695e45b81c1b5262b5a50a"></a>TJCS_GRAY </td><td class="fielddoc"><p>Grayscale colorspace. </p>
|
<tr><td class="fieldname"><a id="gga4f83ad3368e0e29d1957be0efa7c3720ab3e7d6a87f695e45b81c1b5262b5a50a"></a>TJCS_GRAY </td><td class="fielddoc"><p>Grayscale colorspace. </p>
|
||||||
<p>The JPEG image retains only the luminance data (Y component), and any color data from the source image is discarded. Grayscale JPEG images can be compressed from and decompressed to any of the extended RGB pixel formats or grayscale, or they can be decompressed to YUV planar images. </p>
|
<p>The JPEG image retains only the luminance data (Y component), and any color data from the source image is discarded. Grayscale JPEG images can be compressed from and decompressed to packed-pixel images with any of the extended RGB or grayscale pixel formats, or they can be compressed from and decompressed to planar YUV images. </p>
|
||||||
</td></tr>
|
</td></tr>
|
||||||
<tr><td class="fieldname"><a id="gga4f83ad3368e0e29d1957be0efa7c3720a6c8b636152ac8195b869587db315ee53"></a>TJCS_CMYK </td><td class="fielddoc"><p>CMYK colorspace. </p>
|
<tr><td class="fieldname"><a id="gga4f83ad3368e0e29d1957be0efa7c3720a6c8b636152ac8195b869587db315ee53"></a>TJCS_CMYK </td><td class="fielddoc"><p>CMYK colorspace. </p>
|
||||||
<p>When compressing the JPEG image, the C, M, Y, and K components in the source image are reordered into image planes, but no colorspace conversion or subsampling is performed. CMYK JPEG images can only be decompressed to CMYK pixels. </p>
|
<p>When compressing the JPEG image, the C, M, Y, and K components in the source image are reordered into image planes, but no colorspace conversion or subsampling is performed. CMYK JPEG images can only be decompressed to packed-pixel images with the CMYK pixel format. </p>
|
||||||
</td></tr>
|
</td></tr>
|
||||||
<tr><td class="fieldname"><a id="gga4f83ad3368e0e29d1957be0efa7c3720a53839e0fe867b76b58d16b0a1a7c598e"></a>TJCS_YCCK </td><td class="fielddoc"><p>YCCK colorspace. </p>
|
<tr><td class="fieldname"><a id="gga4f83ad3368e0e29d1957be0efa7c3720a53839e0fe867b76b58d16b0a1a7c598e"></a>TJCS_YCCK </td><td class="fielddoc"><p>YCCK colorspace. </p>
|
||||||
<p>YCCK (AKA "YCbCrK") is not an absolute colorspace but rather a mathematical transformation of CMYK designed solely for storage and transmission. It is to CMYK as YCbCr is to RGB. CMYK pixels can be reversibly transformed into YCCK, and as with YCbCr, the chrominance components in the YCCK pixels can be subsampled without incurring major perceptual loss. YCCK JPEG images can only be compressed from and decompressed to CMYK pixels. </p>
|
<p>YCCK (AKA "YCbCrK") is not an absolute colorspace but rather a mathematical transformation of CMYK designed solely for storage and transmission. It is to CMYK as YCbCr is to RGB. CMYK pixels can be reversibly transformed into YCCK, and as with YCbCr, the chrominance components in the YCCK pixels can be subsampled without incurring major perceptual loss. YCCK JPEG images can only be compressed from and decompressed to packed-pixel images with the CMYK pixel format. </p>
|
||||||
</td></tr>
|
</td></tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
@@ -817,7 +818,7 @@ YUV Image Format Notes</h2>
|
|||||||
|
|
||||||
<p>Error codes. </p>
|
<p>Error codes. </p>
|
||||||
<table class="fieldtable">
|
<table class="fieldtable">
|
||||||
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="ggafbc17cfa57d0d5d11fea35ac025950fea342dd6e2aedb47bb257b4e7568329b59"></a>TJERR_WARNING </td><td class="fielddoc"><p>The error was non-fatal and recoverable, but the image may still be corrupt. </p>
|
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="ggafbc17cfa57d0d5d11fea35ac025950fea342dd6e2aedb47bb257b4e7568329b59"></a>TJERR_WARNING </td><td class="fielddoc"><p>The error was non-fatal and recoverable, but the destination image may still be corrupt. </p>
|
||||||
</td></tr>
|
</td></tr>
|
||||||
<tr><td class="fieldname"><a id="ggafbc17cfa57d0d5d11fea35ac025950feafc9cceeada13122b09e4851e3788039a"></a>TJERR_FATAL </td><td class="fielddoc"><p>The error was fatal and non-recoverable. </p>
|
<tr><td class="fieldname"><a id="ggafbc17cfa57d0d5d11fea35ac025950feafc9cceeada13122b09e4851e3788039a"></a>TJERR_FATAL </td><td class="fielddoc"><p>The error was fatal and non-recoverable. </p>
|
||||||
</td></tr>
|
</td></tr>
|
||||||
@@ -873,10 +874,10 @@ YUV Image Format Notes</h2>
|
|||||||
<p>This is the same as <a class="el" href="group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aadae996905efcfa3b42a0bb3bea7f9d84">TJPF_XRGB</a>, except that when decompressing, the X component is guaranteed to be 0xFF, which can be interpreted as an opaque alpha channel. </p>
|
<p>This is the same as <a class="el" href="group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aadae996905efcfa3b42a0bb3bea7f9d84">TJPF_XRGB</a>, except that when decompressing, the X component is guaranteed to be 0xFF, which can be interpreted as an opaque alpha channel. </p>
|
||||||
</td></tr>
|
</td></tr>
|
||||||
<tr><td class="fieldname"><a id="ggac916144e26c3817ac514e64ae5d12e2aa7f5100ec44c91994e243f1cf55553f8b"></a>TJPF_CMYK </td><td class="fielddoc"><p>CMYK pixel format. </p>
|
<tr><td class="fieldname"><a id="ggac916144e26c3817ac514e64ae5d12e2aa7f5100ec44c91994e243f1cf55553f8b"></a>TJPF_CMYK </td><td class="fielddoc"><p>CMYK pixel format. </p>
|
||||||
<p>Unlike RGB, which is an additive color model used primarily for display, CMYK (Cyan/Magenta/Yellow/Key) is a subtractive color model used primarily for printing. In the CMYK color model, the value of each color component typically corresponds to an amount of cyan, magenta, yellow, or black ink that is applied to a white background. In order to convert between CMYK and RGB, it is necessary to use a color management system (CMS.) A CMS will attempt to map colors within the printer's gamut to perceptually similar colors in the display's gamut and vice versa, but the mapping is typically not 1:1 or reversible, nor can it be defined with a simple formula. Thus, such a conversion is out of scope for a codec library. However, the TurboJPEG API allows for compressing CMYK pixels into a YCCK JPEG image (see <a class="el" href="group___turbo_j_p_e_g.html#gga4f83ad3368e0e29d1957be0efa7c3720a53839e0fe867b76b58d16b0a1a7c598e" title="YCCK colorspace.">TJCS_YCCK</a>) and decompressing YCCK JPEG images into CMYK pixels. </p>
|
<p>Unlike RGB, which is an additive color model used primarily for display, CMYK (Cyan/Magenta/Yellow/Key) is a subtractive color model used primarily for printing. In the CMYK color model, the value of each color component typically corresponds to an amount of cyan, magenta, yellow, or black ink that is applied to a white background. In order to convert between CMYK and RGB, it is necessary to use a color management system (CMS.) A CMS will attempt to map colors within the printer's gamut to perceptually similar colors in the display's gamut and vice versa, but the mapping is typically not 1:1 or reversible, nor can it be defined with a simple formula. Thus, such a conversion is out of scope for a codec library. However, the TurboJPEG API allows for compressing packed-pixel CMYK images into YCCK JPEG images (see <a class="el" href="group___turbo_j_p_e_g.html#gga4f83ad3368e0e29d1957be0efa7c3720a53839e0fe867b76b58d16b0a1a7c598e" title="YCCK colorspace.">TJCS_YCCK</a>) and decompressing YCCK JPEG images into packed-pixel CMYK images. </p>
|
||||||
</td></tr>
|
</td></tr>
|
||||||
<tr><td class="fieldname"><a id="ggac916144e26c3817ac514e64ae5d12e2aa84c1a6cead7952998e2fb895844a21ed"></a>TJPF_UNKNOWN </td><td class="fielddoc"><p>Unknown pixel format. </p>
|
<tr><td class="fieldname"><a id="ggac916144e26c3817ac514e64ae5d12e2aa84c1a6cead7952998e2fb895844a21ed"></a>TJPF_UNKNOWN </td><td class="fielddoc"><p>Unknown pixel format. </p>
|
||||||
<p>Currently this is only used by <a class="el" href="group___turbo_j_p_e_g.html#gaffbd83c375e79f5db4b5c5d8ad4466e7" title="Load an uncompressed image from disk into memory.">tjLoadImage()</a>. </p>
|
<p>Currently this is only used by <a class="el" href="group___turbo_j_p_e_g.html#gaffbd83c375e79f5db4b5c5d8ad4466e7" title="Load a packed-pixel image from disk into memory.">tjLoadImage()</a>. </p>
|
||||||
</td></tr>
|
</td></tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
@@ -895,7 +896,7 @@ YUV Image Format Notes</h2>
|
|||||||
</div><div class="memdoc">
|
</div><div class="memdoc">
|
||||||
|
|
||||||
<p>Chrominance subsampling options. </p>
|
<p>Chrominance subsampling options. </p>
|
||||||
<p>When pixels are converted from RGB to YCbCr (see <a class="el" href="group___turbo_j_p_e_g.html#gga4f83ad3368e0e29d1957be0efa7c3720a7389b8f65bb387ffedce3efd0d78ec75" title="YCbCr colorspace.">TJCS_YCbCr</a>) or from CMYK to YCCK (see <a class="el" href="group___turbo_j_p_e_g.html#gga4f83ad3368e0e29d1957be0efa7c3720a53839e0fe867b76b58d16b0a1a7c598e" title="YCCK colorspace.">TJCS_YCCK</a>) as part of the JPEG compression process, some of the Cb and Cr (chrominance) components can be discarded or averaged together to produce a smaller image with little perceptible loss of image clarity (the human eye is more sensitive to small changes in brightness than to small changes in color.) This is called "chrominance subsampling". </p>
|
<p>When pixels are converted from RGB to YCbCr (see <a class="el" href="group___turbo_j_p_e_g.html#gga4f83ad3368e0e29d1957be0efa7c3720a7389b8f65bb387ffedce3efd0d78ec75" title="YCbCr colorspace.">TJCS_YCbCr</a>) or from CMYK to YCCK (see <a class="el" href="group___turbo_j_p_e_g.html#gga4f83ad3368e0e29d1957be0efa7c3720a53839e0fe867b76b58d16b0a1a7c598e" title="YCCK colorspace.">TJCS_YCCK</a>) as part of the JPEG compression process, some of the Cb and Cr (chrominance) components can be discarded or averaged together to produce a smaller image with little perceptible loss of image clarity. (The human eye is more sensitive to small changes in brightness than to small changes in color.) This is called "chrominance subsampling". </p>
|
||||||
<table class="fieldtable">
|
<table class="fieldtable">
|
||||||
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="gga1d047060ea80bb9820d540bb928e9074afb8da4f44197837bdec0a4f593dacae3"></a>TJSAMP_444 </td><td class="fielddoc"><p>4:4:4 chrominance subsampling (no chrominance subsampling). </p>
|
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="gga1d047060ea80bb9820d540bb928e9074afb8da4f44197837bdec0a4f593dacae3"></a>TJSAMP_444 </td><td class="fielddoc"><p>4:4:4 chrominance subsampling (no chrominance subsampling). </p>
|
||||||
<p>The JPEG or YUV image will contain one chrominance component for every pixel in the source image. </p>
|
<p>The JPEG or YUV image will contain one chrominance component for every pixel in the source image. </p>
|
||||||
@@ -977,8 +978,8 @@ YUV Image Format Notes</h2>
|
|||||||
</table>
|
</table>
|
||||||
</div><div class="memdoc">
|
</div><div class="memdoc">
|
||||||
|
|
||||||
<p>Allocate an image buffer for use with TurboJPEG. </p>
|
<p>Allocate a byte buffer for use with TurboJPEG. </p>
|
||||||
<p>You should always use this function to allocate the JPEG destination buffer(s) for the compression and transform functions unless you are disabling automatic buffer (re)allocation (by setting <a class="el" href="group___turbo_j_p_e_g.html#ga8808d403c68b62aaa58a4c1e58e98963" title="Disable buffer (re)allocation.">TJFLAG_NOREALLOC</a>.)</p>
|
<p>You should always use this function to allocate the JPEG destination buffer(s) for the compression and transform functions unless you are disabling automatic buffer (re)allocation (by setting <a class="el" href="group___turbo_j_p_e_g.html#ga8808d403c68b62aaa58a4c1e58e98963" title="Disable JPEG buffer (re)allocation.">TJFLAG_NOREALLOC</a>.)</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">bytes</td><td>the number of bytes to allocate</td></tr>
|
<tr><td class="paramname">bytes</td><td>the number of bytes to allocate</td></tr>
|
||||||
@@ -986,7 +987,7 @@ YUV Image Format Notes</h2>
|
|||||||
</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#gaea863d2da0cdb609563aabdf9196514b" 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#gaea863d2da0cdb609563aabdf9196514b" title="Free a byte buffer previously allocated by TurboJPEG.">tjFree()</a> </dd></dl>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -1023,7 +1024,7 @@ YUV Image Format Notes</h2>
|
|||||||
</div><div class="memdoc">
|
</div><div class="memdoc">
|
||||||
|
|
||||||
<p>The maximum size of the buffer (in bytes) required to hold a JPEG image with the given parameters. </p>
|
<p>The maximum size of the buffer (in bytes) required to hold a JPEG image with the given parameters. </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>
|
<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, so it is possible for a very high-quality source image with very high-frequency content to expand rather than compress when converted to the JPEG format. Such images represent very rare corner cases, but since there is no way to predict the size of a JPEG image prior to compression, the corner cases have 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 (in pixels) of the image</td></tr>
|
<tr><td class="paramname">width</td><td>width (in pixels) of the image</td></tr>
|
||||||
@@ -1036,8 +1037,8 @@ YUV Image Format Notes</h2>
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a id="ga2be2b9969d4df9ecce9b05deed273194"></a>
|
<a id="ga5e5aac9e8bcf17049279301e2466474c"></a>
|
||||||
<h2 class="memtitle"><span class="permalink"><a href="#ga2be2b9969d4df9ecce9b05deed273194">◆ </a></span>tjBufSizeYUV2()</h2>
|
<h2 class="memtitle"><span class="permalink"><a href="#ga5e5aac9e8bcf17049279301e2466474c">◆ </a></span>tjBufSizeYUV2()</h2>
|
||||||
|
|
||||||
<div class="memitem">
|
<div class="memitem">
|
||||||
<div class="memproto">
|
<div class="memproto">
|
||||||
@@ -1052,7 +1053,7 @@ YUV Image Format Notes</h2>
|
|||||||
<td class="paramkey"></td>
|
<td class="paramkey"></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td class="paramtype">int </td>
|
<td class="paramtype">int </td>
|
||||||
<td class="paramname"><em>pad</em>, </td>
|
<td class="paramname"><em>align</em>, </td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="paramkey"></td>
|
<td class="paramkey"></td>
|
||||||
@@ -1074,11 +1075,11 @@ YUV Image Format Notes</h2>
|
|||||||
</table>
|
</table>
|
||||||
</div><div class="memdoc">
|
</div><div class="memdoc">
|
||||||
|
|
||||||
<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 unified planar YUV 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 (in pixels) of the image</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">align</td><td>row alignment (in bytes) of the image (must be a power of 2.) Setting this parameter to n specifies that each row in each plane of the image will be padded to the nearest multiple of n bytes (1 = unpadded.)</td></tr>
|
||||||
<tr><td class="paramname">height</td><td>height (in pixels) of the image</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>
|
||||||
@@ -1168,22 +1169,22 @@ YUV Image Format Notes</h2>
|
|||||||
</table>
|
</table>
|
||||||
</div><div class="memdoc">
|
</div><div class="memdoc">
|
||||||
|
|
||||||
<p>Compress an RGB, grayscale, or CMYK image into a JPEG image. </p>
|
<p>Compress a packed-pixel RGB, grayscale, or CMYK image into a JPEG image. </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 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 a buffer containing a packed-pixel RGB, grayscale, or CMYK source image 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 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">pitch</td><td>bytes per row 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 multiple of 4.">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 row of the image is padded to the nearest multiple of 4 bytes, as is the case for Windows bitmaps. You can also be clever and use this parameter to skip rows, 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 a byte 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">
|
||||||
<li>pre-allocate the JPEG buffer with an arbitrary size using <a class="el" href="group___turbo_j_p_e_g.html#gaec627dd4c5f30b7a775a7aea3bec5d83" 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#gaec627dd4c5f30b7a775a7aea3bec5d83" title="Allocate a byte buffer for use with TurboJPEG.">tjAlloc()</a> and let TurboJPEG grow the buffer as needed,</li>
|
||||||
<li>set <code>*jpegBuf</code> to NULL to tell TurboJPEG to allocate the buffer for you, or</li>
|
<li>set <code>*jpegBuf</code> to NULL to tell TurboJPEG to allocate the buffer for you, or</li>
|
||||||
<li>pre-allocate the buffer to a "worst case" size determined by calling <a class="el" href="group___turbo_j_p_e_g.html#ga67ac12fee79073242cb216e07c9f1f90" title="The maximum size of the buffer (in bytes) required to hold a JPEG image with the given parameters.">tjBufSize()</a>. This should ensure that the buffer never has to be re-allocated (setting <a class="el" href="group___turbo_j_p_e_g.html#ga8808d403c68b62aaa58a4c1e58e98963" title="Disable buffer (re)allocation.">TJFLAG_NOREALLOC</a> guarantees that it won't be.)</li>
|
<li>pre-allocate the buffer to a "worst case" size determined by calling <a class="el" href="group___turbo_j_p_e_g.html#ga67ac12fee79073242cb216e07c9f1f90" title="The maximum size of the buffer (in bytes) required to hold a JPEG image with the given parameters.">tjBufSize()</a>. This should ensure that the buffer never has to be re-allocated. (Setting <a class="el" href="group___turbo_j_p_e_g.html#ga8808d403c68b62aaa58a4c1e58e98963" title="Disable JPEG buffer (re)allocation.">TJFLAG_NOREALLOC</a> guarantees that it won't be.)</li>
|
||||||
</ol>
|
</ol>
|
||||||
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, then <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 JPEG 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.) If <code>*jpegBuf</code> points to a JPEG image buffer that is being reused from a previous call to one of the JPEG compression functions, then <code>*jpegSize</code> is ignored.</td></tr>
|
<tr><td class="paramname">jpegSize</td><td>pointer to an unsigned long variable that holds the size of the JPEG 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.) If <code>*jpegBuf</code> points to a JPEG buffer that is being reused from a previous call to one of the JPEG compression functions, then <code>*jpegSize</code> is ignored.</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#gacb233cfd722d66d1ccbf48a7de81f0e0">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#gacb233cfd722d66d1ccbf48a7de81f0e0">flags</a></td></tr>
|
||||||
@@ -1194,8 +1195,8 @@ If you choose option 1, <code>*jpegSize</code> should be set to the size of your
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a id="ga7622a459b79aa1007e005b58783f875b"></a>
|
<a id="gab40f5096a72fd7e5bda9d6b58fa37e2e"></a>
|
||||||
<h2 class="memtitle"><span class="permalink"><a href="#ga7622a459b79aa1007e005b58783f875b">◆ </a></span>tjCompressFromYUV()</h2>
|
<h2 class="memtitle"><span class="permalink"><a href="#gab40f5096a72fd7e5bda9d6b58fa37e2e">◆ </a></span>tjCompressFromYUV()</h2>
|
||||||
|
|
||||||
<div class="memitem">
|
<div class="memitem">
|
||||||
<div class="memproto">
|
<div class="memproto">
|
||||||
@@ -1222,7 +1223,7 @@ If you choose option 1, <code>*jpegSize</code> should be set to the size of your
|
|||||||
<td class="paramkey"></td>
|
<td class="paramkey"></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td class="paramtype">int </td>
|
<td class="paramtype">int </td>
|
||||||
<td class="paramname"><em>pad</em>, </td>
|
<td class="paramname"><em>align</em>, </td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="paramkey"></td>
|
<td class="paramkey"></td>
|
||||||
@@ -1268,22 +1269,22 @@ If you choose option 1, <code>*jpegSize</code> should be set to the size of your
|
|||||||
</table>
|
</table>
|
||||||
</div><div class="memdoc">
|
</div><div class="memdoc">
|
||||||
|
|
||||||
<p>Compress a YUV planar image into a JPEG image. </p>
|
<p>Compress a unified planar YUV image into a JPEG image. </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 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 a YUV planar image to be compressed. The size of this buffer should match the value returned by <a class="el" href="group___turbo_j_p_e_g.html#ga2be2b9969d4df9ecce9b05deed273194" title="The size of the buffer (in bytes) required to hold a YUV planar image with the given parameters.">tjBufSizeYUV2()</a> for the given image width, height, padding, and level of chrominance subsampling. The Y, U (Cb), and V (Cr) image planes should be stored sequentially in the source 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">srcBuf</td><td>pointer to a buffer containing a unified planar YUV source image to be compressed. The size of this buffer should match the value returned by <a class="el" href="group___turbo_j_p_e_g.html#ga5e5aac9e8bcf17049279301e2466474c" title="The size of the buffer (in bytes) required to hold a unified planar YUV image with the given paramete...">tjBufSizeYUV2()</a> for the given image width, height, row alignment, and level of chrominance subsampling. The Y, U (Cb), and V (Cr) image planes should 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">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.</td></tr>
|
||||||
<tr><td class="paramname">pad</td><td>the line padding used in the source image (must be a power of 2.) For instance, if each line in each plane of the YUV image is padded to the nearest multiple of 4 bytes, then <code>pad</code> should be set to 4.</td></tr>
|
<tr><td class="paramname">align</td><td>row alignment (in bytes) of the source image (must be a power of 2.) Setting this parameter to n indicates that each row in each plane of the source image is padded to the nearest multiple of n bytes (1 = unpadded.)</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.</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 a byte 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">
|
||||||
<li>pre-allocate the JPEG buffer with an arbitrary size using <a class="el" href="group___turbo_j_p_e_g.html#gaec627dd4c5f30b7a775a7aea3bec5d83" 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#gaec627dd4c5f30b7a775a7aea3bec5d83" title="Allocate a byte buffer for use with TurboJPEG.">tjAlloc()</a> and let TurboJPEG grow the buffer as needed,</li>
|
||||||
<li>set <code>*jpegBuf</code> to NULL to tell TurboJPEG to allocate the buffer for you, or</li>
|
<li>set <code>*jpegBuf</code> to NULL to tell TurboJPEG to allocate the buffer for you, or</li>
|
||||||
<li>pre-allocate the buffer to a "worst case" size determined by calling <a class="el" href="group___turbo_j_p_e_g.html#ga67ac12fee79073242cb216e07c9f1f90" title="The maximum size of the buffer (in bytes) required to hold a JPEG image with the given parameters.">tjBufSize()</a>. This should ensure that the buffer never has to be re-allocated (setting <a class="el" href="group___turbo_j_p_e_g.html#ga8808d403c68b62aaa58a4c1e58e98963" title="Disable buffer (re)allocation.">TJFLAG_NOREALLOC</a> guarantees that it won't be.)</li>
|
<li>pre-allocate the buffer to a "worst case" size determined by calling <a class="el" href="group___turbo_j_p_e_g.html#ga67ac12fee79073242cb216e07c9f1f90" title="The maximum size of the buffer (in bytes) required to hold a JPEG image with the given parameters.">tjBufSize()</a>. This should ensure that the buffer never has to be re-allocated. (Setting <a class="el" href="group___turbo_j_p_e_g.html#ga8808d403c68b62aaa58a4c1e58e98963" title="Disable JPEG buffer (re)allocation.">TJFLAG_NOREALLOC</a> guarantees that it won't be.)</li>
|
||||||
</ol>
|
</ol>
|
||||||
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, then <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 JPEG 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.) If <code>*jpegBuf</code> points to a JPEG image buffer that is being reused from a previous call to one of the JPEG compression functions, then <code>*jpegSize</code> is ignored.</td></tr>
|
<tr><td class="paramname">jpegSize</td><td>pointer to an unsigned long variable that holds the size of the JPEG 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.) If <code>*jpegBuf</code> points to a JPEG buffer that is being reused from a previous call to one of the JPEG compression functions, then <code>*jpegSize</code> is ignored.</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#gacb233cfd722d66d1ccbf48a7de81f0e0">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#gacb233cfd722d66d1ccbf48a7de81f0e0">flags</a></td></tr>
|
||||||
</table>
|
</table>
|
||||||
@@ -1371,18 +1372,18 @@ 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. The size of each plane should match the value returned by <a class="el" href="group___turbo_j_p_e_g.html#gab4ab7b24f6e797d79abaaa670373961d" 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">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 source 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#gab4ab7b24f6e797d79abaaa670373961d" 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.</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">strides</td><td>an array of integers, each specifying the number of bytes per row 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 row padding in each plane or to create a JPEG image from a subregion of a larger planar YUV 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.</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 a byte 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">
|
||||||
<li>pre-allocate the JPEG buffer with an arbitrary size using <a class="el" href="group___turbo_j_p_e_g.html#gaec627dd4c5f30b7a775a7aea3bec5d83" 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#gaec627dd4c5f30b7a775a7aea3bec5d83" title="Allocate a byte buffer for use with TurboJPEG.">tjAlloc()</a> and let TurboJPEG grow the buffer as needed,</li>
|
||||||
<li>set <code>*jpegBuf</code> to NULL to tell TurboJPEG to allocate the buffer for you, or</li>
|
<li>set <code>*jpegBuf</code> to NULL to tell TurboJPEG to allocate the buffer for you, or</li>
|
||||||
<li>pre-allocate the buffer to a "worst case" size determined by calling <a class="el" href="group___turbo_j_p_e_g.html#ga67ac12fee79073242cb216e07c9f1f90" title="The maximum size of the buffer (in bytes) required to hold a JPEG image with the given parameters.">tjBufSize()</a>. This should ensure that the buffer never has to be re-allocated (setting <a class="el" href="group___turbo_j_p_e_g.html#ga8808d403c68b62aaa58a4c1e58e98963" title="Disable buffer (re)allocation.">TJFLAG_NOREALLOC</a> guarantees that it won't be.)</li>
|
<li>pre-allocate the buffer to a "worst case" size determined by calling <a class="el" href="group___turbo_j_p_e_g.html#ga67ac12fee79073242cb216e07c9f1f90" title="The maximum size of the buffer (in bytes) required to hold a JPEG image with the given parameters.">tjBufSize()</a>. This should ensure that the buffer never has to be re-allocated. (Setting <a class="el" href="group___turbo_j_p_e_g.html#ga8808d403c68b62aaa58a4c1e58e98963" title="Disable JPEG buffer (re)allocation.">TJFLAG_NOREALLOC</a> guarantees that it won't be.)</li>
|
||||||
</ol>
|
</ol>
|
||||||
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, then <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 JPEG 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.) If <code>*jpegBuf</code> points to a JPEG image buffer that is being reused from a previous call to one of the JPEG compression functions, then <code>*jpegSize</code> is ignored.</td></tr>
|
<tr><td class="paramname">jpegSize</td><td>pointer to an unsigned long variable that holds the size of the JPEG 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.) If <code>*jpegBuf</code> points to a JPEG buffer that is being reused from a previous call to one of the JPEG compression functions, then <code>*jpegSize</code> is ignored.</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#gacb233cfd722d66d1ccbf48a7de81f0e0">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#gacb233cfd722d66d1ccbf48a7de81f0e0">flags</a></td></tr>
|
||||||
</table>
|
</table>
|
||||||
@@ -1392,8 +1393,8 @@ If you choose option 1, <code>*jpegSize</code> should be set to the size of your
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a id="ga70abbf38f77a26fd6da8813bef96f695"></a>
|
<a id="ga97c2cedc1e2bade15a84164c94e503c1"></a>
|
||||||
<h2 class="memtitle"><span class="permalink"><a href="#ga70abbf38f77a26fd6da8813bef96f695">◆ </a></span>tjDecodeYUV()</h2>
|
<h2 class="memtitle"><span class="permalink"><a href="#ga97c2cedc1e2bade15a84164c94e503c1">◆ </a></span>tjDecodeYUV()</h2>
|
||||||
|
|
||||||
<div class="memitem">
|
<div class="memitem">
|
||||||
<div class="memproto">
|
<div class="memproto">
|
||||||
@@ -1414,7 +1415,7 @@ If you choose option 1, <code>*jpegSize</code> should be set to the size of your
|
|||||||
<td class="paramkey"></td>
|
<td class="paramkey"></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td class="paramtype">int </td>
|
<td class="paramtype">int </td>
|
||||||
<td class="paramname"><em>pad</em>, </td>
|
<td class="paramname"><em>align</em>, </td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="paramkey"></td>
|
<td class="paramkey"></td>
|
||||||
@@ -1466,17 +1467,17 @@ If you choose option 1, <code>*jpegSize</code> should be set to the size of your
|
|||||||
</table>
|
</table>
|
||||||
</div><div class="memdoc">
|
</div><div class="memdoc">
|
||||||
|
|
||||||
<p>Decode a YUV planar image into an RGB or grayscale image. </p>
|
<p>Decode a unified planar YUV image into a packed-pixel RGB or grayscale image. </p>
|
||||||
<p>This function uses the accelerated color conversion routines in the underlying codec but does not execute any of the other steps in the JPEG decompression process.</p>
|
<p>This function performs color conversion (which is accelerated in the libjpeg-turbo implementation) but does not execute any of the other steps in the JPEG decompression process.</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 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">srcBuf</td><td>pointer to an image buffer containing a YUV planar image to be decoded. The size of this buffer should match the value returned by <a class="el" href="group___turbo_j_p_e_g.html#ga2be2b9969d4df9ecce9b05deed273194" title="The size of the buffer (in bytes) required to hold a YUV planar image with the given parameters.">tjBufSizeYUV2()</a> for the given image width, height, padding, and level of chrominance subsampling. The Y, U (Cb), and V (Cr) image planes should be stored sequentially in the source 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">srcBuf</td><td>pointer to a buffer containing a unified planar YUV source image to be decoded. The size of this buffer should match the value returned by <a class="el" href="group___turbo_j_p_e_g.html#ga5e5aac9e8bcf17049279301e2466474c" title="The size of the buffer (in bytes) required to hold a unified planar YUV image with the given paramete...">tjBufSizeYUV2()</a> for the given image width, height, row alignment, and level of chrominance subsampling. The Y, U (Cb), and V (Cr) image planes should be stored sequentially in the source 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>Use this parameter to specify that the width of each line in each plane of the YUV source image is padded to the nearest multiple of this number of bytes (must be a power of 2.)</td></tr>
|
<tr><td class="paramname">align</td><td>row alignment (in bytes) of the YUV source image (must be a power of 2.) Setting this parameter to n indicates that each row in each plane of the YUV source image is padded to the nearest multiple of n bytes (1 = unpadded.)</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 a buffer that will receive the packed-pixel 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 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">pitch</td><td>bytes per row in the destination image. Normally this should be set 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>, if the destination image should be unpadded, or <code><a class="el" href="group___turbo_j_p_e_g.html#ga0aba955473315e405295d978f0c16511" title="Pad the given width to the nearest multiple of 4.">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 row of the destination image should be padded to the nearest multiple of 4 bytes, as is the case for Windows bitmaps. You can also be clever and use the pitch parameter to skip rows, 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#gacb233cfd722d66d1ccbf48a7de81f0e0">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#gacb233cfd722d66d1ccbf48a7de81f0e0">flags</a></td></tr>
|
||||||
@@ -1561,17 +1562,17 @@ If you choose option 1, <code>*jpegSize</code> should be set to the size of your
|
|||||||
</table>
|
</table>
|
||||||
</div><div class="memdoc">
|
</div><div class="memdoc">
|
||||||
|
|
||||||
<p>Decode a set of Y, U (Cb), and V (Cr) image planes into an RGB or grayscale image. </p>
|
<p>Decode a set of Y, U (Cb), and V (Cr) image planes into a packed-pixel RGB or grayscale image. </p>
|
||||||
<p>This function uses the accelerated color conversion routines in the underlying codec but does not execute any of the other steps in the JPEG decompression process.</p>
|
<p>This function performs color conversion (which is accelerated in the libjpeg-turbo implementation) but does not execute any of the other steps in the JPEG decompression process.</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 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. The size of each plane should match the value returned by <a class="el" href="group___turbo_j_p_e_g.html#gab4ab7b24f6e797d79abaaa670373961d" 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">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#gab4ab7b24f6e797d79abaaa670373961d" 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 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">strides</td><td>an array of integers, each specifying the number of bytes per row 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 row padding in each plane or to decode a subregion of a larger planar YUV 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 a buffer that will receive the packed-pixel 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 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">pitch</td><td>bytes per row in the destination image. Normally this should be set 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>, if the destination image should be unpadded, or <code><a class="el" href="group___turbo_j_p_e_g.html#ga0aba955473315e405295d978f0c16511" title="Pad the given width to the nearest multiple of 4.">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 row of the destination image should be padded to the nearest multiple of 4 bytes, as is the case for Windows bitmaps. You can also be clever and use the pitch parameter to skip rows, 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#gacb233cfd722d66d1ccbf48a7de81f0e0">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#gacb233cfd722d66d1ccbf48a7de81f0e0">flags</a></td></tr>
|
||||||
@@ -1650,15 +1651,15 @@ If you choose option 1, <code>*jpegSize</code> should be set to the size of your
|
|||||||
</table>
|
</table>
|
||||||
</div><div class="memdoc">
|
</div><div class="memdoc">
|
||||||
|
|
||||||
<p>Decompress a JPEG image to an RGB, grayscale, or CMYK image. </p>
|
<p>Decompress a JPEG image into a packed-pixel RGB, grayscale, or CMYK image. </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 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 byte 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">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#gac3854476006b10787bd128f7ede48057" 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 a buffer that will receive the packed-pixel 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#ga193d0977b3b9966d53a6c402e90899b1" title="Returns a list of fractional scaling factors that the JPEG decompressor supports.">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 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#gac3854476006b10787bd128f7ede48057" 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 row in the destination image. Normally this should be set 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>, if the destination image should be unpadded, or <code><a class="el" href="group___turbo_j_p_e_g.html#ga0aba955473315e405295d978f0c16511" title="Pad the given width to the nearest multiple of 4.">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 row of the destination image should be padded to the nearest multiple of 4 bytes, 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#ga193d0977b3b9966d53a6c402e90899b1" title="Returns a list of fractional scaling factors that the JPEG decompressor supports.">tjGetScalingFactors()</a>.) You can also be clever and use the pitch parameter to skip rows, 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#gacb233cfd722d66d1ccbf48a7de81f0e0">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#gacb233cfd722d66d1ccbf48a7de81f0e0">flags</a></td></tr>
|
||||||
@@ -1729,7 +1730,7 @@ 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">jpegBuf</td><td>pointer to a buffer containing a JPEG image or an "abbreviated table specification" (AKA "tables-only") datastream. Passing a tables-only datastream to this function primes the decompressor with quantization and Huffman tables that can be used when decompressing subsequent "abbreviated image" datastreams. This is useful, for instance, when decompressing video streams in which all frames share the same quantization and Huffman tables.</td></tr>
|
<tr><td class="paramname">jpegBuf</td><td>pointer to a byte buffer containing a JPEG image or an "abbreviated table specification" (AKA "tables-only") datastream. Passing a tables-only datastream to this function primes the decompressor with quantization and Huffman tables that can be used when decompressing subsequent "abbreviated image" datastreams. This is useful, for instance, when decompressing video streams in which all frames share the same quantization and Huffman tables.</td></tr>
|
||||||
<tr><td class="paramname">jpegSize</td><td>size of the JPEG image or tables-only datastream (in bytes)</td></tr>
|
<tr><td class="paramname">jpegSize</td><td>size of the JPEG image or tables-only datastream (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. If <code>jpegBuf</code> points to a tables-only datastream, then <code>width</code> is ignored.</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. If <code>jpegBuf</code> points to a tables-only datastream, then <code>width</code> is ignored.</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. If <code>jpegBuf</code> points to a tables-only datastream, then <code>height</code> is ignored.</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. If <code>jpegBuf</code> points to a tables-only datastream, then <code>height</code> is ignored.</td></tr>
|
||||||
@@ -1742,8 +1743,8 @@ If you choose option 1, <code>*jpegSize</code> should be set to the size of your
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a id="ga04d1e839ff9a0860dd1475cff78d3364"></a>
|
<a id="ga5a3093e325598c17a9f004323af6fafa"></a>
|
||||||
<h2 class="memtitle"><span class="permalink"><a href="#ga04d1e839ff9a0860dd1475cff78d3364">◆ </a></span>tjDecompressToYUV2()</h2>
|
<h2 class="memtitle"><span class="permalink"><a href="#ga5a3093e325598c17a9f004323af6fafa">◆ </a></span>tjDecompressToYUV2()</h2>
|
||||||
|
|
||||||
<div class="memitem">
|
<div class="memitem">
|
||||||
<div class="memproto">
|
<div class="memproto">
|
||||||
@@ -1782,7 +1783,7 @@ If you choose option 1, <code>*jpegSize</code> should be set to the size of your
|
|||||||
<td class="paramkey"></td>
|
<td class="paramkey"></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td class="paramtype">int </td>
|
<td class="paramtype">int </td>
|
||||||
<td class="paramname"><em>pad</em>, </td>
|
<td class="paramname"><em>align</em>, </td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="paramkey"></td>
|
<td class="paramkey"></td>
|
||||||
@@ -1804,17 +1805,17 @@ If you choose option 1, <code>*jpegSize</code> should be set to the size of your
|
|||||||
</table>
|
</table>
|
||||||
</div><div class="memdoc">
|
</div><div class="memdoc">
|
||||||
|
|
||||||
<p>Decompress a JPEG image to a YUV planar image. </p>
|
<p>Decompress a JPEG image into a unified planar YUV image. </p>
|
||||||
<p>This function performs JPEG decompression but leaves out the color conversion step, so a planar YUV image is generated instead of an RGB image.</p>
|
<p>This function performs JPEG decompression but leaves out the color conversion step, so a planar YUV image is generated instead of a packed-pixel image.</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 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 byte 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">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#ga2be2b9969d4df9ecce9b05deed273194" 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 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 a buffer that will receive the unified planar YUV decompressed image. Use <a class="el" href="group___turbo_j_p_e_g.html#ga5e5aac9e8bcf17049279301e2466474c" title="The size of the buffer (in bytes) required to hold a unified planar YUV image with the given paramete...">tjBufSizeYUV2()</a> to determine the appropriate size for this buffer based on the scaled image width, scaled image height, row alignment, 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">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.</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">align</td><td>row alignment (in bytes) of the YUV image (must be a power of 2.) Setting this parameter to n will cause each row in each plane of the YUV image to be padded to the nearest multiple of n bytes (1 = unpadded.) To generate images suitable for X Video, <code>align</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.</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#gacb233cfd722d66d1ccbf48a7de81f0e0">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#gacb233cfd722d66d1ccbf48a7de81f0e0">flags</a></td></tr>
|
||||||
</table>
|
</table>
|
||||||
</dd>
|
</dd>
|
||||||
@@ -1886,16 +1887,16 @@ 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>Decompress a JPEG image into separate Y, U (Cb), and V (Cr) image planes. </p>
|
<p>Decompress a JPEG image into separate Y, U (Cb), and V (Cr) image planes. </p>
|
||||||
<p>This function performs JPEG decompression but leaves out the color conversion step, so a planar YUV image is generated instead of an RGB image.</p>
|
<p>This function performs JPEG decompression but leaves out the color conversion step, so a planar YUV image is generated instead of a packed-pixel image.</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 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 byte 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. Use <a class="el" href="group___turbo_j_p_e_g.html#gab4ab7b24f6e797d79abaaa670373961d" 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">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 decompressed image. These planes can be contiguous or non-contiguous in memory. Use <a class="el" href="group___turbo_j_p_e_g.html#gab4ab7b24f6e797d79abaaa670373961d" 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.</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">strides</td><td>an array of integers, each specifying the number of bytes per row in the corresponding plane of the YUV 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 row padding to each plane or to decompress the JPEG image into a subregion of a larger planar YUV 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.</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#gacb233cfd722d66d1ccbf48a7de81f0e0">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#gacb233cfd722d66d1ccbf48a7de81f0e0">flags</a></td></tr>
|
||||||
</table>
|
</table>
|
||||||
</dd>
|
</dd>
|
||||||
@@ -1931,8 +1932,8 @@ If you choose option 1, <code>*jpegSize</code> should be set to the size of your
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a id="gac519b922cdf446e97d0cdcba513636bf"></a>
|
<a id="ga5d619e0a02b71e05a8dffb764f6d7a64"></a>
|
||||||
<h2 class="memtitle"><span class="permalink"><a href="#gac519b922cdf446e97d0cdcba513636bf">◆ </a></span>tjEncodeYUV3()</h2>
|
<h2 class="memtitle"><span class="permalink"><a href="#ga5d619e0a02b71e05a8dffb764f6d7a64">◆ </a></span>tjEncodeYUV3()</h2>
|
||||||
|
|
||||||
<div class="memitem">
|
<div class="memitem">
|
||||||
<div class="memproto">
|
<div class="memproto">
|
||||||
@@ -1983,7 +1984,7 @@ If you choose option 1, <code>*jpegSize</code> should be set to the size of your
|
|||||||
<td class="paramkey"></td>
|
<td class="paramkey"></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td class="paramtype">int </td>
|
<td class="paramtype">int </td>
|
||||||
<td class="paramname"><em>pad</em>, </td>
|
<td class="paramname"><em>align</em>, </td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="paramkey"></td>
|
<td class="paramkey"></td>
|
||||||
@@ -2005,18 +2006,18 @@ If you choose option 1, <code>*jpegSize</code> should be set to the size of your
|
|||||||
</table>
|
</table>
|
||||||
</div><div class="memdoc">
|
</div><div class="memdoc">
|
||||||
|
|
||||||
<p>Encode an RGB or grayscale image into a YUV planar image. </p>
|
<p>Encode a packed-pixel RGB or grayscale image into a unified planar YUV image. </p>
|
||||||
<p>This function uses the accelerated color conversion routines in the underlying codec but does not execute any of the other steps in the JPEG compression process.</p>
|
<p>This function performs color conversion (which is accelerated in the libjpeg-turbo implementation) but does not execute any of the other steps in the JPEG compression process.</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 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 a buffer containing a packed-pixel RGB or grayscale source image 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 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">pitch</td><td>bytes per row 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 multiple of 4.">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 row of the image is padded to the nearest multiple of 4 bytes, as is the case for Windows bitmaps. You can also be clever and use this parameter to skip rows, 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#ga2be2b9969d4df9ecce9b05deed273194" 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 a buffer that will receive the unified planar YUV image. Use <a class="el" href="group___turbo_j_p_e_g.html#ga5e5aac9e8bcf17049279301e2466474c" title="The size of the buffer (in bytes) required to hold a unified planar YUV image with the given paramete...">tjBufSizeYUV2()</a> to determine the appropriate size for this buffer based on the image width, height, row alignment, 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">align</td><td>row alignment (in bytes) of the YUV image (must be a power of 2.) Setting this parameter to n will cause each row in each plane of the YUV image to be padded to the nearest multiple of n bytes (1 = unpadded.) To generate images suitable for X Video, <code>align</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#gacb233cfd722d66d1ccbf48a7de81f0e0">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#gacb233cfd722d66d1ccbf48a7de81f0e0">flags</a></td></tr>
|
||||||
</table>
|
</table>
|
||||||
@@ -2100,18 +2101,18 @@ If you choose option 1, <code>*jpegSize</code> should be set to the size of your
|
|||||||
</table>
|
</table>
|
||||||
</div><div class="memdoc">
|
</div><div class="memdoc">
|
||||||
|
|
||||||
<p>Encode an RGB or grayscale image into separate Y, U (Cb), and V (Cr) image planes. </p>
|
<p>Encode a packed-pixel RGB or grayscale image into separate Y, U (Cb), and V (Cr) image planes. </p>
|
||||||
<p>This function uses the accelerated color conversion routines in the underlying codec but does not execute any of the other steps in the JPEG compression process.</p>
|
<p>This function performs color conversion (which is accelerated in the libjpeg-turbo implementation) but does not execute any of the other steps in the JPEG compression process.</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 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 a buffer containing a packed-pixel RGB or grayscale source image 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 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">pitch</td><td>bytes per row 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 multiple of 4.">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 row of the image is padded to the nearest multiple of 4 bytes, as is the case for Windows bitmaps. You can also be clever and use this parameter to skip rows, 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. Use <a class="el" href="group___turbo_j_p_e_g.html#gab4ab7b24f6e797d79abaaa670373961d" 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">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#gab4ab7b24f6e797d79abaaa670373961d" 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 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">strides</td><td>an array of integers, each specifying the number of bytes per row 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 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 row padding to each plane or to encode an RGB or grayscale image into a subregion of a larger planar YUV 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#gacb233cfd722d66d1ccbf48a7de81f0e0">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#gacb233cfd722d66d1ccbf48a7de81f0e0">flags</a></td></tr>
|
||||||
</table>
|
</table>
|
||||||
@@ -2137,15 +2138,15 @@ If you choose option 1, <code>*jpegSize</code> should be set to the size of your
|
|||||||
</table>
|
</table>
|
||||||
</div><div class="memdoc">
|
</div><div class="memdoc">
|
||||||
|
|
||||||
<p>Free an image buffer previously allocated by TurboJPEG. </p>
|
<p>Free a byte buffer previously allocated by TurboJPEG. </p>
|
||||||
<p>You should always use this function to free JPEG destination buffer(s) that were automatically (re)allocated by the compression and transform functions or that were manually allocated using <a class="el" href="group___turbo_j_p_e_g.html#gaec627dd4c5f30b7a775a7aea3bec5d83" title="Allocate an image buffer for use with TurboJPEG.">tjAlloc()</a>.</p>
|
<p>You should always use this function to free JPEG destination buffer(s) that were automatically (re)allocated by the compression and transform functions or that were manually allocated using <a class="el" href="group___turbo_j_p_e_g.html#gaec627dd4c5f30b7a775a7aea3bec5d83" title="Allocate a byte buffer for use with TurboJPEG.">tjAlloc()</a>.</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">buffer</td><td>address of the buffer to free. If the address is NULL, then this function has no effect.</td></tr>
|
<tr><td class="paramname">buffer</td><td>address of the buffer to free. If the address is NULL, then this function has no effect.</td></tr>
|
||||||
</table>
|
</table>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group___turbo_j_p_e_g.html#gaec627dd4c5f30b7a775a7aea3bec5d83" title="Allocate an image buffer for use with TurboJPEG.">tjAlloc()</a> </dd></dl>
|
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group___turbo_j_p_e_g.html#gaec627dd4c5f30b7a775a7aea3bec5d83" title="Allocate a byte buffer for use with TurboJPEG.">tjAlloc()</a> </dd></dl>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -2204,8 +2205,8 @@ If you choose option 1, <code>*jpegSize</code> should be set to the size of your
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a id="gac3854476006b10787bd128f7ede48057"></a>
|
<a id="ga193d0977b3b9966d53a6c402e90899b1"></a>
|
||||||
<h2 class="memtitle"><span class="permalink"><a href="#gac3854476006b10787bd128f7ede48057">◆ </a></span>tjGetScalingFactors()</h2>
|
<h2 class="memtitle"><span class="permalink"><a href="#ga193d0977b3b9966d53a6c402e90899b1">◆ </a></span>tjGetScalingFactors()</h2>
|
||||||
|
|
||||||
<div class="memitem">
|
<div class="memitem">
|
||||||
<div class="memproto">
|
<div class="memproto">
|
||||||
@@ -2214,16 +2215,16 @@ If you choose option 1, <code>*jpegSize</code> should be set to the size of your
|
|||||||
<td class="memname">DLLEXPORT <a class="el" href="structtjscalingfactor.html">tjscalingfactor</a>* tjGetScalingFactors </td>
|
<td class="memname">DLLEXPORT <a class="el" href="structtjscalingfactor.html">tjscalingfactor</a>* tjGetScalingFactors </td>
|
||||||
<td>(</td>
|
<td>(</td>
|
||||||
<td class="paramtype">int * </td>
|
<td class="paramtype">int * </td>
|
||||||
<td class="paramname"><em>numscalingfactors</em></td><td>)</td>
|
<td class="paramname"><em>numScalingFactors</em></td><td>)</td>
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div><div class="memdoc">
|
</div><div class="memdoc">
|
||||||
|
|
||||||
<p>Returns a list of fractional scaling factors that the JPEG decompressor in this implementation of TurboJPEG supports. </p>
|
<p>Returns a list of fractional scaling factors that the JPEG decompressor supports. </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">numscalingfactors</td><td>pointer to an integer variable that will receive the number of elements in the list</td></tr>
|
<tr><td class="paramname">numScalingFactors</td><td>pointer to an integer variable that will receive the number of elements in the list</td></tr>
|
||||||
</table>
|
</table>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
@@ -2344,25 +2345,25 @@ If you choose option 1, <code>*jpegSize</code> should be set to the size of your
|
|||||||
</table>
|
</table>
|
||||||
</div><div class="memdoc">
|
</div><div class="memdoc">
|
||||||
|
|
||||||
<p>Load an uncompressed image from disk into memory. </p>
|
<p>Load a packed-pixel image from disk into memory. </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">filename</td><td>name of a file containing an uncompressed image in Windows BMP or PBMPLUS (PPM/PGM) format</td></tr>
|
<tr><td class="paramname">filename</td><td>name of a file containing a packed-pixel image in Windows BMP or PBMPLUS (PPM/PGM) format</td></tr>
|
||||||
<tr><td class="paramname">width</td><td>pointer to an integer variable that will receive the width (in pixels) of the uncompressed image</td></tr>
|
<tr><td class="paramname">width</td><td>pointer to an integer variable that will receive the width (in pixels) of the packed-pixel image</td></tr>
|
||||||
<tr><td class="paramname">align</td><td>row alignment of the image buffer to be returned (must be a power of 2.) For instance, setting this parameter to 4 will cause all rows in the image buffer to be padded to the nearest 32-bit boundary, and setting this parameter to 1 will cause all rows in the image buffer to be unpadded.</td></tr>
|
<tr><td class="paramname">align</td><td>row alignment of the packed-pixel buffer to be returned (must be a power of 2.) Setting this parameter to n will cause all rows in the buffer to be padded to the nearest multiple of n bytes (1 = unpadded.)</td></tr>
|
||||||
<tr><td class="paramname">height</td><td>pointer to an integer variable that will receive the height (in pixels) of the uncompressed image</td></tr>
|
<tr><td class="paramname">height</td><td>pointer to an integer variable that will receive the height (in pixels) of the packed-pixel image</td></tr>
|
||||||
<tr><td class="paramname">pixelFormat</td><td>pointer to an integer variable that specifies or will receive the pixel format of the uncompressed image buffer. The behavior of <a class="el" href="group___turbo_j_p_e_g.html#gaffbd83c375e79f5db4b5c5d8ad4466e7" title="Load an uncompressed image from disk into memory.">tjLoadImage()</a> will vary depending on the value of <code>*pixelFormat</code> passed to the function:<ul>
|
<tr><td class="paramname">pixelFormat</td><td>pointer to an integer variable that specifies or will receive the pixel format of the packed-pixel buffer. The behavior of <a class="el" href="group___turbo_j_p_e_g.html#gaffbd83c375e79f5db4b5c5d8ad4466e7" title="Load a packed-pixel image from disk into memory.">tjLoadImage()</a> will vary depending on the value of <code>*pixelFormat</code> passed to the function:<ul>
|
||||||
<li><a class="el" href="group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa84c1a6cead7952998e2fb895844a21ed">TJPF_UNKNOWN</a> : The uncompressed image buffer returned by the function will use the most optimal pixel format for the file type, and <code>*pixelFormat</code> will contain the ID of this pixel format upon successful return from the function.</li>
|
<li><a class="el" href="group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa84c1a6cead7952998e2fb895844a21ed">TJPF_UNKNOWN</a> : The packed-pixel buffer returned by this function will use the most optimal pixel format for the file type, and <code>*pixelFormat</code> will contain the ID of that pixel format upon successful return from this function.</li>
|
||||||
<li><a class="el" href="group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa5431b54b015337705f13118073711a1a">TJPF_GRAY</a> : Only PGM files and 8-bit BMP files with a grayscale colormap can be loaded.</li>
|
<li><a class="el" href="group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa5431b54b015337705f13118073711a1a">TJPF_GRAY</a> : Only PGM files and 8-bit-per-pixel BMP files with a grayscale colormap can be loaded.</li>
|
||||||
<li><a class="el" href="group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa7f5100ec44c91994e243f1cf55553f8b">TJPF_CMYK</a> : The RGB or grayscale pixels stored in the file will be converted using a quick & dirty algorithm that is suitable only for testing purposes (proper conversion between CMYK and other formats requires a color management system.)</li>
|
<li><a class="el" href="group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa7f5100ec44c91994e243f1cf55553f8b">TJPF_CMYK</a> : The RGB or grayscale pixels stored in the file will be converted using a quick & dirty algorithm that is suitable only for testing purposes. (Proper conversion between CMYK and other formats requires a color management system.)</li>
|
||||||
<li>Other <a class="el" href="group___turbo_j_p_e_g.html#gac916144e26c3817ac514e64ae5d12e2a">pixel formats</a> : The uncompressed image buffer will use the specified pixel format, and pixel format conversion will be performed if necessary.</li>
|
<li>Other <a class="el" href="group___turbo_j_p_e_g.html#gac916144e26c3817ac514e64ae5d12e2a">pixel formats</a> : The packed-pixel buffer will use the specified pixel format, and pixel format conversion will be performed if necessary.</li>
|
||||||
</ul>
|
</ul>
|
||||||
</td></tr>
|
</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>
|
||||||
<dl class="section return"><dt>Returns</dt><dd>a pointer to a newly-allocated buffer containing the uncompressed image, converted to the chosen pixel format and with the chosen row alignment, or NULL if an error occurred (see <a class="el" href="group___turbo_j_p_e_g.html#ga1ead8574f9f39fbafc6b497124e7aafa" title="Returns a descriptive error message explaining why the last command failed.">tjGetErrorStr2()</a>.) This buffer should be freed using <a class="el" href="group___turbo_j_p_e_g.html#gaea863d2da0cdb609563aabdf9196514b" title="Free an image buffer previously allocated by TurboJPEG.">tjFree()</a>. </dd></dl>
|
<dl class="section return"><dt>Returns</dt><dd>a pointer to a newly-allocated buffer containing the packed-pixel image, converted to the chosen pixel format and with the chosen row alignment, or NULL if an error occurred (see <a class="el" href="group___turbo_j_p_e_g.html#ga1ead8574f9f39fbafc6b497124e7aafa" title="Returns a descriptive error message explaining why the last command failed.">tjGetErrorStr2()</a>.) This buffer should be freed using <a class="el" href="group___turbo_j_p_e_g.html#gaea863d2da0cdb609563aabdf9196514b" title="Free a byte buffer previously allocated by TurboJPEG.">tjFree()</a>. </dd></dl>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -2461,7 +2462,7 @@ If you choose option 1, <code>*jpegSize</code> should be set to the size of your
|
|||||||
<table class="params">
|
<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">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">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">stride</td><td>bytes per row 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">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>
|
<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>
|
||||||
@@ -2573,15 +2574,15 @@ If you choose option 1, <code>*jpegSize</code> should be set to the size of your
|
|||||||
</table>
|
</table>
|
||||||
</div><div class="memdoc">
|
</div><div class="memdoc">
|
||||||
|
|
||||||
<p>Save an uncompressed image from memory to disk. </p>
|
<p>Save a packed-pixel image from memory to disk. </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">filename</td><td>name of a file to which to save the uncompressed image. The image will be stored in Windows BMP or PBMPLUS (PPM/PGM) format, depending on the file extension.</td></tr>
|
<tr><td class="paramname">filename</td><td>name of a file to which to save the packed-pixel image. The image will be stored in Windows BMP or PBMPLUS (PPM/PGM) format, depending on the file extension.</td></tr>
|
||||||
<tr><td class="paramname">buffer</td><td>pointer to an image buffer containing RGB, grayscale, or CMYK pixels to be saved</td></tr>
|
<tr><td class="paramname">buffer</td><td>pointer to a buffer containing a packed-pixel RGB, grayscale, or CMYK image to be saved</td></tr>
|
||||||
<tr><td class="paramname">width</td><td>width (in pixels) of the uncompressed image</td></tr>
|
<tr><td class="paramname">width</td><td>width (in pixels) of the packed-pixel image</td></tr>
|
||||||
<tr><td class="paramname">pitch</td><td>bytes per line in the image buffer. 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 row in the packed-pixel image. 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 uncompressed image</td></tr>
|
<tr><td class="paramname">height</td><td>height (in pixels) of the packed-pixel image</td></tr>
|
||||||
<tr><td class="paramname">pixelFormat</td><td>pixel format of the image buffer (see <a class="el" href="group___turbo_j_p_e_g.html#gac916144e26c3817ac514e64ae5d12e2a">Pixel formats</a>.) If this parameter is set to <a class="el" href="group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa5431b54b015337705f13118073711a1a">TJPF_GRAY</a>, then the image will be stored in PGM or 8-bit (indexed color) BMP format. Otherwise, the image will be stored in PPM or 24-bit BMP format. If this parameter is set to <a class="el" href="group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa7f5100ec44c91994e243f1cf55553f8b">TJPF_CMYK</a>, then the CMYK pixels will be converted to RGB using a quick & dirty algorithm that is suitable only for testing (proper conversion between CMYK and other formats requires a color management system.)</td></tr>
|
<tr><td class="paramname">pixelFormat</td><td>pixel format of the packed-pixel image (see <a class="el" href="group___turbo_j_p_e_g.html#gac916144e26c3817ac514e64ae5d12e2a">Pixel formats</a>.) If this parameter is set to <a class="el" href="group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa5431b54b015337705f13118073711a1a">TJPF_GRAY</a>, then the image will be stored in PGM or 8-bit-per-pixel (indexed color) BMP format. Otherwise, the image will be stored in PPM or 24-bit-per-pixel BMP format. If this parameter is set to <a class="el" href="group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa7f5100ec44c91994e243f1cf55553f8b">TJPF_CMYK</a>, then the CMYK pixels will be converted to RGB using a quick & dirty algorithm that is suitable only for testing purposes. (Proper conversion between CMYK and other formats requires a color management system.)</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>
|
||||||
@@ -2657,17 +2658,17 @@ 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 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 source image to transform</td></tr>
|
<tr><td class="paramname">jpegBuf</td><td>pointer to a byte buffer containing the JPEG source image to transform</td></tr>
|
||||||
<tr><td class="paramname">jpegSize</td><td>size of the JPEG source 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 byte 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 destination buffer to accommodate the size of the transformed 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#gaec627dd4c5f30b7a775a7aea3bec5d83" 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 destination buffer with an arbitrary size using <a class="el" href="group___turbo_j_p_e_g.html#gaec627dd4c5f30b7a775a7aea3bec5d83" title="Allocate a byte buffer for use with TurboJPEG.">tjAlloc()</a> and let TurboJPEG grow the buffer as needed,</li>
|
||||||
<li>set <code>dstBufs[i]</code> to NULL to tell TurboJPEG to allocate the buffer for you, or</li>
|
<li>set <code>dstBufs[i]</code> to NULL to tell TurboJPEG to allocate the buffer for you, or</li>
|
||||||
<li>pre-allocate the buffer to a "worst case" size determined by calling <a class="el" href="group___turbo_j_p_e_g.html#ga67ac12fee79073242cb216e07c9f1f90" title="The maximum size of the buffer (in bytes) required to hold a JPEG image with the given parameters.">tjBufSize()</a> with the transformed or cropped width and height. Under normal circumstances, this should ensure that the buffer never has to be re-allocated (setting <a class="el" href="group___turbo_j_p_e_g.html#ga8808d403c68b62aaa58a4c1e58e98963" title="Disable buffer (re)allocation.">TJFLAG_NOREALLOC</a> guarantees that it won't be.) Note, however, that there are some rare cases (such as transforming images with a large amount of embedded EXIF or ICC profile data) in which the output image will be larger than the worst-case size, and <a class="el" href="group___turbo_j_p_e_g.html#ga8808d403c68b62aaa58a4c1e58e98963" title="Disable buffer (re)allocation.">TJFLAG_NOREALLOC</a> cannot be used in those cases.</li>
|
<li>pre-allocate the buffer to a "worst case" size determined by calling <a class="el" href="group___turbo_j_p_e_g.html#ga67ac12fee79073242cb216e07c9f1f90" title="The maximum size of the buffer (in bytes) required to hold a JPEG image with the given parameters.">tjBufSize()</a> with the transformed or cropped width and height. Under normal circumstances, this should ensure that the buffer never has to be re-allocated. (Setting <a class="el" href="group___turbo_j_p_e_g.html#ga8808d403c68b62aaa58a4c1e58e98963" title="Disable JPEG buffer (re)allocation.">TJFLAG_NOREALLOC</a> guarantees that it won't be.) Note, however, that there are some rare cases (such as transforming images with a large amount of embedded EXIF or ICC profile data) in which the transformed JPEG image will be larger than the worst-case size, and <a class="el" href="group___turbo_j_p_e_g.html#ga8808d403c68b62aaa58a4c1e58e98963" title="Disable JPEG buffer (re)allocation.">TJFLAG_NOREALLOC</a> cannot be used in those cases.</li>
|
||||||
</ol>
|
</ol>
|
||||||
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, then <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 JPEG 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 transformed 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 JPEG 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#gacb233cfd722d66d1ccbf48a7de81f0e0">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#gacb233cfd722d66d1ccbf48a7de81f0e0">flags</a></td></tr>
|
||||||
</table>
|
</table>
|
||||||
</dd>
|
</dd>
|
||||||
@@ -2698,7 +2699,7 @@ If you choose option 1, <code>dstSizes[i]</code> should be set to the size of yo
|
|||||||
</div><div class="memdoc">
|
</div><div class="memdoc">
|
||||||
|
|
||||||
<p>Alpha offset (in bytes) for a given pixel format. </p>
|
<p>Alpha offset (in bytes) for a given pixel format. </p>
|
||||||
<p>This specifies the number of bytes that the Alpha component is offset from the start of the pixel. For instance, if a pixel of format TJ_BGRA is stored in <code>char pixel[]</code>, then the alpha component will be <code>pixel[tjAlphaOffset[TJ_BGRA]]</code>. This will be -1 if the pixel format does not have an alpha component. </p>
|
<p>This specifies the number of bytes that the alpha component is offset from the start of the pixel. For instance, if a pixel of format TJPF_BGRA is stored in <code>unsigned char pixel[]</code>, then the alpha component will be <code>pixel[tjAlphaOffset[TJPF_BGRA]]</code>. This will be -1 if the pixel format does not have an alpha component. </p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -2723,7 +2724,7 @@ If you choose option 1, <code>dstSizes[i]</code> should be set to the size of yo
|
|||||||
</div><div class="memdoc">
|
</div><div class="memdoc">
|
||||||
|
|
||||||
<p>Blue offset (in bytes) for a given pixel format. </p>
|
<p>Blue offset (in bytes) for a given pixel format. </p>
|
||||||
<p>This specifies the number of bytes that the Blue component is offset from the start of the pixel. For instance, if a pixel of format TJ_BGRX is stored in <code>char pixel[]</code>, then the blue component will be <code>pixel[tjBlueOffset[TJ_BGRX]]</code>. This will be -1 if the pixel format does not have a blue component. </p>
|
<p>This specifies the number of bytes that the blue component is offset from the start of the pixel. For instance, if a pixel of format TJPF_BGRX is stored in <code>unsigned char pixel[]</code>, then the blue component will be <code>pixel[tjBlueOffset[TJPF_BGRX]]</code>. This will be -1 if the pixel format does not have a blue component. </p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -2748,7 +2749,7 @@ If you choose option 1, <code>dstSizes[i]</code> should be set to the size of yo
|
|||||||
</div><div class="memdoc">
|
</div><div class="memdoc">
|
||||||
|
|
||||||
<p>Green offset (in bytes) for a given pixel format. </p>
|
<p>Green offset (in bytes) for a given pixel format. </p>
|
||||||
<p>This specifies the number of bytes that the green component is offset from the start of the pixel. For instance, if a pixel of format TJ_BGRX is stored in <code>char pixel[]</code>, then the green component will be <code>pixel[tjGreenOffset[TJ_BGRX]]</code>. This will be -1 if the pixel format does not have a green component. </p>
|
<p>This specifies the number of bytes that the green component is offset from the start of the pixel. For instance, if a pixel of format TJPF_BGRX is stored in <code>unsigned char pixel[]</code>, then the green component will be <code>pixel[tjGreenOffset[TJPF_BGRX]]</code>. This will be -1 if the pixel format does not have a green component. </p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -2859,7 +2860,7 @@ If you choose option 1, <code>dstSizes[i]</code> should be set to the size of yo
|
|||||||
</div><div class="memdoc">
|
</div><div class="memdoc">
|
||||||
|
|
||||||
<p>Red offset (in bytes) for a given pixel format. </p>
|
<p>Red offset (in bytes) for a given pixel format. </p>
|
||||||
<p>This specifies the number of bytes that the red component is offset from the start of the pixel. For instance, if a pixel of format TJ_BGRX is stored in <code>char pixel[]</code>, then the red component will be <code>pixel[tjRedOffset[TJ_BGRX]]</code>. This will be -1 if the pixel format does not have a red component. </p>
|
<p>This specifies the number of bytes that the red component is offset from the start of the pixel. For instance, if a pixel of format TJPF_BGRX is stored in <code>unsigned char pixel[]</code>, then the red component will be <code>pixel[tjRedOffset[TJPF_BGRX]]</code>. This will be -1 if the pixel format does not have a red component. </p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -9,9 +9,9 @@ var searchData=
|
|||||||
['tjalphaoffset_14',['tjAlphaOffset',['../group___turbo_j_p_e_g.html#ga5af0ab065feefd526debf1e20c43e837',1,'turbojpeg.h']]],
|
['tjalphaoffset_14',['tjAlphaOffset',['../group___turbo_j_p_e_g.html#ga5af0ab065feefd526debf1e20c43e837',1,'turbojpeg.h']]],
|
||||||
['tjblueoffset_15',['tjBlueOffset',['../group___turbo_j_p_e_g.html#ga84e2e35d3f08025f976ec1ec53693dea',1,'turbojpeg.h']]],
|
['tjblueoffset_15',['tjBlueOffset',['../group___turbo_j_p_e_g.html#ga84e2e35d3f08025f976ec1ec53693dea',1,'turbojpeg.h']]],
|
||||||
['tjbufsize_16',['tjBufSize',['../group___turbo_j_p_e_g.html#ga67ac12fee79073242cb216e07c9f1f90',1,'turbojpeg.h']]],
|
['tjbufsize_16',['tjBufSize',['../group___turbo_j_p_e_g.html#ga67ac12fee79073242cb216e07c9f1f90',1,'turbojpeg.h']]],
|
||||||
['tjbufsizeyuv2_17',['tjBufSizeYUV2',['../group___turbo_j_p_e_g.html#ga2be2b9969d4df9ecce9b05deed273194',1,'turbojpeg.h']]],
|
['tjbufsizeyuv2_17',['tjBufSizeYUV2',['../group___turbo_j_p_e_g.html#ga5e5aac9e8bcf17049279301e2466474c',1,'turbojpeg.h']]],
|
||||||
['tjcompress2_18',['tjCompress2',['../group___turbo_j_p_e_g.html#gafbdce0112fd78fd38efae841443a9bcf',1,'turbojpeg.h']]],
|
['tjcompress2_18',['tjCompress2',['../group___turbo_j_p_e_g.html#gafbdce0112fd78fd38efae841443a9bcf',1,'turbojpeg.h']]],
|
||||||
['tjcompressfromyuv_19',['tjCompressFromYUV',['../group___turbo_j_p_e_g.html#ga7622a459b79aa1007e005b58783f875b',1,'turbojpeg.h']]],
|
['tjcompressfromyuv_19',['tjCompressFromYUV',['../group___turbo_j_p_e_g.html#gab40f5096a72fd7e5bda9d6b58fa37e2e',1,'turbojpeg.h']]],
|
||||||
['tjcompressfromyuvplanes_20',['tjCompressFromYUVPlanes',['../group___turbo_j_p_e_g.html#ga29ec5dfbd2d84b8724e951d6fa0d5d9e',1,'turbojpeg.h']]],
|
['tjcompressfromyuvplanes_20',['tjCompressFromYUVPlanes',['../group___turbo_j_p_e_g.html#ga29ec5dfbd2d84b8724e951d6fa0d5d9e',1,'turbojpeg.h']]],
|
||||||
['tjcs_21',['TJCS',['../group___turbo_j_p_e_g.html#ga4f83ad3368e0e29d1957be0efa7c3720',1,'turbojpeg.h']]],
|
['tjcs_21',['TJCS',['../group___turbo_j_p_e_g.html#ga4f83ad3368e0e29d1957be0efa7c3720',1,'turbojpeg.h']]],
|
||||||
['tjcs_5fcmyk_22',['TJCS_CMYK',['../group___turbo_j_p_e_g.html#gga4f83ad3368e0e29d1957be0efa7c3720a6c8b636152ac8195b869587db315ee53',1,'turbojpeg.h']]],
|
['tjcs_5fcmyk_22',['TJCS_CMYK',['../group___turbo_j_p_e_g.html#gga4f83ad3368e0e29d1957be0efa7c3720a6c8b636152ac8195b869587db315ee53',1,'turbojpeg.h']]],
|
||||||
@@ -19,14 +19,14 @@ var searchData=
|
|||||||
['tjcs_5frgb_24',['TJCS_RGB',['../group___turbo_j_p_e_g.html#gga4f83ad3368e0e29d1957be0efa7c3720a677cb7ccb85c4038ac41964a2e09e555',1,'turbojpeg.h']]],
|
['tjcs_5frgb_24',['TJCS_RGB',['../group___turbo_j_p_e_g.html#gga4f83ad3368e0e29d1957be0efa7c3720a677cb7ccb85c4038ac41964a2e09e555',1,'turbojpeg.h']]],
|
||||||
['tjcs_5fycbcr_25',['TJCS_YCbCr',['../group___turbo_j_p_e_g.html#gga4f83ad3368e0e29d1957be0efa7c3720a7389b8f65bb387ffedce3efd0d78ec75',1,'turbojpeg.h']]],
|
['tjcs_5fycbcr_25',['TJCS_YCbCr',['../group___turbo_j_p_e_g.html#gga4f83ad3368e0e29d1957be0efa7c3720a7389b8f65bb387ffedce3efd0d78ec75',1,'turbojpeg.h']]],
|
||||||
['tjcs_5fycck_26',['TJCS_YCCK',['../group___turbo_j_p_e_g.html#gga4f83ad3368e0e29d1957be0efa7c3720a53839e0fe867b76b58d16b0a1a7c598e',1,'turbojpeg.h']]],
|
['tjcs_5fycck_26',['TJCS_YCCK',['../group___turbo_j_p_e_g.html#gga4f83ad3368e0e29d1957be0efa7c3720a53839e0fe867b76b58d16b0a1a7c598e',1,'turbojpeg.h']]],
|
||||||
['tjdecodeyuv_27',['tjDecodeYUV',['../group___turbo_j_p_e_g.html#ga70abbf38f77a26fd6da8813bef96f695',1,'turbojpeg.h']]],
|
['tjdecodeyuv_27',['tjDecodeYUV',['../group___turbo_j_p_e_g.html#ga97c2cedc1e2bade15a84164c94e503c1',1,'turbojpeg.h']]],
|
||||||
['tjdecodeyuvplanes_28',['tjDecodeYUVPlanes',['../group___turbo_j_p_e_g.html#ga10e837c07fa9d25770565b237d3898d9',1,'turbojpeg.h']]],
|
['tjdecodeyuvplanes_28',['tjDecodeYUVPlanes',['../group___turbo_j_p_e_g.html#ga10e837c07fa9d25770565b237d3898d9',1,'turbojpeg.h']]],
|
||||||
['tjdecompress2_29',['tjDecompress2',['../group___turbo_j_p_e_g.html#gae9eccef8b682a48f43a9117c231ed013',1,'turbojpeg.h']]],
|
['tjdecompress2_29',['tjDecompress2',['../group___turbo_j_p_e_g.html#gae9eccef8b682a48f43a9117c231ed013',1,'turbojpeg.h']]],
|
||||||
['tjdecompressheader3_30',['tjDecompressHeader3',['../group___turbo_j_p_e_g.html#ga0595681096bba7199cc6f3533cb25f77',1,'turbojpeg.h']]],
|
['tjdecompressheader3_30',['tjDecompressHeader3',['../group___turbo_j_p_e_g.html#ga0595681096bba7199cc6f3533cb25f77',1,'turbojpeg.h']]],
|
||||||
['tjdecompresstoyuv2_31',['tjDecompressToYUV2',['../group___turbo_j_p_e_g.html#ga04d1e839ff9a0860dd1475cff78d3364',1,'turbojpeg.h']]],
|
['tjdecompresstoyuv2_31',['tjDecompressToYUV2',['../group___turbo_j_p_e_g.html#ga5a3093e325598c17a9f004323af6fafa',1,'turbojpeg.h']]],
|
||||||
['tjdecompresstoyuvplanes_32',['tjDecompressToYUVPlanes',['../group___turbo_j_p_e_g.html#gaa59f901a5258ada5bd0185ad59368540',1,'turbojpeg.h']]],
|
['tjdecompresstoyuvplanes_32',['tjDecompressToYUVPlanes',['../group___turbo_j_p_e_g.html#gaa59f901a5258ada5bd0185ad59368540',1,'turbojpeg.h']]],
|
||||||
['tjdestroy_33',['tjDestroy',['../group___turbo_j_p_e_g.html#ga75f355fa27225ba1a4ee392c852394d2',1,'turbojpeg.h']]],
|
['tjdestroy_33',['tjDestroy',['../group___turbo_j_p_e_g.html#ga75f355fa27225ba1a4ee392c852394d2',1,'turbojpeg.h']]],
|
||||||
['tjencodeyuv3_34',['tjEncodeYUV3',['../group___turbo_j_p_e_g.html#gac519b922cdf446e97d0cdcba513636bf',1,'turbojpeg.h']]],
|
['tjencodeyuv3_34',['tjEncodeYUV3',['../group___turbo_j_p_e_g.html#ga5d619e0a02b71e05a8dffb764f6d7a64',1,'turbojpeg.h']]],
|
||||||
['tjencodeyuvplanes_35',['tjEncodeYUVPlanes',['../group___turbo_j_p_e_g.html#gae2d04c72457fe7f4d60cf78ab1b1feb1',1,'turbojpeg.h']]],
|
['tjencodeyuvplanes_35',['tjEncodeYUVPlanes',['../group___turbo_j_p_e_g.html#gae2d04c72457fe7f4d60cf78ab1b1feb1',1,'turbojpeg.h']]],
|
||||||
['tjerr_36',['TJERR',['../group___turbo_j_p_e_g.html#gafbc17cfa57d0d5d11fea35ac025950fe',1,'turbojpeg.h']]],
|
['tjerr_36',['TJERR',['../group___turbo_j_p_e_g.html#gafbc17cfa57d0d5d11fea35ac025950fe',1,'turbojpeg.h']]],
|
||||||
['tjerr_5ffatal_37',['TJERR_FATAL',['../group___turbo_j_p_e_g.html#ggafbc17cfa57d0d5d11fea35ac025950feafc9cceeada13122b09e4851e3788039a',1,'turbojpeg.h']]],
|
['tjerr_5ffatal_37',['TJERR_FATAL',['../group___turbo_j_p_e_g.html#ggafbc17cfa57d0d5d11fea35ac025950feafc9cceeada13122b09e4851e3788039a',1,'turbojpeg.h']]],
|
||||||
@@ -42,7 +42,7 @@ var searchData=
|
|||||||
['tjfree_47',['tjFree',['../group___turbo_j_p_e_g.html#gaea863d2da0cdb609563aabdf9196514b',1,'turbojpeg.h']]],
|
['tjfree_47',['tjFree',['../group___turbo_j_p_e_g.html#gaea863d2da0cdb609563aabdf9196514b',1,'turbojpeg.h']]],
|
||||||
['tjgeterrorcode_48',['tjGetErrorCode',['../group___turbo_j_p_e_g.html#ga414feeffbf860ebd31c745df203de410',1,'turbojpeg.h']]],
|
['tjgeterrorcode_48',['tjGetErrorCode',['../group___turbo_j_p_e_g.html#ga414feeffbf860ebd31c745df203de410',1,'turbojpeg.h']]],
|
||||||
['tjgeterrorstr2_49',['tjGetErrorStr2',['../group___turbo_j_p_e_g.html#ga1ead8574f9f39fbafc6b497124e7aafa',1,'turbojpeg.h']]],
|
['tjgeterrorstr2_49',['tjGetErrorStr2',['../group___turbo_j_p_e_g.html#ga1ead8574f9f39fbafc6b497124e7aafa',1,'turbojpeg.h']]],
|
||||||
['tjgetscalingfactors_50',['tjGetScalingFactors',['../group___turbo_j_p_e_g.html#gac3854476006b10787bd128f7ede48057',1,'turbojpeg.h']]],
|
['tjgetscalingfactors_50',['tjGetScalingFactors',['../group___turbo_j_p_e_g.html#ga193d0977b3b9966d53a6c402e90899b1',1,'turbojpeg.h']]],
|
||||||
['tjgreenoffset_51',['tjGreenOffset',['../group___turbo_j_p_e_g.html#ga82d6e35da441112a411da41923c0ba2f',1,'turbojpeg.h']]],
|
['tjgreenoffset_51',['tjGreenOffset',['../group___turbo_j_p_e_g.html#ga82d6e35da441112a411da41923c0ba2f',1,'turbojpeg.h']]],
|
||||||
['tjhandle_52',['tjhandle',['../group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763',1,'turbojpeg.h']]],
|
['tjhandle_52',['tjhandle',['../group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763',1,'turbojpeg.h']]],
|
||||||
['tjinitcompress_53',['tjInitCompress',['../group___turbo_j_p_e_g.html#ga9d63a05fc6d813f4aae06107041a37e8',1,'turbojpeg.h']]],
|
['tjinitcompress_53',['tjInitCompress',['../group___turbo_j_p_e_g.html#ga9d63a05fc6d813f4aae06107041a37e8',1,'turbojpeg.h']]],
|
||||||
@@ -82,7 +82,7 @@ var searchData=
|
|||||||
['tjsaveimage_87',['tjSaveImage',['../group___turbo_j_p_e_g.html#ga6f445b22d8933ae4815b3370a538d879',1,'turbojpeg.h']]],
|
['tjsaveimage_87',['tjSaveImage',['../group___turbo_j_p_e_g.html#ga6f445b22d8933ae4815b3370a538d879',1,'turbojpeg.h']]],
|
||||||
['tjscaled_88',['TJSCALED',['../group___turbo_j_p_e_g.html#ga84878bb65404204743aa18cac02781df',1,'turbojpeg.h']]],
|
['tjscaled_88',['TJSCALED',['../group___turbo_j_p_e_g.html#ga84878bb65404204743aa18cac02781df',1,'turbojpeg.h']]],
|
||||||
['tjscalingfactor_89',['tjscalingfactor',['../structtjscalingfactor.html',1,'']]],
|
['tjscalingfactor_89',['tjscalingfactor',['../structtjscalingfactor.html',1,'']]],
|
||||||
['tjtransform_90',['tjtransform',['../structtjtransform.html',1,'tjtransform'],['../group___turbo_j_p_e_g.html#ga504805ec0161f1b505397ca0118bf8fd',1,'tjtransform(): turbojpeg.h'],['../group___turbo_j_p_e_g.html#ga9cb8abf4cc91881e04a0329b2270be25',1,'tjTransform(tjhandle handle, const unsigned char *jpegBuf, unsigned long jpegSize, int n, unsigned char **dstBufs, unsigned long *dstSizes, tjtransform *transforms, int flags): turbojpeg.h']]],
|
['tjtransform_90',['tjtransform',['../structtjtransform.html',1,'tjtransform'],['../group___turbo_j_p_e_g.html#ga9cb8abf4cc91881e04a0329b2270be25',1,'tjTransform(tjhandle handle, const 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#ga504805ec0161f1b505397ca0118bf8fd',1,'tjtransform(): turbojpeg.h']]],
|
||||||
['tjxop_91',['TJXOP',['../group___turbo_j_p_e_g.html#ga2de531af4e7e6c4f124908376b354866',1,'turbojpeg.h']]],
|
['tjxop_91',['TJXOP',['../group___turbo_j_p_e_g.html#ga2de531af4e7e6c4f124908376b354866',1,'turbojpeg.h']]],
|
||||||
['tjxop_5fhflip_92',['TJXOP_HFLIP',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866aa0df69776caa30f0fa28e26332d311ce',1,'turbojpeg.h']]],
|
['tjxop_5fhflip_92',['TJXOP_HFLIP',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866aa0df69776caa30f0fa28e26332d311ce',1,'turbojpeg.h']]],
|
||||||
['tjxop_5fnone_93',['TJXOP_NONE',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866aad88c0366cd3f7d0eac9d7a3fa1c2c27',1,'turbojpeg.h']]],
|
['tjxop_5fnone_93',['TJXOP_NONE',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866aad88c0366cd3f7d0eac9d7a3fa1c2c27',1,'turbojpeg.h']]],
|
||||||
|
|||||||
@@ -2,23 +2,23 @@ var searchData=
|
|||||||
[
|
[
|
||||||
['tjalloc_114',['tjAlloc',['../group___turbo_j_p_e_g.html#gaec627dd4c5f30b7a775a7aea3bec5d83',1,'turbojpeg.h']]],
|
['tjalloc_114',['tjAlloc',['../group___turbo_j_p_e_g.html#gaec627dd4c5f30b7a775a7aea3bec5d83',1,'turbojpeg.h']]],
|
||||||
['tjbufsize_115',['tjBufSize',['../group___turbo_j_p_e_g.html#ga67ac12fee79073242cb216e07c9f1f90',1,'turbojpeg.h']]],
|
['tjbufsize_115',['tjBufSize',['../group___turbo_j_p_e_g.html#ga67ac12fee79073242cb216e07c9f1f90',1,'turbojpeg.h']]],
|
||||||
['tjbufsizeyuv2_116',['tjBufSizeYUV2',['../group___turbo_j_p_e_g.html#ga2be2b9969d4df9ecce9b05deed273194',1,'turbojpeg.h']]],
|
['tjbufsizeyuv2_116',['tjBufSizeYUV2',['../group___turbo_j_p_e_g.html#ga5e5aac9e8bcf17049279301e2466474c',1,'turbojpeg.h']]],
|
||||||
['tjcompress2_117',['tjCompress2',['../group___turbo_j_p_e_g.html#gafbdce0112fd78fd38efae841443a9bcf',1,'turbojpeg.h']]],
|
['tjcompress2_117',['tjCompress2',['../group___turbo_j_p_e_g.html#gafbdce0112fd78fd38efae841443a9bcf',1,'turbojpeg.h']]],
|
||||||
['tjcompressfromyuv_118',['tjCompressFromYUV',['../group___turbo_j_p_e_g.html#ga7622a459b79aa1007e005b58783f875b',1,'turbojpeg.h']]],
|
['tjcompressfromyuv_118',['tjCompressFromYUV',['../group___turbo_j_p_e_g.html#gab40f5096a72fd7e5bda9d6b58fa37e2e',1,'turbojpeg.h']]],
|
||||||
['tjcompressfromyuvplanes_119',['tjCompressFromYUVPlanes',['../group___turbo_j_p_e_g.html#ga29ec5dfbd2d84b8724e951d6fa0d5d9e',1,'turbojpeg.h']]],
|
['tjcompressfromyuvplanes_119',['tjCompressFromYUVPlanes',['../group___turbo_j_p_e_g.html#ga29ec5dfbd2d84b8724e951d6fa0d5d9e',1,'turbojpeg.h']]],
|
||||||
['tjdecodeyuv_120',['tjDecodeYUV',['../group___turbo_j_p_e_g.html#ga70abbf38f77a26fd6da8813bef96f695',1,'turbojpeg.h']]],
|
['tjdecodeyuv_120',['tjDecodeYUV',['../group___turbo_j_p_e_g.html#ga97c2cedc1e2bade15a84164c94e503c1',1,'turbojpeg.h']]],
|
||||||
['tjdecodeyuvplanes_121',['tjDecodeYUVPlanes',['../group___turbo_j_p_e_g.html#ga10e837c07fa9d25770565b237d3898d9',1,'turbojpeg.h']]],
|
['tjdecodeyuvplanes_121',['tjDecodeYUVPlanes',['../group___turbo_j_p_e_g.html#ga10e837c07fa9d25770565b237d3898d9',1,'turbojpeg.h']]],
|
||||||
['tjdecompress2_122',['tjDecompress2',['../group___turbo_j_p_e_g.html#gae9eccef8b682a48f43a9117c231ed013',1,'turbojpeg.h']]],
|
['tjdecompress2_122',['tjDecompress2',['../group___turbo_j_p_e_g.html#gae9eccef8b682a48f43a9117c231ed013',1,'turbojpeg.h']]],
|
||||||
['tjdecompressheader3_123',['tjDecompressHeader3',['../group___turbo_j_p_e_g.html#ga0595681096bba7199cc6f3533cb25f77',1,'turbojpeg.h']]],
|
['tjdecompressheader3_123',['tjDecompressHeader3',['../group___turbo_j_p_e_g.html#ga0595681096bba7199cc6f3533cb25f77',1,'turbojpeg.h']]],
|
||||||
['tjdecompresstoyuv2_124',['tjDecompressToYUV2',['../group___turbo_j_p_e_g.html#ga04d1e839ff9a0860dd1475cff78d3364',1,'turbojpeg.h']]],
|
['tjdecompresstoyuv2_124',['tjDecompressToYUV2',['../group___turbo_j_p_e_g.html#ga5a3093e325598c17a9f004323af6fafa',1,'turbojpeg.h']]],
|
||||||
['tjdecompresstoyuvplanes_125',['tjDecompressToYUVPlanes',['../group___turbo_j_p_e_g.html#gaa59f901a5258ada5bd0185ad59368540',1,'turbojpeg.h']]],
|
['tjdecompresstoyuvplanes_125',['tjDecompressToYUVPlanes',['../group___turbo_j_p_e_g.html#gaa59f901a5258ada5bd0185ad59368540',1,'turbojpeg.h']]],
|
||||||
['tjdestroy_126',['tjDestroy',['../group___turbo_j_p_e_g.html#ga75f355fa27225ba1a4ee392c852394d2',1,'turbojpeg.h']]],
|
['tjdestroy_126',['tjDestroy',['../group___turbo_j_p_e_g.html#ga75f355fa27225ba1a4ee392c852394d2',1,'turbojpeg.h']]],
|
||||||
['tjencodeyuv3_127',['tjEncodeYUV3',['../group___turbo_j_p_e_g.html#gac519b922cdf446e97d0cdcba513636bf',1,'turbojpeg.h']]],
|
['tjencodeyuv3_127',['tjEncodeYUV3',['../group___turbo_j_p_e_g.html#ga5d619e0a02b71e05a8dffb764f6d7a64',1,'turbojpeg.h']]],
|
||||||
['tjencodeyuvplanes_128',['tjEncodeYUVPlanes',['../group___turbo_j_p_e_g.html#gae2d04c72457fe7f4d60cf78ab1b1feb1',1,'turbojpeg.h']]],
|
['tjencodeyuvplanes_128',['tjEncodeYUVPlanes',['../group___turbo_j_p_e_g.html#gae2d04c72457fe7f4d60cf78ab1b1feb1',1,'turbojpeg.h']]],
|
||||||
['tjfree_129',['tjFree',['../group___turbo_j_p_e_g.html#gaea863d2da0cdb609563aabdf9196514b',1,'turbojpeg.h']]],
|
['tjfree_129',['tjFree',['../group___turbo_j_p_e_g.html#gaea863d2da0cdb609563aabdf9196514b',1,'turbojpeg.h']]],
|
||||||
['tjgeterrorcode_130',['tjGetErrorCode',['../group___turbo_j_p_e_g.html#ga414feeffbf860ebd31c745df203de410',1,'turbojpeg.h']]],
|
['tjgeterrorcode_130',['tjGetErrorCode',['../group___turbo_j_p_e_g.html#ga414feeffbf860ebd31c745df203de410',1,'turbojpeg.h']]],
|
||||||
['tjgeterrorstr2_131',['tjGetErrorStr2',['../group___turbo_j_p_e_g.html#ga1ead8574f9f39fbafc6b497124e7aafa',1,'turbojpeg.h']]],
|
['tjgeterrorstr2_131',['tjGetErrorStr2',['../group___turbo_j_p_e_g.html#ga1ead8574f9f39fbafc6b497124e7aafa',1,'turbojpeg.h']]],
|
||||||
['tjgetscalingfactors_132',['tjGetScalingFactors',['../group___turbo_j_p_e_g.html#gac3854476006b10787bd128f7ede48057',1,'turbojpeg.h']]],
|
['tjgetscalingfactors_132',['tjGetScalingFactors',['../group___turbo_j_p_e_g.html#ga193d0977b3b9966d53a6c402e90899b1',1,'turbojpeg.h']]],
|
||||||
['tjinitcompress_133',['tjInitCompress',['../group___turbo_j_p_e_g.html#ga9d63a05fc6d813f4aae06107041a37e8',1,'turbojpeg.h']]],
|
['tjinitcompress_133',['tjInitCompress',['../group___turbo_j_p_e_g.html#ga9d63a05fc6d813f4aae06107041a37e8',1,'turbojpeg.h']]],
|
||||||
['tjinitdecompress_134',['tjInitDecompress',['../group___turbo_j_p_e_g.html#ga52300eac3f3d9ef4bab303bc244f62d3',1,'turbojpeg.h']]],
|
['tjinitdecompress_134',['tjInitDecompress',['../group___turbo_j_p_e_g.html#ga52300eac3f3d9ef4bab303bc244f62d3',1,'turbojpeg.h']]],
|
||||||
['tjinittransform_135',['tjInitTransform',['../group___turbo_j_p_e_g.html#ga928beff6ac248ceadf01089fc6b41957',1,'turbojpeg.h']]],
|
['tjinittransform_135',['tjInitTransform',['../group___turbo_j_p_e_g.html#ga928beff6ac248ceadf01089fc6b41957',1,'turbojpeg.h']]],
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ Data Fields</h2></td></tr>
|
|||||||
<tr class="memdesc:a2525aab4ba6978a1c273f74fef50e498"><td class="mdescLeft"> </td><td class="mdescRight">One of the <a class="el" href="group___turbo_j_p_e_g.html#ga2de531af4e7e6c4f124908376b354866">transform operations</a>. <a href="structtjtransform.html#a2525aab4ba6978a1c273f74fef50e498">More...</a><br /></td></tr>
|
<tr class="memdesc:a2525aab4ba6978a1c273f74fef50e498"><td class="mdescLeft"> </td><td class="mdescRight">One of the <a class="el" href="group___turbo_j_p_e_g.html#ga2de531af4e7e6c4f124908376b354866">transform operations</a>. <a href="structtjtransform.html#a2525aab4ba6978a1c273f74fef50e498">More...</a><br /></td></tr>
|
||||||
<tr class="separator:a2525aab4ba6978a1c273f74fef50e498"><td class="memSeparator" colspan="2"> </td></tr>
|
<tr class="separator:a2525aab4ba6978a1c273f74fef50e498"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
<tr class="memitem:ac0e74655baa4402209a21e1ae481c8f6"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="structtjtransform.html#ac0e74655baa4402209a21e1ae481c8f6">options</a></td></tr>
|
<tr class="memitem:ac0e74655baa4402209a21e1ae481c8f6"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="structtjtransform.html#ac0e74655baa4402209a21e1ae481c8f6">options</a></td></tr>
|
||||||
<tr class="memdesc:ac0e74655baa4402209a21e1ae481c8f6"><td class="mdescLeft"> </td><td class="mdescRight">The bitwise OR of one of more of the <a class="el" href="group___turbo_j_p_e_g.html#ga9c771a757fc1294add611906b89ab2d2">transform options</a>. <a href="structtjtransform.html#ac0e74655baa4402209a21e1ae481c8f6">More...</a><br /></td></tr>
|
<tr class="memdesc:ac0e74655baa4402209a21e1ae481c8f6"><td class="mdescLeft"> </td><td class="mdescRight">The bitwise OR of one of more of the <a class="el" href="group___turbo_j_p_e_g.html#ga153b468cfb905d0de61706c838986fe8">transform options</a>. <a href="structtjtransform.html#ac0e74655baa4402209a21e1ae481c8f6">More...</a><br /></td></tr>
|
||||||
<tr class="separator:ac0e74655baa4402209a21e1ae481c8f6"><td class="memSeparator" colspan="2"> </td></tr>
|
<tr class="separator:ac0e74655baa4402209a21e1ae481c8f6"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
<tr class="memitem:a688fe8f1a8ecc12a538d9e561cf338e3"><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="structtjtransform.html#a688fe8f1a8ecc12a538d9e561cf338e3">data</a></td></tr>
|
<tr class="memitem:a688fe8f1a8ecc12a538d9e561cf338e3"><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="structtjtransform.html#a688fe8f1a8ecc12a538d9e561cf338e3">data</a></td></tr>
|
||||||
<tr class="memdesc:a688fe8f1a8ecc12a538d9e561cf338e3"><td class="mdescLeft"> </td><td class="mdescRight">Arbitrary data that can be accessed within the body of the callback function. <a href="structtjtransform.html#a688fe8f1a8ecc12a538d9e561cf338e3">More...</a><br /></td></tr>
|
<tr class="memdesc:a688fe8f1a8ecc12a538d9e561cf338e3"><td class="mdescLeft"> </td><td class="mdescRight">Arbitrary data that can be accessed within the body of the callback function. <a href="structtjtransform.html#a688fe8f1a8ecc12a538d9e561cf338e3">More...</a><br /></td></tr>
|
||||||
@@ -115,7 +115,7 @@ Data Fields</h2></td></tr>
|
|||||||
<tr><td class="paramname">coeffs</td><td>pointer to an array of transformed DCT coefficients. (NOTE: this pointer is not guaranteed to be valid once the callback returns, so applications wishing to hand off the DCT coefficients to another function or library should make a copy of them within the body of the callback.)</td></tr>
|
<tr><td class="paramname">coeffs</td><td>pointer to an array of transformed DCT coefficients. (NOTE: this pointer is not guaranteed to be valid once the callback returns, so applications wishing to hand off the DCT coefficients to another function or library should make a copy of them within the body of the callback.)</td></tr>
|
||||||
<tr><td class="paramname">arrayRegion</td><td><a class="el" href="structtjregion.html" title="Cropping region.">tjregion</a> structure containing the width and height of the array pointed to by <code>coeffs</code> as well as its offset relative to the component plane. TurboJPEG implementations may choose to split each component plane into multiple DCT coefficient arrays and call the callback function once for each array.</td></tr>
|
<tr><td class="paramname">arrayRegion</td><td><a class="el" href="structtjregion.html" title="Cropping region.">tjregion</a> structure containing the width and height of the array pointed to by <code>coeffs</code> as well as its offset relative to the component plane. TurboJPEG implementations may choose to split each component plane into multiple DCT coefficient arrays and call the callback function once for each array.</td></tr>
|
||||||
<tr><td class="paramname">planeRegion</td><td><a class="el" href="structtjregion.html" title="Cropping region.">tjregion</a> structure containing the width and height of the component plane to which <code>coeffs</code> belongs</td></tr>
|
<tr><td class="paramname">planeRegion</td><td><a class="el" href="structtjregion.html" title="Cropping region.">tjregion</a> structure containing the width and height of the component plane to which <code>coeffs</code> belongs</td></tr>
|
||||||
<tr><td class="paramname">componentID</td><td>ID number of the component plane to which <code>coeffs</code> belongs (Y, Cb, and Cr have, respectively, ID's of 0, 1, and 2 in typical JPEG images.)</td></tr>
|
<tr><td class="paramname">componentID</td><td>ID number of the component plane to which <code>coeffs</code> belongs. (Y, Cb, and Cr have, respectively, ID's of 0, 1, and 2 in typical JPEG images.)</td></tr>
|
||||||
<tr><td class="paramname">transformID</td><td>ID number of the transformed image to which <code>coeffs</code> belongs. This is the same as the index of the transform in the <code>transforms</code> array that was passed to <a class="el" href="group___turbo_j_p_e_g.html#ga9cb8abf4cc91881e04a0329b2270be25" title="Losslessly transform a JPEG image into another JPEG image.">tjTransform()</a>.</td></tr>
|
<tr><td class="paramname">transformID</td><td>ID number of the transformed image to which <code>coeffs</code> belongs. This is the same as the index of the transform in the <code>transforms</code> array that was passed to <a class="el" href="group___turbo_j_p_e_g.html#ga9cb8abf4cc91881e04a0329b2270be25" title="Losslessly transform a JPEG image into another JPEG image.">tjTransform()</a>.</td></tr>
|
||||||
<tr><td class="paramname">transform</td><td>a pointer to a <a class="el" href="structtjtransform.html" title="Lossless transform.">tjtransform</a> structure that specifies the parameters and/or cropping region for this transform</td></tr>
|
<tr><td class="paramname">transform</td><td>a pointer to a <a class="el" href="structtjtransform.html" title="Lossless transform.">tjtransform</a> structure that specifies the parameters and/or cropping region for this transform</td></tr>
|
||||||
</table>
|
</table>
|
||||||
@@ -169,7 +169,7 @@ Data Fields</h2></td></tr>
|
|||||||
</table>
|
</table>
|
||||||
</div><div class="memdoc">
|
</div><div class="memdoc">
|
||||||
|
|
||||||
<p>The bitwise OR of one of more of the <a class="el" href="group___turbo_j_p_e_g.html#ga9c771a757fc1294add611906b89ab2d2">transform options</a>. </p>
|
<p>The bitwise OR of one of more of the <a class="el" href="group___turbo_j_p_e_g.html#ga153b468cfb905d0de61706c838986fe8">transform options</a>. </p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C)2009-2014, 2016-2019, 2021 D. R. Commander.
|
* Copyright (C)2009-2014, 2016-2019, 2021, 2023 D. R. Commander.
|
||||||
* All Rights Reserved.
|
* All Rights Reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@@ -37,7 +37,7 @@ final class TJBench {
|
|||||||
|
|
||||||
private TJBench() {}
|
private TJBench() {}
|
||||||
|
|
||||||
private static int flags = 0, quiet = 0, pf = TJ.PF_BGR, yuvPad = 1;
|
private static int flags = 0, quiet = 0, pf = TJ.PF_BGR, yuvAlign = 1;
|
||||||
private static boolean compOnly, decompOnly, doTile, doYUV, write = true;
|
private static boolean compOnly, decompOnly, doTile, doYUV, write = true;
|
||||||
|
|
||||||
static final String[] PIXFORMATSTR = {
|
static final String[] PIXFORMATSTR = {
|
||||||
@@ -192,7 +192,7 @@ final class TJBench {
|
|||||||
int width = doTile ? tilew : scaledw;
|
int width = doTile ? tilew : scaledw;
|
||||||
int height = doTile ? tileh : scaledh;
|
int height = doTile ? tileh : scaledh;
|
||||||
|
|
||||||
yuvImage = new YUVImage(width, yuvPad, height, subsamp);
|
yuvImage = new YUVImage(width, yuvAlign, height, subsamp);
|
||||||
Arrays.fill(yuvImage.getBuf(), (byte)127);
|
Arrays.fill(yuvImage.getBuf(), (byte)127);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -212,7 +212,8 @@ final class TJBench {
|
|||||||
tjd.setSourceImage(jpegBuf[tile], jpegSize[tile]);
|
tjd.setSourceImage(jpegBuf[tile], jpegSize[tile]);
|
||||||
} catch (TJException e) { handleTJException(e); }
|
} catch (TJException e) { handleTJException(e); }
|
||||||
if (doYUV) {
|
if (doYUV) {
|
||||||
yuvImage.setBuf(yuvImage.getBuf(), width, yuvPad, height, subsamp);
|
yuvImage.setBuf(yuvImage.getBuf(), width, yuvAlign, height,
|
||||||
|
subsamp);
|
||||||
try {
|
try {
|
||||||
tjd.decompressToYUV(yuvImage, flags);
|
tjd.decompressToYUV(yuvImage, flags);
|
||||||
} catch (TJException e) { handleTJException(e); }
|
} catch (TJException e) { handleTJException(e); }
|
||||||
@@ -372,7 +373,7 @@ final class TJBench {
|
|||||||
tjc.setSubsamp(subsamp);
|
tjc.setSubsamp(subsamp);
|
||||||
|
|
||||||
if (doYUV) {
|
if (doYUV) {
|
||||||
yuvImage = new YUVImage(tilew, yuvPad, tileh, subsamp);
|
yuvImage = new YUVImage(tilew, yuvAlign, tileh, subsamp);
|
||||||
Arrays.fill(yuvImage.getBuf(), (byte)127);
|
Arrays.fill(yuvImage.getBuf(), (byte)127);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -393,7 +394,7 @@ final class TJBench {
|
|||||||
if (doYUV) {
|
if (doYUV) {
|
||||||
double startEncode = getTime();
|
double startEncode = getTime();
|
||||||
|
|
||||||
yuvImage.setBuf(yuvImage.getBuf(), width, yuvPad, height,
|
yuvImage.setBuf(yuvImage.getBuf(), width, yuvAlign, height,
|
||||||
subsamp);
|
subsamp);
|
||||||
tjc.encodeYUV(yuvImage, flags);
|
tjc.encodeYUV(yuvImage, flags);
|
||||||
if (iter >= 0)
|
if (iter >= 0)
|
||||||
@@ -720,8 +721,8 @@ final class TJBench {
|
|||||||
System.out.println("-quiet = Output results in tabular rather than verbose format");
|
System.out.println("-quiet = Output results in tabular rather than verbose format");
|
||||||
System.out.println("-yuv = Test YUV encoding/decoding functions");
|
System.out.println("-yuv = Test YUV encoding/decoding functions");
|
||||||
System.out.println("-yuvpad <p> = If testing YUV encoding/decoding, this specifies the number of");
|
System.out.println("-yuvpad <p> = If testing YUV encoding/decoding, this specifies the number of");
|
||||||
System.out.println(" bytes to which each row of each plane in the intermediate YUV image is");
|
System.out.println(" bytes by which each row of each plane in the intermediate YUV image is");
|
||||||
System.out.println(" padded (default = 1)");
|
System.out.println(" evenly divisible (default = 1)");
|
||||||
System.out.println("-scale M/N = Scale down the width/height of the decompressed JPEG image by a");
|
System.out.println("-scale M/N = Scale down the width/height of the decompressed JPEG image by a");
|
||||||
System.out.print(" factor of M/N (M/N = ");
|
System.out.print(" factor of M/N (M/N = ");
|
||||||
for (i = 0; i < nsf; i++) {
|
for (i = 0; i < nsf; i++) {
|
||||||
@@ -902,7 +903,7 @@ final class TJBench {
|
|||||||
} else
|
} else
|
||||||
usage();
|
usage();
|
||||||
} else if (argv[i].equalsIgnoreCase("-yuv")) {
|
} else if (argv[i].equalsIgnoreCase("-yuv")) {
|
||||||
System.out.println("Testing YUV planar encoding/decoding\n");
|
System.out.println("Testing planar YUV encoding/decoding\n");
|
||||||
doYUV = true;
|
doYUV = true;
|
||||||
} else if (argv[i].equalsIgnoreCase("-yuvpad") &&
|
} else if (argv[i].equalsIgnoreCase("-yuvpad") &&
|
||||||
i < argv.length - 1) {
|
i < argv.length - 1) {
|
||||||
@@ -912,7 +913,7 @@ final class TJBench {
|
|||||||
temp = Integer.parseInt(argv[++i]);
|
temp = Integer.parseInt(argv[++i]);
|
||||||
} catch (NumberFormatException e) {}
|
} catch (NumberFormatException e) {}
|
||||||
if (temp >= 1)
|
if (temp >= 1)
|
||||||
yuvPad = temp;
|
yuvAlign = temp;
|
||||||
} else if (argv[i].equalsIgnoreCase("-subsamp") &&
|
} else if (argv[i].equalsIgnoreCase("-subsamp") &&
|
||||||
i < argv.length - 1) {
|
i < argv.length - 1) {
|
||||||
i++;
|
i++;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C)2011-2018 D. R. Commander. All Rights Reserved.
|
* Copyright (C)2011-2018, 2023 D. R. Commander. All Rights Reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
@@ -50,7 +50,7 @@ final class TJUnitTest {
|
|||||||
System.out.println("Options:");
|
System.out.println("Options:");
|
||||||
System.out.println("-yuv = test YUV encoding/decoding support");
|
System.out.println("-yuv = test YUV encoding/decoding support");
|
||||||
System.out.println("-noyuvpad = do not pad each line of each Y, U, and V plane to the nearest");
|
System.out.println("-noyuvpad = do not pad each line of each Y, U, and V plane to the nearest");
|
||||||
System.out.println(" 4-byte boundary");
|
System.out.println(" multiple of 4 bytes");
|
||||||
System.out.println("-bi = test BufferedImage support\n");
|
System.out.println("-bi = test BufferedImage support\n");
|
||||||
System.exit(1);
|
System.exit(1);
|
||||||
}
|
}
|
||||||
@@ -92,7 +92,7 @@ final class TJUnitTest {
|
|||||||
};
|
};
|
||||||
|
|
||||||
private static boolean doYUV = false;
|
private static boolean doYUV = false;
|
||||||
private static int pad = 4;
|
private static int yuvAlign = 4;
|
||||||
private static boolean bi = false;
|
private static boolean bi = false;
|
||||||
|
|
||||||
private static int exitStatus = 0;
|
private static int exitStatus = 0;
|
||||||
@@ -532,7 +532,7 @@ final class TJUnitTest {
|
|||||||
int hsf = TJ.getMCUWidth(subsamp) / 8, vsf = TJ.getMCUHeight(subsamp) / 8;
|
int hsf = TJ.getMCUWidth(subsamp) / 8, vsf = TJ.getMCUHeight(subsamp) / 8;
|
||||||
int pw = pad(w, hsf), ph = pad(h, vsf);
|
int pw = pad(w, hsf), ph = pad(h, vsf);
|
||||||
int cw = pw / hsf, ch = ph / vsf;
|
int cw = pw / hsf, ch = ph / vsf;
|
||||||
int ypitch = pad(pw, pad), uvpitch = pad(cw, pad);
|
int ypitch = pad(pw, yuvAlign), uvpitch = pad(cw, yuvAlign);
|
||||||
int retval = 1;
|
int retval = 1;
|
||||||
int correctsize = ypitch * ph +
|
int correctsize = ypitch * ph +
|
||||||
(subsamp == TJ.SAMP_GRAY ? 0 : uvpitch * ch * 2);
|
(subsamp == TJ.SAMP_GRAY ? 0 : uvpitch * ch * 2);
|
||||||
@@ -668,7 +668,7 @@ final class TJUnitTest {
|
|||||||
if (doYUV) {
|
if (doYUV) {
|
||||||
System.out.format("%s %s -> YUV %s ... ", pfStrLong, buStrLong,
|
System.out.format("%s %s -> YUV %s ... ", pfStrLong, buStrLong,
|
||||||
SUBNAME_LONG[subsamp]);
|
SUBNAME_LONG[subsamp]);
|
||||||
YUVImage yuvImage = tjc.encodeYUV(pad, flags);
|
YUVImage yuvImage = tjc.encodeYUV(yuvAlign, flags);
|
||||||
if (checkBufYUV(yuvImage.getBuf(), yuvImage.getSize(), w, h, subsamp,
|
if (checkBufYUV(yuvImage.getBuf(), yuvImage.getSize(), w, h, subsamp,
|
||||||
new TJScalingFactor(1, 1)) == 1)
|
new TJScalingFactor(1, 1)) == 1)
|
||||||
System.out.print("Passed.\n");
|
System.out.print("Passed.\n");
|
||||||
@@ -733,8 +733,8 @@ final class TJUnitTest {
|
|||||||
if (!sf.isOne())
|
if (!sf.isOne())
|
||||||
System.out.format("%d/%d ... ", sf.getNum(), sf.getDenom());
|
System.out.format("%d/%d ... ", sf.getNum(), sf.getDenom());
|
||||||
else System.out.print("... ");
|
else System.out.print("... ");
|
||||||
YUVImage yuvImage = tjd.decompressToYUV(scaledWidth, pad, scaledHeight,
|
YUVImage yuvImage = tjd.decompressToYUV(scaledWidth, yuvAlign,
|
||||||
flags);
|
scaledHeight, flags);
|
||||||
if (checkBufYUV(yuvImage.getBuf(), yuvImage.getSize(), scaledWidth,
|
if (checkBufYUV(yuvImage.getBuf(), yuvImage.getSize(), scaledWidth,
|
||||||
scaledHeight, subsamp, sf) == 1)
|
scaledHeight, subsamp, sf) == 1)
|
||||||
System.out.print("Passed.\n");
|
System.out.print("Passed.\n");
|
||||||
@@ -855,7 +855,7 @@ final class TJUnitTest {
|
|||||||
System.out.format("%04d x %04d\b\b\b\b\b\b\b\b\b\b\b", w, h);
|
System.out.format("%04d x %04d\b\b\b\b\b\b\b\b\b\b\b", w, h);
|
||||||
srcBuf = new byte[w * h * 4];
|
srcBuf = new byte[w * h * 4];
|
||||||
if (doYUV)
|
if (doYUV)
|
||||||
dstImage = new YUVImage(w, pad, h, subsamp);
|
dstImage = new YUVImage(w, yuvAlign, h, subsamp);
|
||||||
else
|
else
|
||||||
dstBuf = new byte[TJ.bufSize(w, h, subsamp)];
|
dstBuf = new byte[TJ.bufSize(w, h, subsamp)];
|
||||||
for (i = 0; i < w * h * 4; i++) {
|
for (i = 0; i < w * h * 4; i++) {
|
||||||
@@ -871,7 +871,7 @@ final class TJUnitTest {
|
|||||||
|
|
||||||
srcBuf = new byte[h * w * 4];
|
srcBuf = new byte[h * w * 4];
|
||||||
if (doYUV)
|
if (doYUV)
|
||||||
dstImage = new YUVImage(h, pad, w, subsamp);
|
dstImage = new YUVImage(h, yuvAlign, w, subsamp);
|
||||||
else
|
else
|
||||||
dstBuf = new byte[TJ.bufSize(h, w, subsamp)];
|
dstBuf = new byte[TJ.bufSize(h, w, subsamp)];
|
||||||
for (i = 0; i < h * w * 4; i++) {
|
for (i = 0; i < h * w * 4; i++) {
|
||||||
@@ -903,7 +903,7 @@ final class TJUnitTest {
|
|||||||
if (argv[i].equalsIgnoreCase("-yuv"))
|
if (argv[i].equalsIgnoreCase("-yuv"))
|
||||||
doYUV = true;
|
doYUV = true;
|
||||||
else if (argv[i].equalsIgnoreCase("-noyuvpad"))
|
else if (argv[i].equalsIgnoreCase("-noyuvpad"))
|
||||||
pad = 1;
|
yuvAlign = 1;
|
||||||
else if (argv[i].equalsIgnoreCase("-bi")) {
|
else if (argv[i].equalsIgnoreCase("-bi")) {
|
||||||
bi = true;
|
bi = true;
|
||||||
testName = "javabitest";
|
testName = "javabitest";
|
||||||
|
|||||||
@@ -74,8 +74,9 @@
|
|||||||
</dd>
|
</dd>
|
||||||
<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>
|
<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 unified
|
||||||
image with the given width, height, and level of chrominance subsampling.</div>
|
planar YUV 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,%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>
|
<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>
|
||||||
@@ -103,13 +104,14 @@
|
|||||||
</dd>
|
</dd>
|
||||||
<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>
|
<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 packed-pixel or planar YUV source image associated with this
|
||||||
instance and output a JPEG image to the given destination buffer.</div>
|
compressor instance and output a JPEG image to the given destination
|
||||||
|
buffer.</div>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJCompressor.html#compress(int)">compress(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(int)">compress(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 packed-pixel or planar YUV source image associated with this
|
||||||
instance and return a buffer containing a JPEG image.</div>
|
compressor 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,%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>
|
<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>
|
||||||
@@ -161,9 +163,9 @@
|
|||||||
<dl>
|
<dl>
|
||||||
<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>
|
<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 planar YUV source image
|
||||||
with this decompressor instance and output a grayscale, RGB, or CMYK image
|
associated with this decompressor instance and output a packed-pixel
|
||||||
to the given destination buffer.</div>
|
grayscale, RGB, or CMYK image to the given destination buffer.</div>
|
||||||
</dd>
|
</dd>
|
||||||
<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>
|
<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>
|
||||||
@@ -174,32 +176,34 @@
|
|||||||
</dd>
|
</dd>
|
||||||
<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>
|
<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 or decode the planar YUV source image
|
||||||
instance and return a buffer containing the decompressed image.</div>
|
associated with this decompressor instance and return a buffer containing
|
||||||
|
the packed-pixel decompressed image.</div>
|
||||||
</dd>
|
</dd>
|
||||||
<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>
|
<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 planar YUV source image
|
||||||
with this decompressor instance and output a grayscale, RGB, or CMYK image
|
associated with this decompressor instance and output a packed-pixel
|
||||||
to the given destination buffer.</div>
|
grayscale, RGB, or CMYK image to the given destination buffer.</div>
|
||||||
</dd>
|
</dd>
|
||||||
<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>
|
<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 planar YUV source image
|
||||||
with this decompressor instance and output a decompressed/decoded image to
|
associated with this decompressor instance and output a packed-pixel
|
||||||
the given <code>BufferedImage</code> instance.</div>
|
decompressed/decoded image to the given <code>BufferedImage</code>
|
||||||
|
instance.</div>
|
||||||
</dd>
|
</dd>
|
||||||
<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>
|
<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 packed-pixel decompressed/decoded image.</div>
|
||||||
</dd>
|
</dd>
|
||||||
<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>
|
<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 planar YUV image and store it in the given
|
||||||
<code>YUVImage</code> instance.</div>
|
<a href="./org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>YUVImage</code></a> instance.</div>
|
||||||
</dd>
|
</dd>
|
||||||
<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>
|
<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>
|
||||||
@@ -211,13 +215,13 @@
|
|||||||
<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 set of Y, U (Cb), and V (Cr) image planes and return a
|
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>
|
<a href="./org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>YUVImage</code></a> instance containing the decompressed image planes.</div>
|
||||||
</dd>
|
</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>
|
<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 unified YUV planar image buffer and return a
|
instance into a unified planar YUV image and return a <a href="./org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>YUVImage</code></a>
|
||||||
<code>YUVImage</code> instance containing the decompressed image.</div>
|
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>
|
||||||
@@ -233,9 +237,9 @@
|
|||||||
<dl>
|
<dl>
|
||||||
<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>
|
<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 packed-pixel source image associated with this compressor
|
||||||
instance into a YUV planar image and store it in the given
|
instance into a planar YUV image and store it in the given
|
||||||
<code>YUVImage</code> instance.</div>
|
<a href="./org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>YUVImage</code></a> instance.</div>
|
||||||
</dd>
|
</dd>
|
||||||
<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>
|
<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>
|
||||||
@@ -245,15 +249,15 @@
|
|||||||
</dd>
|
</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>
|
<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 packed-pixel source image associated with this compressor
|
||||||
instance into a unified YUV planar image buffer and return a
|
instance into a unified planar YUV image and return a <a href="./org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>YUVImage</code></a>
|
||||||
<code>YUVImage</code> instance containing the encoded image.</div>
|
instance containing the encoded image.</div>
|
||||||
</dd>
|
</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>
|
<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 packed-pixel source image associated with this compressor
|
||||||
instance into separate Y, U (Cb), and V (Cr) image planes and return a
|
instance into separate Y, U (Cb), and V (Cr) image planes and return a
|
||||||
<code>YUVImage</code> instance containing the encoded image planes.</div>
|
<a href="./org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>YUVImage</code></a> 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>
|
||||||
@@ -288,8 +292,8 @@
|
|||||||
</dd>
|
</dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJ.html#ERR_WARNING">ERR_WARNING</a></span> - Static variable 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#ERR_WARNING">ERR_WARNING</a></span> - Static variable 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">The error was non-fatal and recoverable, but the image may still be
|
<div class="block">The error was non-fatal and recoverable, but the destination image may
|
||||||
corrupt.</div>
|
still be corrupt.</div>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<a name="_F_">
|
<a name="_F_">
|
||||||
@@ -303,23 +307,21 @@
|
|||||||
<dd> </dd>
|
<dd> </dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJ.html#FLAG_ACCURATEDCT">FLAG_ACCURATEDCT</a></span> - Static variable 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#FLAG_ACCURATEDCT">FLAG_ACCURATEDCT</a></span> - Static variable 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">Use the most accurate DCT/IDCT algorithm available in the underlying
|
<div class="block">Use the most accurate DCT/IDCT algorithm available.</div>
|
||||||
codec.</div>
|
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP">FLAG_BOTTOMUP</a></span> - Static variable 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#FLAG_BOTTOMUP">FLAG_BOTTOMUP</a></span> - Static variable 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">The uncompressed source/destination image is stored in bottom-up (Windows,
|
<div class="block">Rows in the packed-pixel source/destination image are stored in bottom-up
|
||||||
OpenGL) order, not top-down (X11) order.</div>
|
(Windows, OpenGL) order rather than in top-down (X11) order.</div>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJ.html#FLAG_FASTDCT">FLAG_FASTDCT</a></span> - Static variable 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#FLAG_FASTDCT">FLAG_FASTDCT</a></span> - Static variable 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">Use the fastest DCT/IDCT algorithm available in the underlying codec.</div>
|
<div class="block">Use the fastest DCT/IDCT algorithm available.</div>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJ.html#FLAG_FASTUPSAMPLE">FLAG_FASTUPSAMPLE</a></span> - Static variable 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#FLAG_FASTUPSAMPLE">FLAG_FASTUPSAMPLE</a></span> - Static variable 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">When decompressing an image that was compressed using chrominance
|
<div class="block">When decompressing an image that was compressed using chrominance
|
||||||
subsampling, use the fastest chrominance upsampling algorithm available in
|
subsampling, use the fastest chrominance upsampling algorithm available.</div>
|
||||||
the underlying codec.</div>
|
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJ.html#FLAG_FORCEMMX">FLAG_FORCEMMX</a></span> - Static variable 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#FLAG_FORCEMMX">FLAG_FORCEMMX</a></span> - Static variable in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg">TJ</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
@@ -350,7 +352,7 @@
|
|||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJ.html#FLAG_STOPONWARNING">FLAG_STOPONWARNING</a></span> - Static variable 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#FLAG_STOPONWARNING">FLAG_STOPONWARNING</a></span> - Static variable 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">Immediately discontinue the current compression/decompression/transform
|
<div class="block">Immediately discontinue the current compression/decompression/transform
|
||||||
operation if the underlying codec throws a warning (non-fatal error).</div>
|
operation if a warning (non-fatal error) occurs.</div>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<a name="_G_">
|
<a name="_G_">
|
||||||
@@ -370,8 +372,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 (if this image is stored in a unified
|
<div class="block">Returns the YUV buffer (if this image is stored in a unified buffer rather
|
||||||
buffer rather than separate image planes.)</div>
|
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>
|
||||||
@@ -408,7 +410,7 @@
|
|||||||
</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">Returns the JPEG image buffer associated with this decompressor instance.</div>
|
<div class="block">Returns the JPEG buffer associated with this decompressor instance.</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>
|
||||||
@@ -436,7 +438,7 @@
|
|||||||
</dd>
|
</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 (if this image is
|
<div class="block">Returns the row alignment (in bytes) of the YUV buffer (if this image is
|
||||||
stored in a unified buffer rather than separate image planes.)</div>
|
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>
|
||||||
@@ -470,17 +472,17 @@
|
|||||||
</dd>
|
</dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJ.html#getScalingFactors()">getScalingFactors()</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#getScalingFactors()">getScalingFactors()</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 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
|
||||||
this implementation of TurboJPEG supports.</div>
|
supports.</div>
|
||||||
</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 (if this image is
|
<div class="block">Returns the size (in bytes) of the YUV buffer (if this image is stored in
|
||||||
stored in a unified buffer rather than separate image planes.)</div>
|
a unified buffer rather than separate image planes.)</div>
|
||||||
</dd>
|
</dd>
|
||||||
<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>
|
<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 number of bytes per line of each plane in the YUV image.</div>
|
<div class="block">Returns the number of bytes per row of each plane in the YUV image.</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>
|
||||||
@@ -494,7 +496,7 @@
|
|||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJTransformer.html#getTransformedSizes()">getTransformedSizes()</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#getTransformedSizes()">getTransformedSizes()</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">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>
|
(in bytes) generated by the most recent transform operation.</div>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html#getWidth()">getWidth()</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#getWidth()">getWidth()</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>
|
||||||
@@ -578,7 +580,7 @@
|
|||||||
<dl>
|
<dl>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJTransform.html#op">op</a></span> - 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#op">op</a></span> - 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">Transform operation (one of <code>OP_*</code>)</div>
|
<div class="block">Transform operation (one of <a href="./org/libjpegturbo/turbojpeg/TJTransform.html#OP_NONE"><code>OP_*</code></a>)</div>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJTransform.html#OP_HFLIP">OP_HFLIP</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#OP_HFLIP">OP_HFLIP</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>
|
||||||
@@ -616,7 +618,7 @@
|
|||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJTransform.html#OPT_COPYNONE">OPT_COPYNONE</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_COPYNONE">OPT_COPYNONE</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[][],%20org.libjpegturbo.turbojpeg.TJTransform[],%20int)"><code>TJTransformer.transform()</code></a> from copying any extra markers (including EXIF
|
<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 copying any extra markers (including EXIF
|
||||||
and ICC profile data) from the source image to the output image.</div>
|
and ICC profile data) from the source image to the destination image.</div>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJTransform.html#OPT_CROP">OPT_CROP</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_CROP">OPT_CROP</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>
|
||||||
@@ -624,8 +626,8 @@
|
|||||||
</dd>
|
</dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJTransform.html#OPT_GRAY">OPT_GRAY</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_GRAY">OPT_GRAY</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 discard the color data in the input image and produce
|
<div class="block">This option will discard the color data in the source image and produce a
|
||||||
a grayscale output image.</div>
|
grayscale destination image.</div>
|
||||||
</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>
|
||||||
@@ -639,7 +641,7 @@
|
|||||||
</dd>
|
</dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJTransform.html#OPT_PROGRESSIVE">OPT_PROGRESSIVE</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_PROGRESSIVE">OPT_PROGRESSIVE</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 enable progressive entropy coding in the output image
|
<div class="block">This option will enable progressive entropy coding in the JPEG image
|
||||||
generated by this particular transform.</div>
|
generated by this particular transform.</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>
|
||||||
@@ -649,7 +651,8 @@
|
|||||||
</dd>
|
</dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJTransform.html#options">options</a></span> - 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#options">options</a></span> - 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">Transform options (bitwise OR of one or more of <code>OPT_*</code>)</div>
|
<div class="block">Transform options (bitwise OR of one or more of
|
||||||
|
<a href="./org/libjpegturbo/turbojpeg/TJTransform.html#OPT_PERFECT"><code>OPT_*</code></a>)</div>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><a href="./org/libjpegturbo/turbojpeg/package-summary.html">org.libjpegturbo.turbojpeg</a> - package org.libjpegturbo.turbojpeg</dt>
|
<dt><a href="./org/libjpegturbo/turbojpeg/package-summary.html">org.libjpegturbo.turbojpeg</a> - package org.libjpegturbo.turbojpeg</dt>
|
||||||
<dd> </dd>
|
<dd> </dd>
|
||||||
@@ -756,7 +759,7 @@
|
|||||||
</dd>
|
</dd>
|
||||||
<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>
|
<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>
|
<dd>
|
||||||
<div class="block">Assign a unified image buffer to this <code>YUVImage</code> instance.</div>
|
<div class="block">Assign a unified buffer to this <code>YUVImage</code> instance.</div>
|
||||||
</dd>
|
</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>
|
<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>
|
||||||
@@ -770,7 +773,7 @@
|
|||||||
</dd>
|
</dd>
|
||||||
<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>
|
<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 a packed-pixel 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[],%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>
|
<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>
|
||||||
@@ -782,13 +785,12 @@
|
|||||||
</dd>
|
</dd>
|
||||||
<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>
|
<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 a packed-pixel RGB or grayscale source image with this
|
||||||
compressor instance.</div>
|
compressor instance.</div>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(org.libjpegturbo.turbojpeg.YUVImage)">setSourceImage(YUVImage)</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(org.libjpegturbo.turbojpeg.YUVImage)">setSourceImage(YUVImage)</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 YUV planar source image with this compressor
|
<div class="block">Associate a planar YUV source image with this compressor instance.</div>
|
||||||
instance.</div>
|
|
||||||
</dd>
|
</dd>
|
||||||
<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>
|
<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>
|
||||||
@@ -798,7 +800,7 @@
|
|||||||
</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>
|
||||||
<div class="block">Associate the specified YUV planar source image with this decompressor
|
<div class="block">Associate the specified planar YUV source image with this decompressor
|
||||||
instance.</div>
|
instance.</div>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJCompressor.html#setSubsamp(int)">setSubsamp(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#setSubsamp(int)">setSubsamp(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>
|
||||||
@@ -826,7 +828,7 @@
|
|||||||
</dd>
|
</dd>
|
||||||
<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>
|
<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 packed-pixel
|
||||||
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>
|
||||||
@@ -839,7 +841,7 @@
|
|||||||
</dd>
|
</dd>
|
||||||
<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>
|
<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 packed-pixel
|
||||||
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>
|
||||||
@@ -858,17 +860,19 @@
|
|||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html#TJDecompressor(byte[])">TJDecompressor(byte[])</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[])">TJDecompressor(byte[])</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 stored in <code>jpegImage</code> with the newly created instance.</div>
|
image or "abbreviated table specification" (AKA "tables-only") datastream
|
||||||
|
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[],%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>
|
<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 or "abbreviated table specification" (AKA "tables-only") datastream
|
||||||
<code>jpegImage</code> with the newly created instance.</div>
|
of length <code>imageSize</code> bytes 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(org.libjpegturbo.turbojpeg.YUVImage)">TJDecompressor(YUVImage)</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(org.libjpegturbo.turbojpeg.YUVImage)">TJDecompressor(YUVImage)</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 YUV planar
|
<div class="block">Create a TurboJPEG decompressor instance and associate the planar YUV
|
||||||
source image stored in <code>yuvImage</code> with the newly created
|
source image stored in <code>yuvImage</code> with the newly created
|
||||||
instance.</div>
|
instance.</div>
|
||||||
</dd>
|
</dd>
|
||||||
@@ -919,25 +923,26 @@
|
|||||||
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJTransformer.html#TJTransformer(byte[])">TJTransformer(byte[])</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[])">TJTransformer(byte[])</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 stored in <code>jpegImage</code> with the newly created instance.</div>
|
source 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[],%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>
|
<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
|
source 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[][],%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>
|
<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 source image associated with this
|
||||||
instance into one or more JPEG images stored in the given destination
|
transformer instance into one or more JPEG images stored in the given
|
||||||
buffers.</div>
|
destination buffers.</div>
|
||||||
</dd>
|
</dd>
|
||||||
<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>
|
<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 source image associated with this
|
||||||
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
|
transformer instance and return an array of <a href="./org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><code>TJDecompressor</code></a>
|
||||||
which has a transformed JPEG image associated with it.</div>
|
instances, each of which has a transformed JPEG image associated with it.</div>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<a name="_Y_">
|
<a name="_Y_">
|
||||||
@@ -945,13 +950,15 @@
|
|||||||
</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#yuvAlign">yuvAlign</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>
|
||||||
<dd> </dd>
|
<dd> </dd>
|
||||||
<dt><a href="./org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">YUVImage</span></a> - Class in <a href="./org/libjpegturbo/turbojpeg/package-summary.html">org.libjpegturbo.turbojpeg</a></dt>
|
<dt><a href="./org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">YUVImage</span></a> - Class in <a href="./org/libjpegturbo/turbojpeg/package-summary.html">org.libjpegturbo.turbojpeg</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<div class="block">This class encapsulates a YUV planar image and the metadata
|
<div class="block">This class encapsulates a planar YUV 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,%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>
|
<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>
|
||||||
@@ -961,8 +968,8 @@
|
|||||||
</dd>
|
</dd>
|
||||||
<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>
|
<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 new <code>YUVImage</code> instance backed by a unified image
|
<div class="block">Create a new <code>YUVImage</code> instance backed by a unified buffer,
|
||||||
buffer, and allocate memory for the image buffer.</div>
|
and allocate memory for the buffer.</div>
|
||||||
</dd>
|
</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>
|
<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>
|
<dd>
|
||||||
@@ -971,13 +978,11 @@
|
|||||||
</dd>
|
</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>
|
<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>
|
<dd>
|
||||||
<div class="block">Create a new <code>YUVImage</code> instance from an existing unified image
|
<div class="block">Create a new <code>YUVImage</code> instance from an existing unified
|
||||||
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>
|
<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>
|
<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>
|
|
||||||
<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>
|
<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>
|
<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>
|
<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>
|
||||||
|
|||||||
@@ -156,36 +156,34 @@ extends java.lang.Object</pre>
|
|||||||
<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#ERR_WARNING">ERR_WARNING</a></strong></code>
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#ERR_WARNING">ERR_WARNING</a></strong></code>
|
||||||
<div class="block">The error was non-fatal and recoverable, but the image may still be
|
<div class="block">The error was non-fatal and recoverable, but the destination image may
|
||||||
corrupt.</div>
|
still be corrupt.</div>
|
||||||
</td>
|
</td>
|
||||||
</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#FLAG_ACCURATEDCT">FLAG_ACCURATEDCT</a></strong></code>
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_ACCURATEDCT">FLAG_ACCURATEDCT</a></strong></code>
|
||||||
<div class="block">Use the most accurate DCT/IDCT algorithm available in the underlying
|
<div class="block">Use the most accurate DCT/IDCT algorithm available.</div>
|
||||||
codec.</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#FLAG_BOTTOMUP">FLAG_BOTTOMUP</a></strong></code>
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP">FLAG_BOTTOMUP</a></strong></code>
|
||||||
<div class="block">The uncompressed source/destination image is stored in bottom-up (Windows,
|
<div class="block">Rows in the packed-pixel source/destination image are stored in bottom-up
|
||||||
OpenGL) order, not top-down (X11) order.</div>
|
(Windows, OpenGL) order rather than in top-down (X11) order.</div>
|
||||||
</td>
|
</td>
|
||||||
</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#FLAG_FASTDCT">FLAG_FASTDCT</a></strong></code>
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_FASTDCT">FLAG_FASTDCT</a></strong></code>
|
||||||
<div class="block">Use the fastest DCT/IDCT algorithm available in the underlying codec.</div>
|
<div class="block">Use the fastest DCT/IDCT algorithm available.</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#FLAG_FASTUPSAMPLE">FLAG_FASTUPSAMPLE</a></strong></code>
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_FASTUPSAMPLE">FLAG_FASTUPSAMPLE</a></strong></code>
|
||||||
<div class="block">When decompressing an image that was compressed using chrominance
|
<div class="block">When decompressing an image that was compressed using chrominance
|
||||||
subsampling, use the fastest chrominance upsampling algorithm available in
|
subsampling, use the fastest chrominance upsampling algorithm available.</div>
|
||||||
the underlying codec.</div>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="rowColor">
|
<tr class="rowColor">
|
||||||
@@ -230,7 +228,7 @@ extends java.lang.Object</pre>
|
|||||||
<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#FLAG_STOPONWARNING">FLAG_STOPONWARNING</a></strong></code>
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_STOPONWARNING">FLAG_STOPONWARNING</a></strong></code>
|
||||||
<div class="block">Immediately discontinue the current compression/decompression/transform
|
<div class="block">Immediately discontinue the current compression/decompression/transform
|
||||||
operation if the underlying codec throws a warning (non-fatal error).</div>
|
operation if a warning (non-fatal error) occurs.</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="altColor">
|
<tr class="altColor">
|
||||||
@@ -402,11 +400,12 @@ extends java.lang.Object</pre>
|
|||||||
<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,%20int,%20int,%20int)">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 align,
|
||||||
int height,
|
int height,
|
||||||
int subsamp)</code>
|
int subsamp)</code>
|
||||||
<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 unified
|
||||||
image with the given width, height, and level of chrominance subsampling.</div>
|
planar YUV image with the given width, height, and level of chrominance
|
||||||
|
subsampling.</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="rowColor">
|
<tr class="rowColor">
|
||||||
@@ -460,8 +459,8 @@ extends java.lang.Object</pre>
|
|||||||
<tr class="altColor">
|
<tr class="altColor">
|
||||||
<td class="colFirst"><code>static <a href="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg">TJScalingFactor</a>[]</code></td>
|
<td class="colFirst"><code>static <a href="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg">TJScalingFactor</a>[]</code></td>
|
||||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#getScalingFactors()">getScalingFactors</a></strong>()</code>
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#getScalingFactors()">getScalingFactors</a></strong>()</code>
|
||||||
<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
|
||||||
this implementation of TurboJPEG supports.</div>
|
supports.</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="rowColor">
|
<tr class="rowColor">
|
||||||
@@ -778,8 +777,8 @@ extends java.lang.Object</pre>
|
|||||||
vice versa, but the mapping is typically not 1:1 or reversible, nor can it
|
vice versa, but the mapping is typically not 1:1 or reversible, nor can it
|
||||||
be defined with a simple formula. Thus, such a conversion is out of scope
|
be defined with a simple formula. Thus, such a conversion is out of scope
|
||||||
for a codec library. However, the TurboJPEG API allows for compressing
|
for a codec library. However, the TurboJPEG API allows for compressing
|
||||||
CMYK pixels into a YCCK JPEG image (see <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#CS_YCCK"><code>CS_YCCK</code></a>) and
|
packed-pixel CMYK images into YCCK JPEG images (see <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#CS_YCCK"><code>CS_YCCK</code></a>) and
|
||||||
decompressing YCCK JPEG images into CMYK pixels.</div>
|
decompressing YCCK JPEG images into packed-pixel CMYK images.</div>
|
||||||
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PF_CMYK">Constant Field Values</a></dd></dl>
|
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PF_CMYK">Constant Field Values</a></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -804,8 +803,9 @@ extends java.lang.Object</pre>
|
|||||||
<div class="block">RGB colorspace. When compressing the JPEG image, the R, G, and B
|
<div class="block">RGB colorspace. When compressing the JPEG image, the R, G, and B
|
||||||
components in the source image are reordered into image planes, but no
|
components in the source image are reordered into image planes, but no
|
||||||
colorspace conversion or subsampling is performed. RGB JPEG images can be
|
colorspace conversion or subsampling is performed. RGB JPEG images can be
|
||||||
decompressed to any of the extended RGB pixel formats or grayscale, but
|
decompressed to packed-pixel images with any of the extended RGB or
|
||||||
they cannot be decompressed to YUV images.</div>
|
grayscale pixel formats, but they cannot be decompressed to planar YUV
|
||||||
|
images.</div>
|
||||||
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.CS_RGB">Constant Field Values</a></dd></dl>
|
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.CS_RGB">Constant Field Values</a></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -826,10 +826,11 @@ extends java.lang.Object</pre>
|
|||||||
transformation allowed the same signal to drive both black & white and
|
transformation allowed the same signal to drive both black & white and
|
||||||
color televisions, but JPEG images use YCbCr primarily because it allows
|
color televisions, but JPEG images use YCbCr primarily because it allows
|
||||||
the color data to be optionally subsampled for the purposes of reducing
|
the color data to be optionally subsampled for the purposes of reducing
|
||||||
bandwidth or disk space. YCbCr is the most common JPEG colorspace, and
|
network or disk usage. YCbCr is the most common JPEG colorspace, and
|
||||||
YCbCr JPEG images can be compressed from and decompressed to any of the
|
YCbCr JPEG images can be compressed from and decompressed to packed-pixel
|
||||||
extended RGB pixel formats or grayscale, or they can be decompressed to
|
images with any of the extended RGB or grayscale pixel formats. YCbCr
|
||||||
YUV planar images.</div>
|
JPEG images can also be compressed from and decompressed to planar YUV
|
||||||
|
images.</div>
|
||||||
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.CS_YCbCr">Constant Field Values</a></dd></dl>
|
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.CS_YCbCr">Constant Field Values</a></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -842,9 +843,10 @@ extends java.lang.Object</pre>
|
|||||||
<pre>public static final int CS_GRAY</pre>
|
<pre>public static final int CS_GRAY</pre>
|
||||||
<div class="block">Grayscale colorspace. The JPEG image retains only the luminance data (Y
|
<div class="block">Grayscale colorspace. The JPEG image retains only the luminance data (Y
|
||||||
component), and any color data from the source image is discarded.
|
component), and any color data from the source image is discarded.
|
||||||
Grayscale JPEG images can be compressed from and decompressed to any of
|
Grayscale JPEG images can be compressed from and decompressed to
|
||||||
the extended RGB pixel formats or grayscale, or they can be decompressed
|
packed-pixel images with any of the extended RGB or grayscale pixel
|
||||||
to YUV planar images.</div>
|
formats, or they can be compressed from and decompressed to planar YUV
|
||||||
|
images.</div>
|
||||||
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.CS_GRAY">Constant Field Values</a></dd></dl>
|
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.CS_GRAY">Constant Field Values</a></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -858,7 +860,7 @@ extends java.lang.Object</pre>
|
|||||||
<div class="block">CMYK colorspace. When compressing the JPEG image, the C, M, Y, and K
|
<div class="block">CMYK colorspace. When compressing the JPEG image, the C, M, Y, and K
|
||||||
components in the source image are reordered into image planes, but no
|
components in the source image are reordered into image planes, but no
|
||||||
colorspace conversion or subsampling is performed. CMYK JPEG images can
|
colorspace conversion or subsampling is performed. CMYK JPEG images can
|
||||||
only be decompressed to CMYK pixels.</div>
|
only be decompressed to packed-pixel images with the CMYK pixel format.</div>
|
||||||
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.CS_CMYK">Constant Field Values</a></dd></dl>
|
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.CS_CMYK">Constant Field Values</a></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -875,7 +877,7 @@ extends java.lang.Object</pre>
|
|||||||
reversibly transformed into YCCK, and as with YCbCr, the chrominance
|
reversibly transformed into YCCK, and as with YCbCr, the chrominance
|
||||||
components in the YCCK pixels can be subsampled without incurring major
|
components in the YCCK pixels can be subsampled without incurring major
|
||||||
perceptual loss. YCCK JPEG images can only be compressed from and
|
perceptual loss. YCCK JPEG images can only be compressed from and
|
||||||
decompressed to CMYK pixels.</div>
|
decompressed to packed-pixel images with the CMYK pixel format.</div>
|
||||||
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.CS_YCCK">Constant Field Values</a></dd></dl>
|
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.CS_YCCK">Constant Field Values</a></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -886,8 +888,8 @@ extends java.lang.Object</pre>
|
|||||||
<li class="blockList">
|
<li class="blockList">
|
||||||
<h4>FLAG_BOTTOMUP</h4>
|
<h4>FLAG_BOTTOMUP</h4>
|
||||||
<pre>public static final int FLAG_BOTTOMUP</pre>
|
<pre>public static final int FLAG_BOTTOMUP</pre>
|
||||||
<div class="block">The uncompressed source/destination image is stored in bottom-up (Windows,
|
<div class="block">Rows in the packed-pixel source/destination image are stored in bottom-up
|
||||||
OpenGL) order, not top-down (X11) order.</div>
|
(Windows, OpenGL) order rather than in top-down (X11) order.</div>
|
||||||
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.FLAG_BOTTOMUP">Constant Field Values</a></dd></dl>
|
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.FLAG_BOTTOMUP">Constant Field Values</a></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -947,10 +949,10 @@ public static final int FLAG_FORCESSE3</pre>
|
|||||||
<h4>FLAG_FASTUPSAMPLE</h4>
|
<h4>FLAG_FASTUPSAMPLE</h4>
|
||||||
<pre>public static final int FLAG_FASTUPSAMPLE</pre>
|
<pre>public static final int FLAG_FASTUPSAMPLE</pre>
|
||||||
<div class="block">When decompressing an image that was compressed using chrominance
|
<div class="block">When decompressing an image that was compressed using chrominance
|
||||||
subsampling, use the fastest chrominance upsampling algorithm available in
|
subsampling, use the fastest chrominance upsampling algorithm available.
|
||||||
the underlying codec. The default is to use smooth upsampling, which
|
The default is to use smooth upsampling, which creates a smooth transition
|
||||||
creates a smooth transition between neighboring chrominance components in
|
between neighboring chrominance components in order to reduce upsampling
|
||||||
order to reduce upsampling artifacts in the decompressed image.</div>
|
artifacts in the decompressed image.</div>
|
||||||
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.FLAG_FASTUPSAMPLE">Constant Field Values</a></dd></dl>
|
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.FLAG_FASTUPSAMPLE">Constant Field Values</a></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -961,12 +963,12 @@ public static final int FLAG_FORCESSE3</pre>
|
|||||||
<li class="blockList">
|
<li class="blockList">
|
||||||
<h4>FLAG_FASTDCT</h4>
|
<h4>FLAG_FASTDCT</h4>
|
||||||
<pre>public static final int FLAG_FASTDCT</pre>
|
<pre>public static final int FLAG_FASTDCT</pre>
|
||||||
<div class="block">Use the fastest DCT/IDCT algorithm available in the underlying codec. The
|
<div class="block">Use the fastest DCT/IDCT algorithm available. The default if this flag is
|
||||||
default if this flag is not specified is implementation-specific. For
|
not specified is implementation-specific. For example, the implementation
|
||||||
example, the implementation of TurboJPEG for libjpeg[-turbo] uses the fast
|
of the TurboJPEG API in libjpeg-turbo uses the fast algorithm by default
|
||||||
algorithm by default when compressing, because this has been shown to have
|
when compressing, because this has been shown to have only a very slight
|
||||||
only a very slight effect on accuracy, but it uses the accurate algorithm
|
effect on accuracy, but it uses the accurate algorithm when decompressing,
|
||||||
when decompressing, because this has been shown to have a larger effect.</div>
|
because this has been shown to have a larger effect.</div>
|
||||||
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.FLAG_FASTDCT">Constant Field Values</a></dd></dl>
|
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.FLAG_FASTDCT">Constant Field Values</a></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -977,13 +979,12 @@ public static final int FLAG_FORCESSE3</pre>
|
|||||||
<li class="blockList">
|
<li class="blockList">
|
||||||
<h4>FLAG_ACCURATEDCT</h4>
|
<h4>FLAG_ACCURATEDCT</h4>
|
||||||
<pre>public static final int FLAG_ACCURATEDCT</pre>
|
<pre>public static final int FLAG_ACCURATEDCT</pre>
|
||||||
<div class="block">Use the most accurate DCT/IDCT algorithm available in the underlying
|
<div class="block">Use the most accurate DCT/IDCT algorithm available. The default if this
|
||||||
codec. The default if this flag is not specified is
|
flag is not specified is implementation-specific. For example, the
|
||||||
implementation-specific. For example, the implementation of TurboJPEG for
|
implementation of the TurboJPEG API in libjpeg-turbo uses the fast
|
||||||
libjpeg[-turbo] uses the fast algorithm by default when compressing,
|
algorithm by default when compressing, because this has been shown to have
|
||||||
because this has been shown to have only a very slight effect on accuracy,
|
only a very slight effect on accuracy, but it uses the accurate algorithm
|
||||||
but it uses the accurate algorithm when decompressing, because this has
|
when decompressing, because this has been shown to have a larger effect.</div>
|
||||||
been shown to have a larger effect.</div>
|
|
||||||
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.FLAG_ACCURATEDCT">Constant Field Values</a></dd></dl>
|
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.FLAG_ACCURATEDCT">Constant Field Values</a></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -995,14 +996,13 @@ public static final int FLAG_FORCESSE3</pre>
|
|||||||
<h4>FLAG_STOPONWARNING</h4>
|
<h4>FLAG_STOPONWARNING</h4>
|
||||||
<pre>public static final int FLAG_STOPONWARNING</pre>
|
<pre>public static final int FLAG_STOPONWARNING</pre>
|
||||||
<div class="block">Immediately discontinue the current compression/decompression/transform
|
<div class="block">Immediately discontinue the current compression/decompression/transform
|
||||||
operation if the underlying codec throws a warning (non-fatal error). The
|
operation if a warning (non-fatal error) occurs. The default behavior is
|
||||||
default behavior is to allow the operation to complete unless a fatal
|
to allow the operation to complete unless a fatal error is encountered.
|
||||||
error is encountered.
|
|
||||||
<p>
|
<p>
|
||||||
NOTE: due to the design of the TurboJPEG Java API, only certain methods
|
NOTE: due to the design of the TurboJPEG Java API, only certain methods
|
||||||
(specifically, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><code>TJDecompressor.decompress*()</code></a> methods
|
(specifically, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><code>TJDecompressor.decompress*()</code></a> methods
|
||||||
with a void return type) will complete and leave the output image in a
|
with a void return type) will complete and leave the destination image in
|
||||||
fully recoverable state after a non-fatal error occurs.</div>
|
a fully recoverable state after a non-fatal error occurs.</div>
|
||||||
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.FLAG_STOPONWARNING">Constant Field Values</a></dd></dl>
|
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.FLAG_STOPONWARNING">Constant Field Values</a></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -1055,13 +1055,13 @@ public static final int FLAG_FORCESSE3</pre>
|
|||||||
<li class="blockList">
|
<li class="blockList">
|
||||||
<h4>ERR_WARNING</h4>
|
<h4>ERR_WARNING</h4>
|
||||||
<pre>public static final int ERR_WARNING</pre>
|
<pre>public static final int ERR_WARNING</pre>
|
||||||
<div class="block">The error was non-fatal and recoverable, but the image may still be
|
<div class="block">The error was non-fatal and recoverable, but the destination image may
|
||||||
corrupt.
|
still be corrupt.
|
||||||
<p>
|
<p>
|
||||||
NOTE: due to the design of the TurboJPEG Java API, only certain methods
|
NOTE: due to the design of the TurboJPEG Java API, only certain methods
|
||||||
(specifically, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><code>TJDecompressor.decompress*()</code></a> methods
|
(specifically, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><code>TJDecompressor.decompress*()</code></a> methods
|
||||||
with a void return type) will complete and leave the output image in a
|
with a void return type) will complete and leave the destination image in
|
||||||
fully recoverable state after a non-fatal error occurs.</div>
|
a fully recoverable state after a non-fatal error occurs.</div>
|
||||||
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.ERR_WARNING">Constant Field Values</a></dd></dl>
|
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.ERR_WARNING">Constant Field Values</a></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -1094,7 +1094,7 @@ public static final int FLAG_FORCESSE3</pre>
|
|||||||
<div class="block">Returns the MCU block width for the given level of chrominance
|
<div class="block">Returns the MCU block width for the given level of chrominance
|
||||||
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>
|
<a href="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_444"><code>SAMP_*</code></a>)</dd>
|
||||||
<dt><span class="strong">Returns:</span></dt><dd>the MCU block width for the given level of chrominance
|
<dt><span class="strong">Returns:</span></dt><dd>the MCU block width for the given level of chrominance
|
||||||
subsampling.</dd></dl>
|
subsampling.</dd></dl>
|
||||||
</li>
|
</li>
|
||||||
@@ -1109,7 +1109,7 @@ public static final int FLAG_FORCESSE3</pre>
|
|||||||
<div class="block">Returns the MCU block height for the given level of chrominance
|
<div class="block">Returns the MCU block height for the given level of chrominance
|
||||||
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>
|
<a href="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_444"><code>SAMP_*</code></a>)</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></dl>
|
subsampling.</dd></dl>
|
||||||
</li>
|
</li>
|
||||||
@@ -1122,7 +1122,7 @@ public static final int FLAG_FORCESSE3</pre>
|
|||||||
<h4>getPixelSize</h4>
|
<h4>getPixelSize</h4>
|
||||||
<pre>public static int getPixelSize(int pixelFormat)</pre>
|
<pre>public static int getPixelSize(int pixelFormat)</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 <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_RGB"><code>PF_*</code></a>)</dd>
|
||||||
<dt><span class="strong">Returns:</span></dt><dd>the pixel size (in bytes) for the given pixel format.</dd></dl>
|
<dt><span class="strong">Returns:</span></dt><dd>the pixel size (in bytes) for the given pixel format.</dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -1138,7 +1138,7 @@ public static final int FLAG_FORCESSE3</pre>
|
|||||||
of format <code>TJ.PF_BGRX</code> is stored in <code>char pixel[]</code>,
|
of format <code>TJ.PF_BGRX</code> is stored in <code>char pixel[]</code>,
|
||||||
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 <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_RGB"><code>PF_*</code></a>)</dd>
|
||||||
<dt><span class="strong">Returns:</span></dt><dd>the red offset for the given pixel format, or -1 if the pixel
|
<dt><span class="strong">Returns:</span></dt><dd>the red offset for the given pixel format, or -1 if the pixel
|
||||||
format does not have a red component.</dd></dl>
|
format does not have a red component.</dd></dl>
|
||||||
</li>
|
</li>
|
||||||
@@ -1155,7 +1155,7 @@ public static final int FLAG_FORCESSE3</pre>
|
|||||||
of format <code>TJ.PF_BGRX</code> is stored in <code>char pixel[]</code>,
|
of format <code>TJ.PF_BGRX</code> is stored in <code>char pixel[]</code>,
|
||||||
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 <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_RGB"><code>PF_*</code></a>)</dd>
|
||||||
<dt><span class="strong">Returns:</span></dt><dd>the green offset for the given pixel format, or -1 if the pixel
|
<dt><span class="strong">Returns:</span></dt><dd>the green offset for the given pixel format, or -1 if the pixel
|
||||||
format does not have a green component.</dd></dl>
|
format does not have a green component.</dd></dl>
|
||||||
</li>
|
</li>
|
||||||
@@ -1172,7 +1172,7 @@ public static final int FLAG_FORCESSE3</pre>
|
|||||||
of format <code>TJ.PF_BGRX</code> is stored in <code>char pixel[]</code>,
|
of format <code>TJ.PF_BGRX</code> is stored in <code>char pixel[]</code>,
|
||||||
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 <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_RGB"><code>PF_*</code></a>)</dd>
|
||||||
<dt><span class="strong">Returns:</span></dt><dd>the blue offset for the given pixel format, or -1 if the pixel
|
<dt><span class="strong">Returns:</span></dt><dd>the blue offset for the given pixel format, or -1 if the pixel
|
||||||
format does not have a blue component.</dd></dl>
|
format does not have a blue component.</dd></dl>
|
||||||
</li>
|
</li>
|
||||||
@@ -1189,7 +1189,7 @@ public static final int FLAG_FORCESSE3</pre>
|
|||||||
of format <code>TJ.PF_BGRA</code> is stored in <code>char pixel[]</code>,
|
of format <code>TJ.PF_BGRA</code> is stored in <code>char pixel[]</code>,
|
||||||
then the alpha component will be
|
then the alpha component will be
|
||||||
<code>pixel[TJ.getAlphaOffset(TJ.PF_BGRA)]</code>.</div>
|
<code>pixel[TJ.getAlphaOffset(TJ.PF_BGRA)]</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 <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_RGB"><code>PF_*</code></a>)</dd>
|
||||||
<dt><span class="strong">Returns:</span></dt><dd>the alpha offset for the given pixel format, or -1 if the pixel
|
<dt><span class="strong">Returns:</span></dt><dd>the alpha offset for the given pixel format, or -1 if the pixel
|
||||||
format does not have a alpha component.</dd></dl>
|
format does not have a alpha component.</dd></dl>
|
||||||
</li>
|
</li>
|
||||||
@@ -1206,7 +1206,7 @@ public static final int FLAG_FORCESSE3</pre>
|
|||||||
<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>
|
||||||
<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#SAMP_444"><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></dl>
|
image with the given width, height, and level of chrominance subsampling.</dd></dl>
|
||||||
</li>
|
</li>
|
||||||
@@ -1218,16 +1218,20 @@ public static final int FLAG_FORCESSE3</pre>
|
|||||||
<li class="blockList">
|
<li class="blockList">
|
||||||
<h4>bufSizeYUV</h4>
|
<h4>bufSizeYUV</h4>
|
||||||
<pre>public static int bufSizeYUV(int width,
|
<pre>public static int bufSizeYUV(int width,
|
||||||
int pad,
|
int align,
|
||||||
int height,
|
int height,
|
||||||
int subsamp)</pre>
|
int subsamp)</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 unified
|
||||||
image with the given width, height, and level of chrominance subsampling.</div>
|
planar YUV image with the given width, height, and level of chrominance
|
||||||
<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
|
subsampling.</div>
|
||||||
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
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>width</code> - the width (in pixels) of the YUV image</dd><dd><code>align</code> - row alignment (in bytes) of the YUV image (must be a power of
|
||||||
image (one of <a href="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><code>TJ.SAMP_*</code></a>)</dd>
|
2.) Setting this parameter to n specifies that each row in each plane of
|
||||||
<dt><span class="strong">Returns:</span></dt><dd>the size of the buffer (in bytes) required to hold a YUV planar
|
the YUV image will be padded to the nearest multiple of n bytes
|
||||||
image with the given width, height, and level of chrominance subsampling.</dd></dl>
|
(1 = unpadded.)</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#SAMP_444"><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 unified
|
||||||
|
planar YUV image with the given width, height, and level of chrominance
|
||||||
|
subsampling.</dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a name="bufSizeYUV(int, int, int)">
|
<a name="bufSizeYUV(int, int, int)">
|
||||||
@@ -1258,11 +1262,11 @@ public static int bufSizeYUV(int width,
|
|||||||
plane with the given parameters.</div>
|
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,
|
<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
|
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
|
of the whole image, not the plane width.</dd><dd><code>stride</code> - bytes per row 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
|
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>
|
image (one of <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_444"><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 image
|
||||||
image with the given parameters.</dd></dl>
|
plane with the given parameters.</dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a name="planeWidth(int, int, int)">
|
<a name="planeWidth(int, int, int)">
|
||||||
@@ -1278,7 +1282,7 @@ public static int bufSizeYUV(int width,
|
|||||||
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>
|
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,
|
<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
|
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>
|
(one of <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_444"><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></dl>
|
<dt><span class="strong">Returns:</span></dt><dd>the plane width of a YUV image plane with the given parameters.</dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -1295,7 +1299,7 @@ public static int bufSizeYUV(int width,
|
|||||||
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>
|
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,
|
<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
|
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>
|
(one of <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_444"><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></dl>
|
<dt><span class="strong">Returns:</span></dt><dd>the plane height of a YUV image plane with the given parameters.</dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -1306,10 +1310,10 @@ public static int bufSizeYUV(int width,
|
|||||||
<li class="blockList">
|
<li class="blockList">
|
||||||
<h4>getScalingFactors</h4>
|
<h4>getScalingFactors</h4>
|
||||||
<pre>public static <a href="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg">TJScalingFactor</a>[] getScalingFactors()</pre>
|
<pre>public static <a href="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg">TJScalingFactor</a>[] getScalingFactors()</pre>
|
||||||
<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
|
||||||
this implementation of TurboJPEG supports.</div>
|
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
|
||||||
this implementation of TurboJPEG supports.</dd></dl>
|
supports.</dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ implements java.io.Closeable</pre>
|
|||||||
int y,
|
int y,
|
||||||
int width,
|
int width,
|
||||||
int height)</code>
|
int height)</code>
|
||||||
<div class="block">Create a TurboJPEG compressor instance and associate the uncompressed
|
<div class="block">Create a TurboJPEG compressor instance and associate the packed-pixel
|
||||||
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>
|
||||||
</td>
|
</td>
|
||||||
@@ -157,7 +157,7 @@ implements java.io.Closeable</pre>
|
|||||||
int pitch,
|
int pitch,
|
||||||
int height,
|
int height,
|
||||||
int pixelFormat)</code>
|
int pixelFormat)</code>
|
||||||
<div class="block">Create a TurboJPEG compressor instance and associate the uncompressed
|
<div class="block">Create a TurboJPEG compressor instance and associate the packed-pixel
|
||||||
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>
|
||||||
</td>
|
</td>
|
||||||
@@ -210,15 +210,16 @@ implements java.io.Closeable</pre>
|
|||||||
<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[],%20int)">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 packed-pixel or planar YUV source image associated with this
|
||||||
instance and output a JPEG image to the given destination buffer.</div>
|
compressor instance and output a JPEG image to the given destination
|
||||||
|
buffer.</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(int)">compress</a></strong>(int flags)</code>
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#compress(int)">compress</a></strong>(int flags)</code>
|
||||||
<div class="block">Compress the uncompressed source image associated with this compressor
|
<div class="block">Compress the packed-pixel or planar YUV source image associated with this
|
||||||
instance and return a buffer containing a JPEG image.</div>
|
compressor instance and return a buffer containing a JPEG image.</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="rowColor">
|
<tr class="rowColor">
|
||||||
@@ -265,27 +266,27 @@ implements java.io.Closeable</pre>
|
|||||||
<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[],%20int)">encodeYUV</a></strong>(int[] strides,
|
<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 packed-pixel source image associated with this compressor
|
||||||
instance into separate Y, U (Cb), and V (Cr) image planes and return a
|
instance into separate Y, U (Cb), and V (Cr) image planes and return a
|
||||||
<code>YUVImage</code> instance containing the encoded image planes.</div>
|
<a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>YUVImage</code></a> 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="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,
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(int,%20int)">encodeYUV</a></strong>(int align,
|
||||||
int flags)</code>
|
int flags)</code>
|
||||||
<div class="block">Encode the uncompressed source image associated with this compressor
|
<div class="block">Encode the packed-pixel source image associated with this compressor
|
||||||
instance into a unified YUV planar image buffer and return a
|
instance into a unified planar YUV image and return a <a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>YUVImage</code></a>
|
||||||
<code>YUVImage</code> instance containing the encoded image.</div>
|
instance containing the encoded image.</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(org.libjpegturbo.turbojpeg.YUVImage,%20int)">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 packed-pixel source image associated with this compressor
|
||||||
instance into a YUV planar image and store it in the given
|
instance into a planar YUV image and store it in the given
|
||||||
<code>YUVImage</code> instance.</div>
|
<a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>YUVImage</code></a> instance.</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="altColor">
|
<tr class="altColor">
|
||||||
@@ -312,7 +313,7 @@ implements java.io.Closeable</pre>
|
|||||||
int y,
|
int y,
|
||||||
int width,
|
int width,
|
||||||
int height)</code>
|
int height)</code>
|
||||||
<div class="block">Associate an uncompressed RGB or grayscale source image with this
|
<div class="block">Associate a packed-pixel RGB or grayscale source image with this
|
||||||
compressor instance.</div>
|
compressor instance.</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -338,15 +339,14 @@ implements java.io.Closeable</pre>
|
|||||||
int pitch,
|
int pitch,
|
||||||
int height,
|
int height,
|
||||||
int pixelFormat)</code>
|
int pixelFormat)</code>
|
||||||
<div class="block">Associate an uncompressed RGB, grayscale, or CMYK source image with this
|
<div class="block">Associate a packed-pixel RGB, grayscale, or CMYK source image with this
|
||||||
compressor instance.</div>
|
compressor 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/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 a planar YUV source image with this compressor instance.</div>
|
||||||
instance.</div>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="rowColor">
|
<tr class="rowColor">
|
||||||
@@ -405,7 +405,7 @@ implements java.io.Closeable</pre>
|
|||||||
int height,
|
int height,
|
||||||
int pixelFormat)
|
int pixelFormat)
|
||||||
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||||
<div class="block">Create a TurboJPEG compressor instance and associate the uncompressed
|
<div class="block">Create a TurboJPEG compressor instance and associate the packed-pixel
|
||||||
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[],%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
|
<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
|
||||||
@@ -445,7 +445,7 @@ public TJCompressor(byte[] srcImage,
|
|||||||
int width,
|
int width,
|
||||||
int height)
|
int height)
|
||||||
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||||
<div class="block">Create a TurboJPEG compressor instance and associate the uncompressed
|
<div class="block">Create a TurboJPEG compressor instance and associate the packed-pixel
|
||||||
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
|
||||||
@@ -480,19 +480,19 @@ public TJCompressor(byte[] srcImage,
|
|||||||
int height,
|
int height,
|
||||||
int pixelFormat)
|
int pixelFormat)
|
||||||
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||||
<div class="block">Associate an uncompressed RGB, grayscale, or CMYK source image with this
|
<div class="block">Associate a packed-pixel RGB, grayscale, or CMYK source image with this
|
||||||
compressor instance.</div>
|
compressor instance.</div>
|
||||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>srcImage</code> - image buffer containing RGB, grayscale, or CMYK pixels to
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>srcImage</code> - buffer containing a packed-pixel RGB, grayscale, or CMYK
|
||||||
be compressed or encoded. This buffer is not modified.</dd><dd><code>x</code> - x offset (in pixels) of the region in the source image from which
|
source image to be compressed or encoded. This buffer is not modified.</dd><dd><code>x</code> - x offset (in pixels) of the region in the source image from which
|
||||||
the JPEG or YUV image should be compressed/encoded</dd><dd><code>y</code> - y offset (in pixels) of the region in the source image from which
|
the JPEG or YUV image should be compressed/encoded</dd><dd><code>y</code> - y offset (in pixels) of the region in the source image from which
|
||||||
the JPEG or YUV image should be compressed/encoded</dd><dd><code>width</code> - width (in pixels) of the region in the source image from
|
the JPEG or YUV image should be compressed/encoded</dd><dd><code>width</code> - width (in pixels) of the region in the source image from
|
||||||
which the JPEG or YUV image should be compressed/encoded</dd><dd><code>pitch</code> - bytes per line of the source image. Normally, this should be
|
which the JPEG or YUV image should be compressed/encoded</dd><dd><code>pitch</code> - bytes per row in the source image. Normally this should be
|
||||||
<code>width * TJ.pixelSize(pixelFormat)</code> if the source image is
|
<code>width * TJ.pixelSize(pixelFormat)</code>, if the source image is
|
||||||
unpadded, but you can use this parameter to, for instance, specify that
|
unpadded. However, you can use this parameter to, for instance, specify
|
||||||
the scanlines in the source image are padded to a 4-byte boundary or to
|
that the rows in the source image are padded to the nearest multiple of 4
|
||||||
compress/encode a JPEG or YUV image from a region of a larger source
|
bytes or to compress/encode a JPEG or YUV image from a region of a larger
|
||||||
image. You can also be clever and use this parameter to skip lines, etc.
|
source image. You can also be clever and use this parameter to skip rows,
|
||||||
Setting this parameter to 0 is the equivalent of setting it to
|
etc. Setting this parameter to 0 is the equivalent of setting it to
|
||||||
<code>width * TJ.pixelSize(pixelFormat)</code>.</dd><dd><code>height</code> - height (in pixels) of the region in the source image from
|
<code>width * TJ.pixelSize(pixelFormat)</code>.</dd><dd><code>height</code> - height (in pixels) of the region in the source image from
|
||||||
which the JPEG or YUV image should be compressed/encoded</dd><dd><code>pixelFormat</code> - pixel format of the source image (one of
|
which the JPEG or YUV image should be compressed/encoded</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>
|
||||||
@@ -531,10 +531,11 @@ public void setSourceImage(byte[] srcImage,
|
|||||||
int width,
|
int width,
|
||||||
int height)
|
int height)
|
||||||
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||||
<div class="block">Associate an uncompressed RGB or grayscale source image with this
|
<div class="block">Associate a packed-pixel RGB or grayscale source image with this
|
||||||
compressor instance.</div>
|
compressor instance.</div>
|
||||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>srcImage</code> - a <code>BufferedImage</code> instance containing RGB or
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>srcImage</code> - a <code>BufferedImage</code> instance containing a
|
||||||
grayscale pixels to be compressed or encoded. This image is not modified.</dd><dd><code>x</code> - x offset (in pixels) of the region in the source image from which
|
packed-pixel RGB or grayscale source image to be compressed or encoded.
|
||||||
|
This image is not modified.</dd><dd><code>x</code> - x offset (in pixels) of the region in the source image from which
|
||||||
the JPEG or YUV image should be compressed/encoded</dd><dd><code>y</code> - y offset (in pixels) of the region in the source image from which
|
the JPEG or YUV image should be compressed/encoded</dd><dd><code>y</code> - y offset (in pixels) of the region in the source image from which
|
||||||
the JPEG or YUV image should be compressed/encoded</dd><dd><code>width</code> - width (in pixels) of the region in the source image from
|
the JPEG or YUV image should be compressed/encoded</dd><dd><code>width</code> - width (in pixels) of the region in the source image from
|
||||||
which the JPEG or YUV image should be compressed/encoded (0 = use the
|
which the JPEG or YUV image should be compressed/encoded (0 = use the
|
||||||
@@ -553,10 +554,9 @@ public void setSourceImage(byte[] srcImage,
|
|||||||
<h4>setSourceImage</h4>
|
<h4>setSourceImage</h4>
|
||||||
<pre>public void setSourceImage(<a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a> srcImage)
|
<pre>public void setSourceImage(<a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a> srcImage)
|
||||||
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||||
<div class="block">Associate an uncompressed YUV planar source image with this compressor
|
<div class="block">Associate a planar YUV source image with this compressor instance.</div>
|
||||||
instance.</div>
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>srcImage</code> - planar YUV source image to be compressed. This image is
|
||||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>srcImage</code> - YUV planar image to be compressed. This image is not
|
not modified.</dd>
|
||||||
modified.</dd>
|
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
@@ -573,16 +573,16 @@ public void setSourceImage(byte[] srcImage,
|
|||||||
<a href="../../../org/libjpegturbo/turbojpeg/TJ.html#CS_YCbCr"><code>TJ.CS_YCbCr</code></a>) or from CMYK to YCCK (see <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#CS_YCCK"><code>TJ.CS_YCCK</code></a>) as part
|
<a href="../../../org/libjpegturbo/turbojpeg/TJ.html#CS_YCbCr"><code>TJ.CS_YCbCr</code></a>) or from CMYK to YCCK (see <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#CS_YCCK"><code>TJ.CS_YCCK</code></a>) as part
|
||||||
of the JPEG compression process, some of the Cb and Cr (chrominance)
|
of the JPEG compression process, some of the Cb and Cr (chrominance)
|
||||||
components can be discarded or averaged together to produce a smaller
|
components can be discarded or averaged together to produce a smaller
|
||||||
image with little perceptible loss of image clarity (the human eye is more
|
image with little perceptible loss of image clarity. (The human eye is
|
||||||
sensitive to small changes in brightness than to small changes in color.)
|
more sensitive to small changes in brightness than to small changes in
|
||||||
This is called "chrominance subsampling".
|
color.) This is called "chrominance subsampling".
|
||||||
<p>
|
<p>
|
||||||
NOTE: This method has no effect when compressing a JPEG image from a YUV
|
NOTE: This method has no effect when compressing a JPEG image from a
|
||||||
planar source. In that case, the level of chrominance subsampling in
|
planar YUV source image. In that case, the level of chrominance
|
||||||
the JPEG image is determined by the source. Furthermore, this method has
|
subsampling in the JPEG image is determined by the source image.
|
||||||
no effect when encoding to a pre-allocated <a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>YUVImage</code></a> instance. In
|
Furthermore, this method has no effect when encoding to a pre-allocated
|
||||||
that case, the level of chrominance subsampling is determined by the
|
<a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>YUVImage</code></a> instance. In that case, the level of chrominance
|
||||||
destination.</div>
|
subsampling is determined by the destination image.</div>
|
||||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>newSubsamp</code> - the level of chrominance subsampling to use in
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>newSubsamp</code> - the level of chrominance subsampling to use in
|
||||||
subsequent compress/encode oeprations (one of
|
subsequent compress/encode oeprations (one of
|
||||||
<a href="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_444"><code>TJ.SAMP_*</code></a>)</dd></dl>
|
<a href="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_444"><code>TJ.SAMP_*</code></a>)</dd></dl>
|
||||||
@@ -609,8 +609,9 @@ public void setSourceImage(byte[] srcImage,
|
|||||||
<pre>public void compress(byte[] dstBuf,
|
<pre>public void compress(byte[] dstBuf,
|
||||||
int flags)
|
int flags)
|
||||||
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||||
<div class="block">Compress the uncompressed source image associated with this compressor
|
<div class="block">Compress the packed-pixel or planar YUV source image associated with this
|
||||||
instance and output a JPEG image to the given destination buffer.</div>
|
compressor 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,%20int,%20int)"><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
|
||||||
@@ -628,8 +629,8 @@ public void setSourceImage(byte[] srcImage,
|
|||||||
<h4>compress</h4>
|
<h4>compress</h4>
|
||||||
<pre>public byte[] compress(int flags)
|
<pre>public byte[] compress(int flags)
|
||||||
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||||
<div class="block">Compress the uncompressed source image associated with this compressor
|
<div class="block">Compress the packed-pixel or planar YUV source image associated with this
|
||||||
instance and return a buffer containing a JPEG image.</div>
|
compressor instance and return a buffer containing a JPEG image.</div>
|
||||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>flags</code> - the bitwise OR of one or more of
|
<dl><dt><span class="strong">Parameters:</span></dt><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 a JPEG image. The length of this buffer will
|
<dt><span class="strong">Returns:</span></dt><dd>a buffer containing a JPEG image. The length of this buffer will
|
||||||
@@ -682,13 +683,13 @@ public byte[] compress(java.awt.image.BufferedImage srcImage,
|
|||||||
<pre>public void encodeYUV(<a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a> dstImage,
|
<pre>public void encodeYUV(<a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a> dstImage,
|
||||||
int flags)
|
int flags)
|
||||||
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||||
<div class="block">Encode the uncompressed source image associated with this compressor
|
<div class="block">Encode the packed-pixel source image associated with this compressor
|
||||||
instance into a YUV planar image and store it in the given
|
instance into a planar YUV image and store it in the given
|
||||||
<code>YUVImage</code> instance. This method uses the accelerated color
|
<a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>YUVImage</code></a> instance. This method performs color conversion (which
|
||||||
conversion routines in TurboJPEG's underlying codec but does not execute
|
is accelerated in the libjpeg-turbo implementation) but does not execute
|
||||||
any of the other steps in the JPEG compression process. Encoding
|
any of the other steps in the JPEG compression process. Encoding CMYK
|
||||||
CMYK source images to YUV is not supported.</div>
|
source images into YUV images is not supported.</div>
|
||||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>dstImage</code> - <a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>YUVImage</code></a> instance that will receive the YUV planar
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>dstImage</code> - <a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>YUVImage</code></a> instance that will receive the planar YUV
|
||||||
image</dd><dd><code>flags</code> - the bitwise OR of one or more of
|
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">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
@@ -716,20 +717,21 @@ public void encodeYUV(byte[] dstBuf,
|
|||||||
<ul class="blockList">
|
<ul class="blockList">
|
||||||
<li class="blockList">
|
<li class="blockList">
|
||||||
<h4>encodeYUV</h4>
|
<h4>encodeYUV</h4>
|
||||||
<pre>public <a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a> encodeYUV(int pad,
|
<pre>public <a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a> encodeYUV(int align,
|
||||||
int flags)
|
int flags)
|
||||||
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||||
<div class="block">Encode the uncompressed source image associated with this compressor
|
<div class="block">Encode the packed-pixel source image associated with this compressor
|
||||||
instance into a unified YUV planar image buffer and return a
|
instance into a unified planar YUV image and return a <a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>YUVImage</code></a>
|
||||||
<code>YUVImage</code> instance containing the encoded image. This method
|
instance containing the encoded image. This method performs color
|
||||||
uses the accelerated color conversion routines in TurboJPEG's underlying
|
conversion (which is accelerated in the libjpeg-turbo implementation) but
|
||||||
codec but does not execute any of the other steps in the JPEG compression
|
does not execute any of the other steps in the JPEG compression process.
|
||||||
process. Encoding CMYK source images to YUV is not supported.</div>
|
Encoding CMYK source images into YUV images 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>align</code> - row alignment (in bytes) of the YUV image (must be a power of
|
||||||
padded to the nearest multiple of this number of bytes (must be a power of
|
2.) Setting this parameter to n will cause each row in each plane of the
|
||||||
2.)</dd><dd><code>flags</code> - the bitwise OR of one or more of
|
YUV image to be padded to the nearest multiple of n bytes (1 = unpadded.)</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 <a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>YUVImage</code></a> instance containing the unified planar YUV
|
||||||
|
encoded image</dd>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
@@ -743,21 +745,22 @@ public void encodeYUV(byte[] dstBuf,
|
|||||||
<pre>public <a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a> encodeYUV(int[] strides,
|
<pre>public <a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a> encodeYUV(int[] strides,
|
||||||
int flags)
|
int flags)
|
||||||
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||||
<div class="block">Encode the uncompressed source image associated with this compressor
|
<div class="block">Encode the packed-pixel source image associated with this compressor
|
||||||
instance into separate Y, U (Cb), and V (Cr) image planes and return a
|
instance into separate Y, U (Cb), and V (Cr) image planes and return a
|
||||||
<code>YUVImage</code> instance containing the encoded image planes. This
|
<a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>YUVImage</code></a> instance containing the encoded image planes. This
|
||||||
method uses the accelerated color conversion routines in TurboJPEG's
|
method performs color conversion (which is accelerated in the
|
||||||
underlying codec but does not execute any of the other steps in the JPEG
|
libjpeg-turbo implementation) but does not execute any of the other steps
|
||||||
compression process. Encoding CMYK source images to YUV is not supported.</div>
|
in the JPEG compression process. Encoding CMYK source images into YUV
|
||||||
|
images 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
|
<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
|
per row 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
|
stride for any plane to 0 is the same as setting it to the plane width
|
||||||
of the plane. If <code>strides</code> is null, then the strides for all
|
(see <a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>YUVImage</code></a>.) If <code>strides</code> is null, then the strides
|
||||||
planes will be set to their respective component widths. You can adjust
|
for all planes will be set to their respective plane widths. You can
|
||||||
the strides in order to add an arbitrary amount of line padding to each
|
adjust the strides in order to add an arbitrary amount of row padding to
|
||||||
plane.</dd><dd><code>flags</code> - the bitwise OR of one or more of
|
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>
|
<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 <a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>YUVImage</code></a> instance containing the encoded image planes</dd>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@@ -163,7 +163,7 @@
|
|||||||
into multiple DCT coefficient buffers and call the callback function once
|
into multiple DCT coefficient buffers and call the callback function once
|
||||||
for each buffer.</dd><dd><code>planeRegion</code> - rectangle containing the width and height of the
|
for each buffer.</dd><dd><code>planeRegion</code> - rectangle containing the width and height of the
|
||||||
component plane to which <code>coeffBuffer</code> belongs</dd><dd><code>componentID</code> - ID number of the component plane to which
|
component plane to which <code>coeffBuffer</code> belongs</dd><dd><code>componentID</code> - ID number of the component plane to which
|
||||||
<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[][],%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
|
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
|
||||||
|
|||||||
@@ -180,20 +180,22 @@ implements java.io.Closeable</pre>
|
|||||||
<tr class="rowColor">
|
<tr class="rowColor">
|
||||||
<td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#TJDecompressor(byte[])">TJDecompressor</a></strong>(byte[] jpegImage)</code>
|
<td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#TJDecompressor(byte[])">TJDecompressor</a></strong>(byte[] jpegImage)</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 stored in <code>jpegImage</code> with the newly created instance.</div>
|
image or "abbreviated table specification" (AKA "tables-only") datastream
|
||||||
|
stored in <code>jpegImage</code> with the newly created instance.</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="altColor">
|
<tr class="altColor">
|
||||||
<td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#TJDecompressor(byte[],%20int)">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 or "abbreviated table specification" (AKA "tables-only") datastream
|
||||||
<code>jpegImage</code> with the newly created instance.</div>
|
of length <code>imageSize</code> bytes stored in <code>jpegImage</code>
|
||||||
|
with the newly created instance.</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="rowColor">
|
<tr class="rowColor">
|
||||||
<td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#TJDecompressor(org.libjpegturbo.turbojpeg.YUVImage)">TJDecompressor</a></strong>(<a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a> yuvImage)</code>
|
<td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#TJDecompressor(org.libjpegturbo.turbojpeg.YUVImage)">TJDecompressor</a></strong>(<a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a> yuvImage)</code>
|
||||||
<div class="block">Create a TurboJPEG decompressor instance and associate the YUV planar
|
<div class="block">Create a TurboJPEG decompressor instance and associate the planar YUV
|
||||||
source image stored in <code>yuvImage</code> with the newly created
|
source image stored in <code>yuvImage</code> with the newly created
|
||||||
instance.</div>
|
instance.</div>
|
||||||
</td>
|
</td>
|
||||||
@@ -223,9 +225,10 @@ implements java.io.Closeable</pre>
|
|||||||
<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,%20int)">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 planar YUV source image
|
||||||
with this decompressor instance and output a decompressed/decoded image to
|
associated with this decompressor instance and output a packed-pixel
|
||||||
the given <code>BufferedImage</code> instance.</div>
|
decompressed/decoded image to the given <code>BufferedImage</code>
|
||||||
|
instance.</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="altColor">
|
<tr class="altColor">
|
||||||
@@ -252,9 +255,9 @@ implements java.io.Closeable</pre>
|
|||||||
int desiredHeight,
|
int desiredHeight,
|
||||||
int pixelFormat,
|
int pixelFormat,
|
||||||
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 planar YUV source image
|
||||||
with this decompressor instance and output a grayscale, RGB, or CMYK image
|
associated with this decompressor instance and output a packed-pixel
|
||||||
to the given destination buffer.</div>
|
grayscale, RGB, or CMYK image to the given destination buffer.</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="altColor">
|
<tr class="altColor">
|
||||||
@@ -267,9 +270,9 @@ implements java.io.Closeable</pre>
|
|||||||
int desiredHeight,
|
int desiredHeight,
|
||||||
int pixelFormat,
|
int pixelFormat,
|
||||||
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 planar YUV source image
|
||||||
with this decompressor instance and output a grayscale, RGB, or CMYK image
|
associated with this decompressor instance and output a packed-pixel
|
||||||
to the given destination buffer.</div>
|
grayscale, RGB, or CMYK image to the given destination buffer.</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="rowColor">
|
<tr class="rowColor">
|
||||||
@@ -280,7 +283,7 @@ implements java.io.Closeable</pre>
|
|||||||
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 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 packed-pixel decompressed/decoded image.</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="altColor">
|
<tr class="altColor">
|
||||||
@@ -290,8 +293,9 @@ implements java.io.Closeable</pre>
|
|||||||
int desiredHeight,
|
int desiredHeight,
|
||||||
int pixelFormat,
|
int pixelFormat,
|
||||||
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 or decode the planar YUV source image
|
||||||
instance and return a buffer containing the decompressed image.</div>
|
associated with this decompressor instance and return a buffer containing
|
||||||
|
the packed-pixel decompressed image.</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="rowColor">
|
<tr class="rowColor">
|
||||||
@@ -319,18 +323,18 @@ implements java.io.Closeable</pre>
|
|||||||
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 set of Y, U (Cb), and V (Cr) image planes and return a
|
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>
|
<a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>YUVImage</code></a> instance containing the decompressed 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="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,
|
<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 align,
|
||||||
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 unified YUV planar image buffer and return a
|
instance into a unified planar YUV image and return a <a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>YUVImage</code></a>
|
||||||
<code>YUVImage</code> instance containing the decompressed image.</div>
|
instance containing the decompressed image.</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="rowColor">
|
<tr class="rowColor">
|
||||||
@@ -338,8 +342,8 @@ implements java.io.Closeable</pre>
|
|||||||
<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,
|
<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 planar YUV image and store it in the given
|
||||||
<code>YUVImage</code> instance.</div>
|
<a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>YUVImage</code></a> instance.</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="altColor">
|
<tr class="altColor">
|
||||||
@@ -363,7 +367,7 @@ implements java.io.Closeable</pre>
|
|||||||
<tr class="rowColor">
|
<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">Returns the JPEG image buffer associated with this decompressor instance.</div>
|
<div class="block">Returns the JPEG buffer associated with this decompressor instance.</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="altColor">
|
<tr class="altColor">
|
||||||
@@ -426,7 +430,7 @@ implements java.io.Closeable</pre>
|
|||||||
<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#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 planar YUV source image with this decompressor
|
||||||
instance.</div>
|
instance.</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -554,9 +558,11 @@ implements java.io.Closeable</pre>
|
|||||||
<pre>public TJDecompressor(byte[] jpegImage)
|
<pre>public TJDecompressor(byte[] jpegImage)
|
||||||
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||||
<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 or "abbreviated table specification" (AKA "tables-only") datastream
|
||||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>jpegImage</code> - JPEG image buffer (size of the JPEG image is assumed to
|
stored in <code>jpegImage</code> with the newly created instance.</div>
|
||||||
be the length of the array.) This buffer is not modified.</dd>
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>jpegImage</code> - buffer containing a JPEG source image or tables-only
|
||||||
|
datastream. (The size of the JPEG image or datastream is assumed to be
|
||||||
|
the length of the array.) This buffer is not modified.</dd>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
@@ -571,9 +577,12 @@ implements java.io.Closeable</pre>
|
|||||||
int imageSize)
|
int imageSize)
|
||||||
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||||
<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 or "abbreviated table specification" (AKA "tables-only") datastream
|
||||||
<code>jpegImage</code> with the newly created instance.</div>
|
of length <code>imageSize</code> bytes stored in <code>jpegImage</code>
|
||||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>jpegImage</code> - JPEG image buffer. This buffer is not modified.</dd><dd><code>imageSize</code> - size of the JPEG image (in bytes)</dd>
|
with the newly created instance.</div>
|
||||||
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>jpegImage</code> - buffer containing a JPEG source image or tables-only
|
||||||
|
datastream. This buffer is not modified.</dd><dd><code>imageSize</code> - size of the JPEG source image or tables-only datastream
|
||||||
|
(in bytes)</dd>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
@@ -586,10 +595,10 @@ implements java.io.Closeable</pre>
|
|||||||
<h4>TJDecompressor</h4>
|
<h4>TJDecompressor</h4>
|
||||||
<pre>public TJDecompressor(<a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a> yuvImage)
|
<pre>public TJDecompressor(<a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a> yuvImage)
|
||||||
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||||
<div class="block">Create a TurboJPEG decompressor instance and associate the YUV planar
|
<div class="block">Create a TurboJPEG decompressor instance and associate the planar YUV
|
||||||
source image stored in <code>yuvImage</code> with the newly created
|
source image stored in <code>yuvImage</code> with the newly created
|
||||||
instance.</div>
|
instance.</div>
|
||||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>yuvImage</code> - <a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>YUVImage</code></a> instance containing a YUV planar
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>yuvImage</code> - <a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>YUVImage</code></a> instance containing a planar YUV source
|
||||||
image to be decoded. This image is not modified.</dd>
|
image to be decoded. This image is not modified.</dd>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
||||||
@@ -622,9 +631,9 @@ implements java.io.Closeable</pre>
|
|||||||
subsequent "abbreviated image" datastreams. This is useful, for instance,
|
subsequent "abbreviated image" datastreams. This is useful, for instance,
|
||||||
when decompressing video streams in which all frames share the same
|
when decompressing video streams in which all frames share the same
|
||||||
quantization and Huffman tables.</div>
|
quantization and Huffman tables.</div>
|
||||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>jpegImage</code> - buffer containing a JPEG image or an "abbreviated table
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>jpegImage</code> - buffer containing a JPEG source image or tables-only
|
||||||
specification" (AKA "tables-only") datastream. This buffer is not
|
datastream. This buffer is not modified.</dd><dd><code>imageSize</code> - size of the JPEG source image or tables-only datastream
|
||||||
modified.</dd><dd><code>imageSize</code> - size of the JPEG image (in bytes)</dd>
|
(in bytes)</dd>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
@@ -651,11 +660,11 @@ public void setJPEGImage(byte[] jpegImage,
|
|||||||
<li class="blockList">
|
<li class="blockList">
|
||||||
<h4>setSourceImage</h4>
|
<h4>setSourceImage</h4>
|
||||||
<pre>public void setSourceImage(<a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a> srcImage)</pre>
|
<pre>public void setSourceImage(<a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a> srcImage)</pre>
|
||||||
<div class="block">Associate the specified YUV planar source image with this decompressor
|
<div class="block">Associate the specified planar YUV source image with this decompressor
|
||||||
instance. Subsequent decompress operations will decode this image into an
|
instance. Subsequent decompress operations will decode this image into a
|
||||||
RGB or grayscale destination image.</div>
|
packed-pixel RGB or grayscale destination image.</div>
|
||||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>srcImage</code> - <a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>YUVImage</code></a> instance containing a YUV planar image to
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>srcImage</code> - <a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>YUVImage</code></a> instance containing a planar YUV source
|
||||||
be decoded. This image is not modified.</dd></dl>
|
image to be decoded. This image is not modified.</dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a name="getWidth()">
|
<a name="getWidth()">
|
||||||
@@ -719,8 +728,8 @@ public void setJPEGImage(byte[] jpegImage,
|
|||||||
<li class="blockList">
|
<li class="blockList">
|
||||||
<h4>getJPEGBuf</h4>
|
<h4>getJPEGBuf</h4>
|
||||||
<pre>public byte[] getJPEGBuf()</pre>
|
<pre>public byte[] getJPEGBuf()</pre>
|
||||||
<div class="block">Returns the JPEG image buffer associated with this decompressor instance.</div>
|
<div class="block">Returns the JPEG buffer associated with this decompressor instance.</div>
|
||||||
<dl><dt><span class="strong">Returns:</span></dt><dd>the JPEG image buffer associated with this decompressor instance.</dd></dl>
|
<dl><dt><span class="strong">Returns:</span></dt><dd>the JPEG buffer associated with this decompressor instance.</dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a name="getJPEGSize()">
|
<a name="getJPEGSize()">
|
||||||
@@ -748,12 +757,12 @@ public void setJPEGImage(byte[] jpegImage,
|
|||||||
decompressor can generate without exceeding the desired image width and
|
decompressor can generate without exceeding the desired image width and
|
||||||
height.</div>
|
height.</div>
|
||||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>desiredWidth</code> - desired width (in pixels) of the decompressed image.
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>desiredWidth</code> - desired width (in pixels) of the decompressed image.
|
||||||
Setting this to 0 is the same as setting it to the width of the JPEG image
|
Setting this to 0 is the same as setting it to the width of the JPEG
|
||||||
(in other words, the width will not be considered when determining the
|
image. (In other words, the width will not be considered when determining
|
||||||
scaled image size.)</dd><dd><code>desiredHeight</code> - desired height (in pixels) of the decompressed image.
|
the scaled image size.)</dd><dd><code>desiredHeight</code> - desired height (in pixels) of the decompressed image.
|
||||||
Setting this to 0 is the same as setting it to the height of the JPEG
|
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
|
image. (In other words, the height will not be considered when
|
||||||
the scaled image size.)</dd>
|
determining 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></dl>
|
height.</dd></dl>
|
||||||
@@ -771,12 +780,12 @@ public void setJPEGImage(byte[] jpegImage,
|
|||||||
decompressor can generate without exceeding the desired image width and
|
decompressor can generate without exceeding the desired image width and
|
||||||
height.</div>
|
height.</div>
|
||||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>desiredWidth</code> - desired width (in pixels) of the decompressed image.
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>desiredWidth</code> - desired width (in pixels) of the decompressed image.
|
||||||
Setting this to 0 is the same as setting it to the width of the JPEG image
|
Setting this to 0 is the same as setting it to the width of the JPEG
|
||||||
(in other words, the width will not be considered when determining the
|
image. (In other words, the width will not be considered when determining
|
||||||
scaled image size.)</dd><dd><code>desiredHeight</code> - desired height (in pixels) of the decompressed image.
|
the scaled image size.)</dd><dd><code>desiredHeight</code> - desired height (in pixels) of the decompressed image.
|
||||||
Setting this to 0 is the same as setting it to the height of the JPEG
|
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
|
image. (In other words, the height will not be considered when
|
||||||
the scaled image size.)</dd>
|
determining 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></dl>
|
height.</dd></dl>
|
||||||
@@ -797,25 +806,26 @@ public void setJPEGImage(byte[] jpegImage,
|
|||||||
int pixelFormat,
|
int pixelFormat,
|
||||||
int flags)
|
int flags)
|
||||||
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||||
<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 planar YUV source image
|
||||||
with this decompressor instance and output a grayscale, RGB, or CMYK image
|
associated with this decompressor instance and output a packed-pixel
|
||||||
to the given destination buffer.
|
grayscale, RGB, or CMYK image to the given destination buffer.
|
||||||
<p>
|
<p>
|
||||||
NOTE: The output image is fully recoverable if this method throws a
|
NOTE: The destination image is fully recoverable if this method throws a
|
||||||
non-fatal <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg"><code>TJException</code></a> (unless
|
non-fatal <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg"><code>TJException</code></a> (unless
|
||||||
<a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_STOPONWARNING"><code>TJ.FLAG_STOPONWARNING</code></a> is specified.)</div>
|
<a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_STOPONWARNING"><code>TJ.FLAG_STOPONWARNING</code></a> is specified.)</div>
|
||||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>dstBuf</code> - buffer that will receive the decompressed/decoded image.
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>dstBuf</code> - buffer that will receive the packed-pixel
|
||||||
If the source image is a JPEG image, then this buffer should normally be
|
decompressed/decoded image. If the source image is a JPEG image, then
|
||||||
<code>pitch * scaledHeight</code> bytes in size, where
|
this buffer should normally be <code>pitch * scaledHeight</code> bytes in
|
||||||
<code>scaledHeight</code> can be determined by calling <code>
|
size, where <code>scaledHeight</code> can be determined by calling
|
||||||
scalingFactor.<a href="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html#getScaled(int)"><code>getScaled</code></a>(jpegHeight)
|
<code>scalingFactor.</code><a href="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html#getScaled(int)"><code>getScaled</code></a><code>(jpegHeight)</code>
|
||||||
</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
|
with one of the scaling factors returned from <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#getScalingFactors()"><code>TJ.getScalingFactors()</code></a>
|
||||||
source image is a YUV image, then this buffer should normally be
|
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
|
||||||
<code>pitch * height</code> bytes in size, where <code>height</code> is
|
image, then this buffer should normally be <code>pitch * height</code>
|
||||||
the height of the YUV image. However, the buffer may also be larger than
|
bytes in size, where <code>height</code> is the height of the YUV image.
|
||||||
the dimensions of the source image, in which case the <code>x</code>,
|
However, the buffer may also be larger than the dimensions of the source
|
||||||
<code>y</code>, and <code>pitch</code> parameters can be used to specify
|
image, in which case the <code>x</code>, <code>y</code>, and
|
||||||
the region into which the source image should be decompressed/decoded.</dd><dd><code>x</code> - x offset (in pixels) of the region in the destination image into
|
<code>pitch</code> parameters can be used to specify the region into which
|
||||||
|
the source image should be decompressed/decoded.</dd><dd><code>x</code> - x offset (in pixels) of the region in the destination image into
|
||||||
which the source image should be decompressed/decoded</dd><dd><code>y</code> - y offset (in pixels) of the region in the destination image into
|
which the source image should be decompressed/decoded</dd><dd><code>y</code> - y offset (in pixels) of the region in the destination image into
|
||||||
which the source image should be decompressed/decoded</dd><dd><code>desiredWidth</code> - If the source image is a JPEG image, then this
|
which the source image should be decompressed/decoded</dd><dd><code>desiredWidth</code> - If the source image is a JPEG image, then this
|
||||||
specifies the desired width (in pixels) of the decompressed image (or
|
specifies the desired width (in pixels) of the decompressed image (or
|
||||||
@@ -823,18 +833,18 @@ public void setJPEGImage(byte[] jpegImage,
|
|||||||
than the source image dimensions, then TurboJPEG will use scaling in the
|
than the source image dimensions, then TurboJPEG will use scaling in the
|
||||||
JPEG decompressor to generate the largest possible image that will fit
|
JPEG decompressor to generate the largest possible image that will fit
|
||||||
within the desired dimensions. Setting this to 0 is the same as setting
|
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
|
it to the width of the JPEG image. (In other words, the width will not be
|
||||||
considered when determining the scaled image size.) This parameter is
|
considered when determining the scaled image size.) This parameter is
|
||||||
ignored if the source image is a YUV image.</dd><dd><code>pitch</code> - bytes per line of the destination image. Normally, this
|
ignored if the source image is a YUV image.</dd><dd><code>pitch</code> - bytes per row in the destination image. Normally this should
|
||||||
should be set to <code>scaledWidth * TJ.pixelSize(pixelFormat)</code> if
|
be set to <code>scaledWidth * TJ.pixelSize(pixelFormat)</code>, if the
|
||||||
the destination image is unpadded, but you can use this to, for instance,
|
destination image will be unpadded. However, you can use this to, for
|
||||||
pad each line of the destination image to a 4-byte boundary or to
|
instance, pad each row of the destination image to the nearest multiple of
|
||||||
decompress/decode the source image into a region of a larger image. NOTE:
|
4 bytes or to decompress/decode the source image into a region of a larger
|
||||||
if the source image is a JPEG image, then <code>scaledWidth</code> can be
|
image. NOTE: if the source image is a JPEG image, then
|
||||||
determined by calling <code>
|
<code>scaledWidth</code> can be determined by calling
|
||||||
scalingFactor.<a href="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html#getScaled(int)"><code>getScaled</code></a>(jpegWidth)
|
<code>scalingFactor.</code><a href="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html#getScaled(int)"><code>getScaled</code></a><code>(jpegWidth)</code>
|
||||||
</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
|
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
|
||||||
YUV image, then <code>scaledWidth</code> is the width of the YUV image.
|
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
|
||||||
specifies the desired height (in pixels) of the decompressed image (or
|
specifies the desired height (in pixels) of the decompressed image (or
|
||||||
@@ -842,8 +852,8 @@ public void setJPEGImage(byte[] jpegImage,
|
|||||||
than the source image dimensions, then TurboJPEG will use scaling in the
|
than the source image dimensions, then TurboJPEG will use scaling in the
|
||||||
JPEG decompressor to generate the largest possible image that will fit
|
JPEG decompressor to generate the largest possible image that will fit
|
||||||
within the desired dimensions. Setting this to 0 is the same as setting
|
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
|
it to the height of the JPEG image. (In other words, the height will not
|
||||||
considered when determining the scaled image size.) This parameter is
|
be considered when determining the scaled image size.) This parameter is
|
||||||
ignored if the source image is a YUV image.</dd><dd><code>pixelFormat</code> - pixel format of the decompressed/decoded image (one of
|
ignored if the source image is a YUV image.</dd><dd><code>pixelFormat</code> - pixel format of the decompressed/decoded 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>
|
||||||
@@ -883,8 +893,9 @@ public void decompress(byte[] dstBuf,
|
|||||||
int pixelFormat,
|
int pixelFormat,
|
||||||
int flags)
|
int flags)
|
||||||
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||||
<div class="block">Decompress the JPEG source image associated with this decompressor
|
<div class="block">Decompress the JPEG source image or decode the planar YUV source image
|
||||||
instance and return a buffer containing the decompressed image.</div>
|
associated with this decompressor instance and return a buffer containing
|
||||||
|
the packed-pixel 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[],%20int,%20int,%20int,%20int,%20int,%20int,%20int)"><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
|
||||||
@@ -894,7 +905,7 @@ public void decompress(byte[] dstBuf,
|
|||||||
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 packed-pixel decompressed image.</dd>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
@@ -909,21 +920,21 @@ public void decompress(byte[] dstBuf,
|
|||||||
int flags)
|
int flags)
|
||||||
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></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 store it in the given
|
instance into a planar YUV image and store it in the given
|
||||||
<code>YUVImage</code> instance. This method performs JPEG decompression
|
<a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>YUVImage</code></a> instance. This method performs JPEG decompression but
|
||||||
but leaves out the color conversion step, so a planar YUV image is
|
leaves out the color conversion step, so a planar YUV image is generated
|
||||||
generated instead of an RGB or grayscale image. This method cannot be
|
instead of a packed-pixel image. This method cannot be used to decompress
|
||||||
used to decompress JPEG source images with the CMYK or YCCK colorspace.
|
JPEG source images with the CMYK or YCCK colorspace.
|
||||||
<p>
|
<p>
|
||||||
NOTE: The YUV planar output image is fully recoverable if this method
|
NOTE: The planar YUV destination image is fully recoverable if this method
|
||||||
throws a non-fatal <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg"><code>TJException</code></a> (unless
|
throws a non-fatal <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg"><code>TJException</code></a> (unless
|
||||||
<a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_STOPONWARNING"><code>TJ.FLAG_STOPONWARNING</code></a> is specified.)</div>
|
<a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_STOPONWARNING"><code>TJ.FLAG_STOPONWARNING</code></a> is specified.)</div>
|
||||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>dstImage</code> - <a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>YUVImage</code></a> instance that will receive the YUV planar
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>dstImage</code> - <a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>YUVImage</code></a> instance that will receive the planar YUV
|
||||||
image. The level of subsampling specified in this <code>YUVImage</code>
|
decompressed image. The level of subsampling specified in this
|
||||||
instance must match that of the JPEG image, and the width and height
|
<a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>YUVImage</code></a> instance must match that of the JPEG image, and the width
|
||||||
specified in the <code>YUVImage</code> instance must match one of the
|
and height specified in the <a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>YUVImage</code></a> instance must match one of
|
||||||
scaled image sizes that TurboJPEG is capable of generating from the JPEG
|
the scaled image sizes that the decompressor is capable of generating from
|
||||||
source image.</dd><dd><code>flags</code> - the bitwise OR of one or more of
|
the JPEG source 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">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
||||||
@@ -957,32 +968,33 @@ public void decompressToYUV(byte[] dstBuf,
|
|||||||
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></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 set of Y, U (Cb), and V (Cr) image planes and return a
|
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.
|
<a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>YUVImage</code></a> instance containing the decompressed image planes. This
|
||||||
This method performs JPEG decompression but leaves out the color
|
method performs JPEG decompression but leaves out the color conversion
|
||||||
conversion step, so a planar YUV image is generated instead of an RGB or
|
step, so a planar YUV image is generated instead of a packed-pixel image.
|
||||||
grayscale image. This method cannot be used to decompress JPEG source
|
This method cannot be used to decompress JPEG source images with the CMYK
|
||||||
images with the CMYK or YCCK colorspace.</div>
|
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
|
||||||
decompressor to generate the largest possible image that will fit within
|
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 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
|
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
|
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
|
per row in the corresponding plane of the YUV image. Setting the stride
|
||||||
stride for any plane to 0 is the same as setting it to the scaled
|
for any plane to 0 is the same as setting it to the scaled plane width
|
||||||
component width of the plane. If <tt>strides</tt> is NULL, then the
|
(see <a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>YUVImage</code></a>.) If <code>strides</code> is null, then the strides
|
||||||
strides for all planes will be set to their respective scaled component
|
for all planes will be set to their respective scaled plane widths. You
|
||||||
widths. You can adjust the strides in order to add an arbitrary amount of
|
can adjust the strides in order to add an arbitrary amount of row padding
|
||||||
line padding to each plane.</dd><dd><code>desiredHeight</code> - desired height (in pixels) of the YUV image. If the
|
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
|
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
|
||||||
decompressor to generate the largest possible image that will fit within
|
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 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
|
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 <a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>YUVImage</code></a> instance containing the decompressed image
|
||||||
|
planes</dd>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
@@ -994,34 +1006,34 @@ public void decompressToYUV(byte[] dstBuf,
|
|||||||
<li class="blockList">
|
<li class="blockList">
|
||||||
<h4>decompressToYUV</h4>
|
<h4>decompressToYUV</h4>
|
||||||
<pre>public <a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a> decompressToYUV(int desiredWidth,
|
<pre>public <a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a> decompressToYUV(int desiredWidth,
|
||||||
int pad,
|
int align,
|
||||||
int desiredHeight,
|
int desiredHeight,
|
||||||
int flags)
|
int flags)
|
||||||
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></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 unified YUV planar image buffer and return a
|
instance into a unified planar YUV image and return a <a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>YUVImage</code></a>
|
||||||
<code>YUVImage</code> instance containing the decompressed image. This
|
instance containing the decompressed image. This method performs JPEG
|
||||||
method performs JPEG decompression but leaves out the color conversion
|
decompression but leaves out the color conversion step, so a planar YUV
|
||||||
step, so a planar YUV image is generated instead of an RGB or grayscale
|
image is generated instead of a packed-pixel image. This method cannot be
|
||||||
image. This method cannot be used to decompress JPEG source images with
|
used to decompress JPEG source images with the CMYK or YCCK 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
|
||||||
decompressor to generate the largest possible image that will fit within
|
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 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
|
the width of the JPEG image. (In other words, the width will not be
|
||||||
considered when determining the scaled image size.)</dd><dd><code>pad</code> - the width of each line in each plane of the YUV image will be
|
considered when determining the scaled image size.)</dd><dd><code>align</code> - row alignment (in bytes) of the YUV image (must be a power of
|
||||||
padded to the nearest multiple of this number of bytes (must be a power of
|
2.) Setting this parameter to n will cause each row in each plane of the
|
||||||
2.)</dd><dd><code>desiredHeight</code> - desired height (in pixels) of the YUV image. If the
|
YUV image to be padded to the nearest multiple of n bytes (1 = unpadded.)</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
|
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
|
||||||
decompressor to generate the largest possible image that will fit within
|
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 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
|
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 <a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>YUVImage</code></a> instance containing the unified planar YUV
|
||||||
|
decompressed image</dd>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
@@ -1055,25 +1067,26 @@ public byte[] decompressToYUV(int flags)
|
|||||||
int pixelFormat,
|
int pixelFormat,
|
||||||
int flags)
|
int flags)
|
||||||
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||||
<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 planar YUV source image
|
||||||
with this decompressor instance and output a grayscale, RGB, or CMYK image
|
associated with this decompressor instance and output a packed-pixel
|
||||||
to the given destination buffer.
|
grayscale, RGB, or CMYK image to the given destination buffer.
|
||||||
<p>
|
<p>
|
||||||
NOTE: The output image is fully recoverable if this method throws a
|
NOTE: The destination image is fully recoverable if this method throws a
|
||||||
non-fatal <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg"><code>TJException</code></a> (unless
|
non-fatal <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg"><code>TJException</code></a> (unless
|
||||||
<a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_STOPONWARNING"><code>TJ.FLAG_STOPONWARNING</code></a> is specified.)</div>
|
<a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_STOPONWARNING"><code>TJ.FLAG_STOPONWARNING</code></a> is specified.)</div>
|
||||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>dstBuf</code> - buffer that will receive the decompressed/decoded image.
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>dstBuf</code> - buffer that will receive the packed-pixel
|
||||||
If the source image is a JPEG image, then this buffer should normally be
|
decompressed/decoded image. If the source image is a JPEG image, then
|
||||||
<code>stride * scaledHeight</code> pixels in size, where
|
this buffer should normally be <code>stride * scaledHeight</code> pixels
|
||||||
<code>scaledHeight</code> can be determined by calling <code>
|
in size, where <code>scaledHeight</code> can be determined by calling
|
||||||
scalingFactor.<a href="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html#getScaled(int)"><code>getScaled</code></a>(jpegHeight)
|
<code>scalingFactor.</code><a href="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html#getScaled(int)"><code>getScaled</code></a><code>(jpegHeight)</code>
|
||||||
</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
|
with one of the scaling factors returned from <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#getScalingFactors()"><code>TJ.getScalingFactors()</code></a>
|
||||||
source image is a YUV image, then this buffer should normally be
|
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
|
||||||
<code>stride * height</code> pixels in size, where <code>height</code> is
|
image, then this buffer should normally be <code>stride * height</code>
|
||||||
the height of the YUV image. However, the buffer may also be larger than
|
pixels in size, where <code>height</code> is the height of the YUV image.
|
||||||
the dimensions of the JPEG image, in which case the <code>x</code>,
|
However, the buffer may also be larger than the dimensions of the JPEG
|
||||||
<code>y</code>, and <code>stride</code> parameters can be used to specify
|
image, in which case the <code>x</code>, <code>y</code>, and
|
||||||
the region into which the source image should be decompressed.</dd><dd><code>x</code> - x offset (in pixels) of the region in the destination image into
|
<code>stride</code> parameters can be used to specify the region into
|
||||||
|
which the source image should be decompressed.</dd><dd><code>x</code> - x offset (in pixels) of the region in the destination image into
|
||||||
which the source image should be decompressed/decoded</dd><dd><code>y</code> - y offset (in pixels) of the region in the destination image into
|
which the source image should be decompressed/decoded</dd><dd><code>y</code> - y offset (in pixels) of the region in the destination image into
|
||||||
which the source image should be decompressed/decoded</dd><dd><code>desiredWidth</code> - If the source image is a JPEG image, then this
|
which the source image should be decompressed/decoded</dd><dd><code>desiredWidth</code> - If the source image is a JPEG image, then this
|
||||||
specifies the desired width (in pixels) of the decompressed image (or
|
specifies the desired width (in pixels) of the decompressed image (or
|
||||||
@@ -1081,16 +1094,16 @@ public byte[] decompressToYUV(int flags)
|
|||||||
than the source image dimensions, then TurboJPEG will use scaling in the
|
than the source image dimensions, then TurboJPEG will use scaling in the
|
||||||
JPEG decompressor to generate the largest possible image that will fit
|
JPEG decompressor to generate the largest possible image that will fit
|
||||||
within the desired dimensions. Setting this to 0 is the same as setting
|
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
|
it to the width of the JPEG image. (In other words, the width will not be
|
||||||
considered when determining the scaled image size.) This parameter is
|
considered when determining the scaled image size.) This parameter is
|
||||||
ignored if the source image is a YUV image.</dd><dd><code>stride</code> - pixels per line of the destination image. Normally, this
|
ignored if the source image is a YUV image.</dd><dd><code>stride</code> - pixels per row in the destination image. Normally this
|
||||||
should be set to <code>scaledWidth</code>, but you can use this to, for
|
should be set to <code>scaledWidth</code>, but you can use this to, for
|
||||||
instance, decompress the JPEG image into a region of a larger image.
|
instance, decompress the JPEG image into a region of a larger image.
|
||||||
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
|
||||||
scalingFactor.<a href="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html#getScaled(int)"><code>getScaled</code></a>(jpegWidth)
|
<code>scalingFactor.</code><a href="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html#getScaled(int)"><code>getScaled</code></a><code>(jpegWidth)</code>
|
||||||
</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
|
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
|
||||||
YUV image, then <code>scaledWidth</code> is the width of the YUV image.
|
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
|
||||||
specifies the desired height (in pixels) of the decompressed image (or
|
specifies the desired height (in pixels) of the decompressed image (or
|
||||||
@@ -1098,8 +1111,8 @@ public byte[] decompressToYUV(int flags)
|
|||||||
than the source image dimensions, then TurboJPEG will use scaling in the
|
than the source image dimensions, then TurboJPEG will use scaling in the
|
||||||
JPEG decompressor to generate the largest possible image that will fit
|
JPEG decompressor to generate the largest possible image that will fit
|
||||||
within the desired dimensions. Setting this to 0 is the same as setting
|
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
|
it to the height of the JPEG image. (In other words, the height will not
|
||||||
considered when determining the scaled image size.) This parameter is
|
be considered when determining the scaled image size.) This parameter is
|
||||||
ignored if the source image is a YUV image.</dd><dd><code>pixelFormat</code> - pixel format of the decompressed image (one of
|
ignored if the source image is a YUV image.</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>
|
||||||
@@ -1116,20 +1129,21 @@ public byte[] decompressToYUV(int flags)
|
|||||||
<pre>public void decompress(java.awt.image.BufferedImage dstImage,
|
<pre>public void decompress(java.awt.image.BufferedImage dstImage,
|
||||||
int flags)
|
int flags)
|
||||||
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||||
<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 planar YUV source image
|
||||||
with this decompressor instance and output a decompressed/decoded image to
|
associated with this decompressor instance and output a packed-pixel
|
||||||
the given <code>BufferedImage</code> instance.
|
decompressed/decoded image to the given <code>BufferedImage</code>
|
||||||
|
instance.
|
||||||
<p>
|
<p>
|
||||||
NOTE: The output image is fully recoverable if this method throws a
|
NOTE: The destination image is fully recoverable if this method throws a
|
||||||
non-fatal <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg"><code>TJException</code></a> (unless
|
non-fatal <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg"><code>TJException</code></a> (unless
|
||||||
<a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_STOPONWARNING"><code>TJ.FLAG_STOPONWARNING</code></a> is specified.)</div>
|
<a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_STOPONWARNING"><code>TJ.FLAG_STOPONWARNING</code></a> is specified.)</div>
|
||||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>dstImage</code> - a <code>BufferedImage</code> instance that will receive
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>dstImage</code> - a <code>BufferedImage</code> instance that will receive
|
||||||
the decompressed/decoded image. If the source image is a JPEG image, then
|
the packed-pixel decompressed/decoded image. If the source image is a
|
||||||
the width and height of the <code>BufferedImage</code> instance must match
|
JPEG image, then the width and height of the <code>BufferedImage</code>
|
||||||
one of the scaled image sizes that TurboJPEG is capable of generating from
|
instance must match one of the scaled image sizes that the decompressor is
|
||||||
the JPEG image. If the source image is a YUV image, then the width and
|
capable of generating from the JPEG image. If the source image is a YUV
|
||||||
height of the <code>BufferedImage</code> instance must match the width and
|
image, then the width and height of the <code>BufferedImage</code>
|
||||||
height of the YUV image.</dd><dd><code>flags</code> - the bitwise OR of one or more of
|
instance must match the width and height of the YUV 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">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
||||||
@@ -1148,7 +1162,7 @@ public byte[] decompressToYUV(int flags)
|
|||||||
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||||
<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 packed-pixel 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[],%20int,%20int,%20int,%20int,%20int,%20int,%20int)"><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
|
||||||
@@ -1157,7 +1171,7 @@ public byte[] decompressToYUV(int flags)
|
|||||||
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 packed-pixel
|
||||||
decompressed/decoded image.</dd>
|
decompressed/decoded image.</dd>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
||||||
|
|||||||
@@ -167,7 +167,7 @@ extends java.awt.Rectangle</pre>
|
|||||||
<tr class="altColor">
|
<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/TJTransform.html#op">op</a></strong></code>
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html#op">op</a></strong></code>
|
||||||
<div class="block">Transform operation (one of <code>OP_*</code>)</div>
|
<div class="block">Transform operation (one of <a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html#OP_NONE"><code>OP_*</code></a>)</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="rowColor">
|
<tr class="rowColor">
|
||||||
@@ -223,7 +223,7 @@ extends java.awt.Rectangle</pre>
|
|||||||
<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_COPYNONE">OPT_COPYNONE</a></strong></code>
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html#OPT_COPYNONE">OPT_COPYNONE</a></strong></code>
|
||||||
<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 copying any extra markers (including EXIF
|
<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 copying any extra markers (including EXIF
|
||||||
and ICC profile data) from the source image to the output image.</div>
|
and ICC profile data) from the source image to the destination image.</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="altColor">
|
<tr class="altColor">
|
||||||
@@ -235,8 +235,8 @@ 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_GRAY">OPT_GRAY</a></strong></code>
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html#OPT_GRAY">OPT_GRAY</a></strong></code>
|
||||||
<div class="block">This option will discard the color data in the input image and produce
|
<div class="block">This option will discard the color data in the source image and produce a
|
||||||
a grayscale output image.</div>
|
grayscale destination image.</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="altColor">
|
<tr class="altColor">
|
||||||
@@ -256,7 +256,7 @@ extends java.awt.Rectangle</pre>
|
|||||||
<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_PROGRESSIVE">OPT_PROGRESSIVE</a></strong></code>
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html#OPT_PROGRESSIVE">OPT_PROGRESSIVE</a></strong></code>
|
||||||
<div class="block">This option will enable progressive entropy coding in the output image
|
<div class="block">This option will enable progressive entropy coding in the JPEG image
|
||||||
generated by this particular transform.</div>
|
generated by this particular transform.</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -270,7 +270,8 @@ extends java.awt.Rectangle</pre>
|
|||||||
<tr class="altColor">
|
<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/TJTransform.html#options">options</a></strong></code>
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html#options">options</a></strong></code>
|
||||||
<div class="block">Transform options (bitwise OR of one or more of <code>OPT_*</code>)</div>
|
<div class="block">Transform options (bitwise OR of one or more of
|
||||||
|
<a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html#OPT_PERFECT"><code>OPT_*</code></a>)</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@@ -547,8 +548,8 @@ extends java.awt.Rectangle</pre>
|
|||||||
<li class="blockList">
|
<li class="blockList">
|
||||||
<h4>OPT_GRAY</h4>
|
<h4>OPT_GRAY</h4>
|
||||||
<pre>public static final int OPT_GRAY</pre>
|
<pre>public static final int OPT_GRAY</pre>
|
||||||
<div class="block">This option will discard the color data in the input image and produce
|
<div class="block">This option will discard the color data in the source image and produce a
|
||||||
a grayscale output image.</div>
|
grayscale destination image.</div>
|
||||||
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJTransform.OPT_GRAY">Constant Field Values</a></dd></dl>
|
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJTransform.OPT_GRAY">Constant Field Values</a></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -573,7 +574,7 @@ extends java.awt.Rectangle</pre>
|
|||||||
<li class="blockList">
|
<li class="blockList">
|
||||||
<h4>OPT_PROGRESSIVE</h4>
|
<h4>OPT_PROGRESSIVE</h4>
|
||||||
<pre>public static final int OPT_PROGRESSIVE</pre>
|
<pre>public static final int OPT_PROGRESSIVE</pre>
|
||||||
<div class="block">This option will enable progressive entropy coding in the output image
|
<div class="block">This option will enable progressive entropy coding in the JPEG image
|
||||||
generated by this particular transform. Progressive entropy coding will
|
generated by this particular transform. Progressive entropy coding will
|
||||||
generally improve compression relative to baseline entropy coding (the
|
generally improve compression relative to baseline entropy coding (the
|
||||||
default), but it will reduce compression and decompression performance
|
default), but it will reduce compression and decompression performance
|
||||||
@@ -589,7 +590,7 @@ extends java.awt.Rectangle</pre>
|
|||||||
<h4>OPT_COPYNONE</h4>
|
<h4>OPT_COPYNONE</h4>
|
||||||
<pre>public static final int OPT_COPYNONE</pre>
|
<pre>public static final int OPT_COPYNONE</pre>
|
||||||
<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 copying any extra markers (including EXIF
|
<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 copying any extra markers (including EXIF
|
||||||
and ICC profile data) from the source image to the output image.</div>
|
and ICC profile data) from the source image to the destination image.</div>
|
||||||
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJTransform.OPT_COPYNONE">Constant Field Values</a></dd></dl>
|
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJTransform.OPT_COPYNONE">Constant Field Values</a></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -600,7 +601,7 @@ extends java.awt.Rectangle</pre>
|
|||||||
<li class="blockList">
|
<li class="blockList">
|
||||||
<h4>op</h4>
|
<h4>op</h4>
|
||||||
<pre>public int op</pre>
|
<pre>public int op</pre>
|
||||||
<div class="block">Transform operation (one of <code>OP_*</code>)</div>
|
<div class="block">Transform operation (one of <a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html#OP_NONE"><code>OP_*</code></a>)</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a name="options">
|
<a name="options">
|
||||||
@@ -610,7 +611,8 @@ extends java.awt.Rectangle</pre>
|
|||||||
<li class="blockList">
|
<li class="blockList">
|
||||||
<h4>options</h4>
|
<h4>options</h4>
|
||||||
<pre>public int options</pre>
|
<pre>public int options</pre>
|
||||||
<div class="block">Transform options (bitwise OR of one or more of <code>OPT_*</code>)</div>
|
<div class="block">Transform options (bitwise OR of one or more of
|
||||||
|
<a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html#OPT_PERFECT"><code>OPT_*</code></a>)</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a name="cf">
|
<a name="cf">
|
||||||
@@ -661,8 +663,8 @@ extends java.awt.Rectangle</pre>
|
|||||||
equivalent of setting it to (width of the source JPEG image -
|
equivalent of setting it to (width of the source JPEG image -
|
||||||
<code>x</code>).</dd><dd><code>h</code> - the height of the cropping region. Setting this to 0 is the
|
<code>x</code>).</dd><dd><code>h</code> - the height of the cropping region. Setting this to 0 is the
|
||||||
equivalent of setting it to (height of the source JPEG image -
|
equivalent of setting it to (height of the source JPEG image -
|
||||||
<code>y</code>).</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>y</code>).</dd><dd><code>op</code> - one of the transform operations (<a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html#OP_NONE"><code>OP_*</code></a>)</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></dl>
|
(<a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html#OPT_PERFECT"><code>OPT_*</code></a>)</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></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a name="TJTransform(java.awt.Rectangle, int, int, org.libjpegturbo.turbojpeg.TJCustomFilter)">
|
<a name="TJTransform(java.awt.Rectangle, int, int, org.libjpegturbo.turbojpeg.TJCustomFilter)">
|
||||||
@@ -678,8 +680,8 @@ extends java.awt.Rectangle</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,%20int,%20int,%20int,%20int,%20int,%20org.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 (<a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html#OP_NONE"><code>OP_*</code></a>)</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></dl>
|
(<a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html#OPT_PERFECT"><code>OPT_*</code></a>)</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></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@@ -148,14 +148,15 @@ extends <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title=
|
|||||||
<tr class="rowColor">
|
<tr class="rowColor">
|
||||||
<td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#TJTransformer(byte[])">TJTransformer</a></strong>(byte[] jpegImage)</code>
|
<td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#TJTransformer(byte[])">TJTransformer</a></strong>(byte[] jpegImage)</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 stored in <code>jpegImage</code> with the newly created instance.</div>
|
source image stored in <code>jpegImage</code> with the newly created
|
||||||
|
instance.</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="altColor">
|
<tr class="altColor">
|
||||||
<td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#TJTransformer(byte[],%20int)">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
|
source 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>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -178,7 +179,7 @@ extends <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title=
|
|||||||
<td class="colFirst"><code>int[]</code></td>
|
<td class="colFirst"><code>int[]</code></td>
|
||||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#getTransformedSizes()">getTransformedSizes</a></strong>()</code>
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#getTransformedSizes()">getTransformedSizes</a></strong>()</code>
|
||||||
<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>
|
(in bytes) generated by the most recent transform operation.</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="rowColor">
|
<tr class="rowColor">
|
||||||
@@ -186,18 +187,18 @@ extends <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title=
|
|||||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#transform(byte[][],%20org.libjpegturbo.turbojpeg.TJTransform[],%20int)">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 source image associated with this
|
||||||
instance into one or more JPEG images stored in the given destination
|
transformer instance into one or more JPEG images stored in the given
|
||||||
buffers.</div>
|
destination buffers.</div>
|
||||||
</td>
|
</td>
|
||||||
</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[],%20int)">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 source image associated with this
|
||||||
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
|
transformer instance and return an array of <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><code>TJDecompressor</code></a>
|
||||||
which has a transformed JPEG image associated with it.</div>
|
instances, each of which has a transformed JPEG image associated with it.</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@@ -251,9 +252,11 @@ extends <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title=
|
|||||||
<pre>public TJTransformer(byte[] jpegImage)
|
<pre>public TJTransformer(byte[] jpegImage)
|
||||||
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||||
<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>
|
source image stored in <code>jpegImage</code> with the newly created
|
||||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>jpegImage</code> - JPEG image buffer (size of the JPEG image is assumed to
|
instance.</div>
|
||||||
be the length of the array.) This buffer is not modified.</dd>
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>jpegImage</code> - buffer containing the JPEG source image to transform.
|
||||||
|
(The size of the JPEG image is assumed to be the length of the array.)
|
||||||
|
This buffer is not modified.</dd>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
@@ -268,9 +271,10 @@ extends <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title=
|
|||||||
int imageSize)
|
int imageSize)
|
||||||
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||||
<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
|
source 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>
|
||||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>jpegImage</code> - JPEG image buffer. This buffer is not modified.</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> - buffer containing the JPEG source image to transform.
|
||||||
|
This buffer is not modified.</dd><dd><code>imageSize</code> - size of the JPEG source image (in bytes)</dd>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
@@ -293,25 +297,26 @@ extends <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title=
|
|||||||
<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)
|
int flags)
|
||||||
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||||
<div class="block">Losslessly transform the JPEG image associated with this transformer
|
<div class="block">Losslessly transform the JPEG source image associated with this
|
||||||
instance into one or more JPEG images stored in the given destination
|
transformer instance into one or more JPEG images stored in the given
|
||||||
buffers. Lossless transforms work by moving the raw coefficients from one
|
destination buffers. Lossless transforms work by moving the raw
|
||||||
JPEG image structure to another without altering the values of the
|
coefficients from one JPEG image structure to another without altering the
|
||||||
coefficients. While this is typically faster than decompressing the
|
values of the coefficients. While this is typically faster than
|
||||||
image, transforming it, and re-compressing it, lossless transforms are not
|
decompressing the image, transforming it, and re-compressing it, lossless
|
||||||
free. Each lossless transform requires reading and performing Huffman
|
transforms are not free. Each lossless transform requires reading and
|
||||||
decoding on all of the coefficients in the source image, regardless of the
|
performing Huffman decoding on all of the coefficients in the source
|
||||||
size of the destination image. Thus, this method provides a means of
|
image, regardless of the size of the destination image. Thus, this method
|
||||||
generating multiple transformed images from the same source or of applying
|
provides a means of generating multiple transformed images from the same
|
||||||
multiple transformations simultaneously, in order to eliminate the need to
|
source or of applying multiple transformations simultaneously, in order to
|
||||||
read the source coefficients multiple times.</div>
|
eliminate the need to 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 JPEG destination buffers.
|
||||||
receive a JPEG image that has been transformed using the parameters in
|
<code>dstbufs[i]</code> will receive a JPEG image that has been
|
||||||
<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
|
transformed using the parameters in <code>transforms[i]</code>. Use
|
||||||
maximum size for each buffer based on the transformed or cropped width and
|
<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
|
||||||
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
|
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
|
||||||
which specifies the transform parameters and/or cropping region for the
|
which specifies the transform parameters and/or cropping region for the
|
||||||
corresponding transformed output image</dd><dd><code>flags</code> - the bitwise OR of one or more of
|
corresponding transformed JPEG 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">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
||||||
@@ -326,12 +331,12 @@ extends <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title=
|
|||||||
<pre>public <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a>[] transform(<a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</a>[] transforms,
|
<pre>public <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a>[] transform(<a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</a>[] transforms,
|
||||||
int flags)
|
int flags)
|
||||||
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||||
<div class="block">Losslessly transform the JPEG image associated with this transformer
|
<div class="block">Losslessly transform the JPEG source image associated with this
|
||||||
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
|
transformer instance and return an array of <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><code>TJDecompressor</code></a>
|
||||||
which has a transformed JPEG image associated with it.</div>
|
instances, each of which has a transformed JPEG image associated with it.</div>
|
||||||
<dl><dt><span class="strong">Parameters:</span></dt><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
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>transforms</code> - an array of <a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg"><code>TJTransform</code></a> instances, each of
|
||||||
which specifies the transform parameters and/or cropping region for the
|
which specifies the transform parameters and/or cropping region for the
|
||||||
corresponding transformed output image</dd><dd><code>flags</code> - the bitwise OR of one or more of
|
corresponding transformed JPEG 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>
|
||||||
@@ -347,9 +352,9 @@ extends <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title=
|
|||||||
<h4>getTransformedSizes</h4>
|
<h4>getTransformedSizes</h4>
|
||||||
<pre>public int[] getTransformedSizes()</pre>
|
<pre>public int[] getTransformedSizes()</pre>
|
||||||
<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>
|
(in bytes) 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></dl>
|
(in bytes) generated by the most recent transform operation.</dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@@ -98,7 +98,7 @@
|
|||||||
<br>
|
<br>
|
||||||
<pre>public class <span class="strong">YUVImage</span>
|
<pre>public class <span class="strong">YUVImage</span>
|
||||||
extends java.lang.Object</pre>
|
extends java.lang.Object</pre>
|
||||||
<div class="block">This class encapsulates a YUV planar image and the metadata
|
<div class="block">This class encapsulates a planar YUV image and the metadata
|
||||||
associated with it. The TurboJPEG API allows both the JPEG compression and
|
associated with it. The TurboJPEG API allows both the JPEG compression and
|
||||||
decompression pipelines to be split into stages: YUV encode, compress from
|
decompression pipelines to be split into stages: YUV encode, compress from
|
||||||
YUV, decompress to YUV, and YUV decode. A <code>YUVImage</code> instance
|
YUV, decompress to YUV, and YUV decode. A <code>YUVImage</code> instance
|
||||||
@@ -106,30 +106,32 @@ extends java.lang.Object</pre>
|
|||||||
operations and as the source image for compress-from-YUV and YUV decode
|
operations and as the source image for compress-from-YUV and YUV decode
|
||||||
operations.
|
operations.
|
||||||
<p>
|
<p>
|
||||||
Technically, the JPEG format uses the YCbCr colorspace (which technically is
|
Technically, the JPEG format uses the YCbCr colorspace (which is technically
|
||||||
not a "colorspace" but rather a "color transform"), but per the convention
|
not a colorspace but a color transform), but per the convention of the
|
||||||
of the digital video community, the TurboJPEG API uses "YUV" to refer to an
|
digital video community, the TurboJPEG API uses "YUV" to refer to an image
|
||||||
image format consisting of Y, Cb, and Cr image planes.
|
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 (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 width and height of each plane are determined by the image
|
image. The width and height of each plane are determined by the image
|
||||||
width, height, and level of chrominance subsampling. The luminance plane
|
width, height, and level of chrominance subsampling. The luminance plane
|
||||||
width is the image width padded to the nearest multiple of the horizontal
|
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
|
subsampling factor (1 in the case of 4:4:4, grayscale, or 4:4:0; 2 in the
|
||||||
4:1:1, 1 in the case of 4:4:4 or grayscale.) Similarly, the luminance plane
|
case of 4:2:2 or 4:2:0; 4 in the case of 4:1:1.) Similarly, the luminance
|
||||||
height is the image height padded to the nearest multiple of the vertical
|
plane height is the image height padded to the nearest multiple of the
|
||||||
subsampling factor (2 in the case of 4:2:0 or 4:4:0, 1 in the case of 4:4:4
|
vertical subsampling factor (1 in the case of 4:4:4, 4:2:2, grayscale, or
|
||||||
or grayscale.) The chrominance plane width is equal to the luminance plane
|
4:1:1; 2 in the case of 4:2:0 or 4:4:0.) This is irrespective of any
|
||||||
width divided by the horizontal subsampling factor, and the chrominance
|
additional padding that may be specified as an argument to the various
|
||||||
plane height is equal to the luminance plane height divided by the vertical
|
YUVImage methods. The chrominance plane width is equal to the luminance
|
||||||
subsampling factor.
|
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
|
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
|
||||||
chrominance planes would be 18 x 35 bytes. If you specify a line padding of
|
chrominance planes would be 18 x 35 bytes. If you specify a row alignment
|
||||||
4 bytes on top of this, then the luminance plane would be 36 x 35 bytes, and
|
of 4 bytes on top of this, then the luminance plane would be 36 x 35 bytes,
|
||||||
each of the chrominance planes would be 20 x 35 bytes.</div>
|
and each of the chrominance planes would be 20 x 35 bytes.</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
@@ -154,15 +156,15 @@ 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/YUVImage.html#yuvHeight">yuvHeight</a></strong></code> </td>
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#yuvAlign">yuvAlign</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/YUVImage.html#yuvOffsets">yuvOffsets</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="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#yuvOffsets">yuvOffsets</a></strong></code> </td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="altColor">
|
<tr class="altColor">
|
||||||
<td class="colFirst"><code>protected byte[][]</code></td>
|
<td class="colFirst"><code>protected byte[][]</code></td>
|
||||||
@@ -208,10 +210,10 @@ extends java.lang.Object</pre>
|
|||||||
<tr class="rowColor">
|
<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,
|
<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 align,
|
||||||
int height,
|
int height,
|
||||||
int subsamp)</code>
|
int subsamp)</code>
|
||||||
<div class="block">Create a new <code>YUVImage</code> instance from an existing unified image
|
<div class="block">Create a new <code>YUVImage</code> instance from an existing unified
|
||||||
buffer.</div>
|
buffer.</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -226,11 +228,11 @@ extends java.lang.Object</pre>
|
|||||||
</tr>
|
</tr>
|
||||||
<tr class="rowColor">
|
<tr class="rowColor">
|
||||||
<td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#YUVImage(int,%20int,%20int,%20int)">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 align,
|
||||||
int height,
|
int height,
|
||||||
int subsamp)</code>
|
int subsamp)</code>
|
||||||
<div class="block">Create a new <code>YUVImage</code> instance backed by a unified image
|
<div class="block">Create a new <code>YUVImage</code> instance backed by a unified buffer,
|
||||||
buffer, and allocate memory for the image buffer.</div>
|
and allocate memory for the buffer.</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@@ -251,8 +253,8 @@ 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 (if this image is stored in a unified
|
<div class="block">Returns the YUV buffer (if this image is stored in a unified buffer rather
|
||||||
buffer rather than separate image planes.)</div>
|
than separate image planes.)</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="rowColor">
|
<tr class="rowColor">
|
||||||
@@ -271,7 +273,7 @@ extends java.lang.Object</pre>
|
|||||||
<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#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 (if this image is
|
<div class="block">Returns the row alignment (in bytes) of the YUV buffer (if this image is
|
||||||
stored in a unified buffer rather than separate image planes.)</div>
|
stored in a unified buffer rather than separate image planes.)</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -284,14 +286,14 @@ extends java.lang.Object</pre>
|
|||||||
<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 (if this image is
|
<div class="block">Returns the size (in bytes) of the YUV buffer (if this image is stored in
|
||||||
stored in a unified buffer rather than separate image planes.)</div>
|
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="colFirst"><code>int[]</code></td>
|
||||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#getStrides()">getStrides</a></strong>()</code>
|
<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>
|
<div class="block">Returns the number of bytes per row of each plane in the YUV image.</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="rowColor">
|
<tr class="rowColor">
|
||||||
@@ -321,10 +323,10 @@ extends java.lang.Object</pre>
|
|||||||
<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[],%20int,%20int,%20int,%20int)">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 align,
|
||||||
int height,
|
int height,
|
||||||
int subsamp)</code>
|
int subsamp)</code>
|
||||||
<div class="block">Assign a unified image buffer to this <code>YUVImage</code> instance.</div>
|
<div class="block">Assign a unified buffer to this <code>YUVImage</code> instance.</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@@ -385,13 +387,13 @@ extends java.lang.Object</pre>
|
|||||||
<pre>protected int[] yuvStrides</pre>
|
<pre>protected int[] yuvStrides</pre>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a name="yuvPad">
|
<a name="yuvAlign">
|
||||||
<!-- -->
|
<!-- -->
|
||||||
</a>
|
</a>
|
||||||
<ul class="blockList">
|
<ul class="blockList">
|
||||||
<li class="blockList">
|
<li class="blockList">
|
||||||
<h4>yuvPad</h4>
|
<h4>yuvAlign</h4>
|
||||||
<pre>protected int yuvPad</pre>
|
<pre>protected int yuvAlign</pre>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a name="yuvWidth">
|
<a name="yuvWidth">
|
||||||
@@ -442,7 +444,7 @@ extends java.lang.Object</pre>
|
|||||||
<div class="block">Create a new <code>YUVImage</code> instance backed by separate image
|
<div class="block">Create a new <code>YUVImage</code> instance backed by separate image
|
||||||
planes, and allocate memory for the image planes.</div>
|
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
|
<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
|
per row 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
|
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
|
<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
|
strides for all planes will be set to their respective plane widths. When
|
||||||
@@ -458,13 +460,15 @@ extends java.lang.Object</pre>
|
|||||||
<li class="blockList">
|
<li class="blockList">
|
||||||
<h4>YUVImage</h4>
|
<h4>YUVImage</h4>
|
||||||
<pre>public YUVImage(int width,
|
<pre>public YUVImage(int width,
|
||||||
int pad,
|
int align,
|
||||||
int height,
|
int height,
|
||||||
int subsamp)</pre>
|
int subsamp)</pre>
|
||||||
<div class="block">Create a new <code>YUVImage</code> instance backed by a unified image
|
<div class="block">Create a new <code>YUVImage</code> instance backed by a unified buffer,
|
||||||
buffer, and allocate memory for the image buffer.</div>
|
and allocate memory for the 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>align</code> - row alignment (in bytes) of the YUV image (must be a power of
|
||||||
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
|
2.) Setting this parameter to n specifies that each row in each plane of
|
||||||
|
the YUV image will be padded to the nearest multiple of n bytes
|
||||||
|
(1 = unpadded.)</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></dl>
|
image (one of <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_444"><code>TJ.SAMP_*</code></a>)</dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -485,18 +489,18 @@ extends java.lang.Object</pre>
|
|||||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>planes</code> - an array of buffers representing the Y, U (Cb), and V (Cr)
|
<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
|
image planes (or just the Y plane, if the image is grayscale.) These
|
||||||
planes can be contiguous or non-contiguous in memory. Plane
|
planes can be contiguous or non-contiguous in memory. Plane
|
||||||
<code>i</code> should be at least <code>offsets[i] +
|
<code>i</code> should be at least <code>offsets[i] + </code>
|
||||||
<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>
|
<a href="../../../org/libjpegturbo/turbojpeg/TJ.html#planeSizeYUV(int,%20int,%20int,%20int,%20int)"><code>TJ.planeSizeYUV</code></a><code>(i, width, strides[i], height, subsamp)</code>
|
||||||
bytes in size.</dd><dd><code>offsets</code> - If this <code>YUVImage</code> instance represents a
|
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
|
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
|
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
|
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
|
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
|
per row 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
|
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
|
<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
|
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
|
can adjust the strides in order to add an arbitrary amount of row padding
|
||||||
to each plane or to specify that this <code>YUVImage</code> instance is a
|
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
|
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
|
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
|
||||||
@@ -511,18 +515,19 @@ extends java.lang.Object</pre>
|
|||||||
<h4>YUVImage</h4>
|
<h4>YUVImage</h4>
|
||||||
<pre>public YUVImage(byte[] yuvImage,
|
<pre>public YUVImage(byte[] yuvImage,
|
||||||
int width,
|
int width,
|
||||||
int pad,
|
int align,
|
||||||
int height,
|
int height,
|
||||||
int subsamp)</pre>
|
int subsamp)</pre>
|
||||||
<div class="block">Create a new <code>YUVImage</code> instance from an existing unified image
|
<div class="block">Create a new <code>YUVImage</code> instance from an existing unified
|
||||||
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> - buffer that contains or will receive a unified planar YUV
|
||||||
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
|
image. 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
|
||||||
this buffer. The Y, U (Cb), and V (Cr) image planes are stored
|
buffer. The Y, U (Cb), and V (Cr) image planes are stored sequentially in
|
||||||
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
|
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
|
||||||
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
|
format.)</dd><dd><code>width</code> - width (in pixels) of the YUV image</dd><dd><code>align</code> - row alignment (in bytes) of the YUV image (must be a power of
|
||||||
instance, if each line in each plane of the buffer is padded to the
|
2.) Setting this parameter to n specifies that each row in each plane of
|
||||||
nearest multiple of 4 bytes, then <code>pad</code> should be set to 4.</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
|
the YUV image will be padded to the nearest multiple of n bytes
|
||||||
|
(1 = unpadded.)</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#SAMP_444"><code>TJ.SAMP_*</code></a>)</dd></dl>
|
image (one of <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_444"><code>TJ.SAMP_*</code></a>)</dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -550,19 +555,19 @@ extends java.lang.Object</pre>
|
|||||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>planes</code> - an array of buffers representing the Y, U (Cb), and V (Cr)
|
<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
|
image planes (or just the Y plane, if the image is grayscale.) These
|
||||||
planes can be contiguous or non-contiguous in memory. Plane
|
planes can be contiguous or non-contiguous in memory. Plane
|
||||||
<code>i</code> should be at least <code>offsets[i] +
|
<code>i</code> should be at least <code>offsets[i] + </code>
|
||||||
<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>
|
<a href="../../../org/libjpegturbo/turbojpeg/TJ.html#planeSizeYUV(int,%20int,%20int,%20int,%20int)"><code>TJ.planeSizeYUV</code></a><code>(i, width, strides[i], height, subsamp)</code>
|
||||||
bytes in size.</dd><dd><code>offsets</code> - If this <code>YUVImage</code> instance represents a
|
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
|
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
|
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
|
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
|
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
|
per row 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
|
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
|
<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
|
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
|
can adjust the strides in order to add an arbitrary amount of row padding
|
||||||
to each plane or to specify that this <code>YUVImage</code> image is a
|
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
|
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
|
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></dl>
|
image (one of <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_444"><code>TJ.SAMP_*</code></a>)</dd></dl>
|
||||||
@@ -576,17 +581,18 @@ extends java.lang.Object</pre>
|
|||||||
<h4>setBuf</h4>
|
<h4>setBuf</h4>
|
||||||
<pre>public void setBuf(byte[] yuvImage,
|
<pre>public void setBuf(byte[] yuvImage,
|
||||||
int width,
|
int width,
|
||||||
int pad,
|
int align,
|
||||||
int height,
|
int height,
|
||||||
int subsamp)</pre>
|
int subsamp)</pre>
|
||||||
<div class="block">Assign a unified image buffer to this <code>YUVImage</code> instance.</div>
|
<div class="block">Assign a unified buffer to this <code>YUVImage</code> 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> - buffer that contains or will receive a unified planar YUV
|
||||||
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
|
image. 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
|
||||||
this buffer. The Y, U (Cb), and V (Cr) image planes are stored
|
buffer. The Y, U (Cb), and V (Cr) image planes are stored sequentially in
|
||||||
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
|
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
|
||||||
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
|
format.)</dd><dd><code>width</code> - width (in pixels) of the YUV image</dd><dd><code>align</code> - row alignment (in bytes) of the YUV image (must be a power of
|
||||||
instance, if each line in each plane of the buffer is padded to the
|
2.) Setting this parameter to n specifies that each row in each plane of
|
||||||
nearest multiple of 4 bytes, then <code>pad</code> should be set to 4.</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
|
the YUV image will be padded to the nearest multiple of n bytes
|
||||||
|
(1 = unpadded.)</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#SAMP_444"><code>TJ.SAMP_*</code></a>)</dd></dl>
|
image (one of <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_444"><code>TJ.SAMP_*</code></a>)</dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -619,9 +625,9 @@ extends java.lang.Object</pre>
|
|||||||
<li class="blockList">
|
<li class="blockList">
|
||||||
<h4>getPad</h4>
|
<h4>getPad</h4>
|
||||||
<pre>public int getPad()</pre>
|
<pre>public int getPad()</pre>
|
||||||
<div class="block">Returns the line padding used in the YUV image buffer (if this image is
|
<div class="block">Returns the row alignment (in bytes) of the YUV buffer (if this image is
|
||||||
stored in a unified buffer rather than separate image planes.)</div>
|
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>
|
<dl><dt><span class="strong">Returns:</span></dt><dd>the row alignment of the YUV buffer</dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a name="getStrides()">
|
<a name="getStrides()">
|
||||||
@@ -631,8 +637,8 @@ extends java.lang.Object</pre>
|
|||||||
<li class="blockList">
|
<li class="blockList">
|
||||||
<h4>getStrides</h4>
|
<h4>getStrides</h4>
|
||||||
<pre>public int[] getStrides()</pre>
|
<pre>public int[] getStrides()</pre>
|
||||||
<div class="block">Returns the number of bytes per line of each plane in the YUV image.</div>
|
<div class="block">Returns the number of bytes per row 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></dl>
|
<dl><dt><span class="strong">Returns:</span></dt><dd>the number of bytes per row of each plane in the YUV image</dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a name="getOffsets()">
|
<a name="getOffsets()">
|
||||||
@@ -679,9 +685,9 @@ extends java.lang.Object</pre>
|
|||||||
<li class="blockList">
|
<li class="blockList">
|
||||||
<h4>getBuf</h4>
|
<h4>getBuf</h4>
|
||||||
<pre>public byte[] getBuf()</pre>
|
<pre>public byte[] getBuf()</pre>
|
||||||
<div class="block">Returns the YUV image buffer (if this image is stored in a unified
|
<div class="block">Returns the YUV buffer (if this image is stored in a unified buffer rather
|
||||||
buffer rather than separate image planes.)</div>
|
than separate image planes.)</div>
|
||||||
<dl><dt><span class="strong">Returns:</span></dt><dd>the YUV image buffer</dd></dl>
|
<dl><dt><span class="strong">Returns:</span></dt><dd>the YUV buffer</dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a name="getSize()">
|
<a name="getSize()">
|
||||||
@@ -691,9 +697,9 @@ extends java.lang.Object</pre>
|
|||||||
<li class="blockList">
|
<li class="blockList">
|
||||||
<h4>getSize</h4>
|
<h4>getSize</h4>
|
||||||
<pre>public int getSize()</pre>
|
<pre>public int getSize()</pre>
|
||||||
<div class="block">Returns the size (in bytes) of the YUV image buffer (if this image is
|
<div class="block">Returns the size (in bytes) of the YUV buffer (if this image is stored in
|
||||||
stored in a unified buffer rather than separate image planes.)</div>
|
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>
|
<dl><dt><span class="strong">Returns:</span></dt><dd>the size (in bytes) of the YUV buffer</dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@@ -131,7 +131,7 @@
|
|||||||
<tr class="altColor">
|
<tr class="altColor">
|
||||||
<td class="colFirst"><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a></td>
|
<td class="colFirst"><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a></td>
|
||||||
<td class="colLast">
|
<td class="colLast">
|
||||||
<div class="block">This class encapsulates a YUV planar image and the metadata
|
<div class="block">This class encapsulates a planar YUV image and the metadata
|
||||||
associated with it.</div>
|
associated with it.</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -109,12 +109,13 @@
|
|||||||
<li class="blockList">
|
<li class="blockList">
|
||||||
<h4>op</h4>
|
<h4>op</h4>
|
||||||
<pre>int op</pre>
|
<pre>int op</pre>
|
||||||
<div class="block">Transform operation (one of <code>OP_*</code>)</div>
|
<div class="block">Transform operation (one of <a href="org/libjpegturbo/turbojpeg/TJTransform.html#OP_NONE"><code>OP_*</code></a>)</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="blockList">
|
<li class="blockList">
|
||||||
<h4>options</h4>
|
<h4>options</h4>
|
||||||
<pre>int options</pre>
|
<pre>int options</pre>
|
||||||
<div class="block">Transform options (bitwise OR of one or more of <code>OPT_*</code>)</div>
|
<div class="block">Transform options (bitwise OR of one or more of
|
||||||
|
<a href="org/libjpegturbo/turbojpeg/TJTransform.html#OPT_PERFECT"><code>OPT_*</code></a>)</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="blockListLast">
|
<li class="blockListLast">
|
||||||
<h4>cf</h4>
|
<h4>cf</h4>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C)2011-2013, 2017-2018, 2020-2021 D. R. Commander.
|
* Copyright (C)2011-2013, 2017-2018, 2020-2021, 2023 D. R. Commander.
|
||||||
* All Rights Reserved.
|
* All Rights Reserved.
|
||||||
* Copyright (C)2015 Viktor Szathmáry. All Rights Reserved.
|
* Copyright (C)2015 Viktor Szathmáry. All Rights Reserved.
|
||||||
*
|
*
|
||||||
@@ -85,7 +85,7 @@ public final class TJ {
|
|||||||
* subsampling.
|
* subsampling.
|
||||||
*
|
*
|
||||||
* @param subsamp the level of chrominance subsampling (one of
|
* @param subsamp the level of chrominance subsampling (one of
|
||||||
* <code>SAMP_*</code>)
|
* {@link #SAMP_444 SAMP_*})
|
||||||
*
|
*
|
||||||
* @return the MCU block width for the given level of chrominance
|
* @return the MCU block width for the given level of chrominance
|
||||||
* subsampling.
|
* subsampling.
|
||||||
@@ -105,7 +105,7 @@ public final class TJ {
|
|||||||
* subsampling.
|
* subsampling.
|
||||||
*
|
*
|
||||||
* @param subsamp the level of chrominance subsampling (one of
|
* @param subsamp the level of chrominance subsampling (one of
|
||||||
* <code>SAMP_*</code>)
|
* {@link #SAMP_444 SAMP_*})
|
||||||
*
|
*
|
||||||
* @return the MCU block height for the given level of chrominance
|
* @return the MCU block height for the given level of chrominance
|
||||||
* subsampling.
|
* subsampling.
|
||||||
@@ -205,8 +205,8 @@ public final class TJ {
|
|||||||
* vice versa, but the mapping is typically not 1:1 or reversible, nor can it
|
* vice versa, but the mapping is typically not 1:1 or reversible, nor can it
|
||||||
* be defined with a simple formula. Thus, such a conversion is out of scope
|
* be defined with a simple formula. Thus, such a conversion is out of scope
|
||||||
* for a codec library. However, the TurboJPEG API allows for compressing
|
* for a codec library. However, the TurboJPEG API allows for compressing
|
||||||
* CMYK pixels into a YCCK JPEG image (see {@link #CS_YCCK}) and
|
* packed-pixel CMYK images into YCCK JPEG images (see {@link #CS_YCCK}) and
|
||||||
* decompressing YCCK JPEG images into CMYK pixels.
|
* decompressing YCCK JPEG images into packed-pixel CMYK images.
|
||||||
*/
|
*/
|
||||||
public static final int PF_CMYK = 11;
|
public static final int PF_CMYK = 11;
|
||||||
|
|
||||||
@@ -214,7 +214,7 @@ public final class TJ {
|
|||||||
/**
|
/**
|
||||||
* Returns the pixel size (in bytes) for the given pixel format.
|
* Returns the pixel size (in bytes) for the given pixel format.
|
||||||
*
|
*
|
||||||
* @param pixelFormat the pixel format (one of <code>PF_*</code>)
|
* @param pixelFormat the pixel format (one of {@link #PF_RGB PF_*})
|
||||||
*
|
*
|
||||||
* @return the pixel size (in bytes) for the given pixel format.
|
* @return the pixel size (in bytes) for the given pixel format.
|
||||||
*/
|
*/
|
||||||
@@ -235,7 +235,7 @@ public final class TJ {
|
|||||||
* then the red component will be
|
* then the red component will be
|
||||||
* <code>pixel[TJ.getRedOffset(TJ.PF_BGRX)]</code>.
|
* <code>pixel[TJ.getRedOffset(TJ.PF_BGRX)]</code>.
|
||||||
*
|
*
|
||||||
* @param pixelFormat the pixel format (one of <code>PF_*</code>)
|
* @param pixelFormat the pixel format (one of {@link #PF_RGB PF_*})
|
||||||
*
|
*
|
||||||
* @return the red offset for the given pixel format, or -1 if the pixel
|
* @return the red offset for the given pixel format, or -1 if the pixel
|
||||||
* format does not have a red component.
|
* format does not have a red component.
|
||||||
@@ -257,7 +257,7 @@ public final class TJ {
|
|||||||
* then the green component will be
|
* then the green component will be
|
||||||
* <code>pixel[TJ.getGreenOffset(TJ.PF_BGRX)]</code>.
|
* <code>pixel[TJ.getGreenOffset(TJ.PF_BGRX)]</code>.
|
||||||
*
|
*
|
||||||
* @param pixelFormat the pixel format (one of <code>PF_*</code>)
|
* @param pixelFormat the pixel format (one of {@link #PF_RGB PF_*})
|
||||||
*
|
*
|
||||||
* @return the green offset for the given pixel format, or -1 if the pixel
|
* @return the green offset for the given pixel format, or -1 if the pixel
|
||||||
* format does not have a green component.
|
* format does not have a green component.
|
||||||
@@ -279,7 +279,7 @@ public final class TJ {
|
|||||||
* then the blue component will be
|
* then the blue component will be
|
||||||
* <code>pixel[TJ.getBlueOffset(TJ.PF_BGRX)]</code>.
|
* <code>pixel[TJ.getBlueOffset(TJ.PF_BGRX)]</code>.
|
||||||
*
|
*
|
||||||
* @param pixelFormat the pixel format (one of <code>PF_*</code>)
|
* @param pixelFormat the pixel format (one of {@link #PF_RGB PF_*})
|
||||||
*
|
*
|
||||||
* @return the blue offset for the given pixel format, or -1 if the pixel
|
* @return the blue offset for the given pixel format, or -1 if the pixel
|
||||||
* format does not have a blue component.
|
* format does not have a blue component.
|
||||||
@@ -301,7 +301,7 @@ public final class TJ {
|
|||||||
* then the alpha component will be
|
* then the alpha component will be
|
||||||
* <code>pixel[TJ.getAlphaOffset(TJ.PF_BGRA)]</code>.
|
* <code>pixel[TJ.getAlphaOffset(TJ.PF_BGRA)]</code>.
|
||||||
*
|
*
|
||||||
* @param pixelFormat the pixel format (one of <code>PF_*</code>)
|
* @param pixelFormat the pixel format (one of {@link #PF_RGB PF_*})
|
||||||
*
|
*
|
||||||
* @return the alpha offset for the given pixel format, or -1 if the pixel
|
* @return the alpha offset for the given pixel format, or -1 if the pixel
|
||||||
* format does not have a alpha component.
|
* format does not have a alpha component.
|
||||||
@@ -324,8 +324,9 @@ public final class TJ {
|
|||||||
* RGB colorspace. When compressing the JPEG image, the R, G, and B
|
* RGB colorspace. When compressing the JPEG image, the R, G, and B
|
||||||
* components in the source image are reordered into image planes, but no
|
* components in the source image are reordered into image planes, but no
|
||||||
* colorspace conversion or subsampling is performed. RGB JPEG images can be
|
* colorspace conversion or subsampling is performed. RGB JPEG images can be
|
||||||
* decompressed to any of the extended RGB pixel formats or grayscale, but
|
* decompressed to packed-pixel images with any of the extended RGB or
|
||||||
* they cannot be decompressed to YUV images.
|
* grayscale pixel formats, but they cannot be decompressed to planar YUV
|
||||||
|
* images.
|
||||||
*/
|
*/
|
||||||
public static final int CS_RGB = 0;
|
public static final int CS_RGB = 0;
|
||||||
/**
|
/**
|
||||||
@@ -339,26 +340,28 @@ public final class TJ {
|
|||||||
* transformation allowed the same signal to drive both black & white and
|
* transformation allowed the same signal to drive both black & white and
|
||||||
* color televisions, but JPEG images use YCbCr primarily because it allows
|
* color televisions, but JPEG images use YCbCr primarily because it allows
|
||||||
* the color data to be optionally subsampled for the purposes of reducing
|
* the color data to be optionally subsampled for the purposes of reducing
|
||||||
* bandwidth or disk space. YCbCr is the most common JPEG colorspace, and
|
* network or disk usage. YCbCr is the most common JPEG colorspace, and
|
||||||
* YCbCr JPEG images can be compressed from and decompressed to any of the
|
* YCbCr JPEG images can be compressed from and decompressed to packed-pixel
|
||||||
* extended RGB pixel formats or grayscale, or they can be decompressed to
|
* images with any of the extended RGB or grayscale pixel formats. YCbCr
|
||||||
* YUV planar images.
|
* JPEG images can also be compressed from and decompressed to planar YUV
|
||||||
|
* images.
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("checkstyle:ConstantName")
|
@SuppressWarnings("checkstyle:ConstantName")
|
||||||
public static final int CS_YCbCr = 1;
|
public static final int CS_YCbCr = 1;
|
||||||
/**
|
/**
|
||||||
* Grayscale colorspace. The JPEG image retains only the luminance data (Y
|
* Grayscale colorspace. The JPEG image retains only the luminance data (Y
|
||||||
* component), and any color data from the source image is discarded.
|
* component), and any color data from the source image is discarded.
|
||||||
* Grayscale JPEG images can be compressed from and decompressed to any of
|
* Grayscale JPEG images can be compressed from and decompressed to
|
||||||
* the extended RGB pixel formats or grayscale, or they can be decompressed
|
* packed-pixel images with any of the extended RGB or grayscale pixel
|
||||||
* to YUV planar images.
|
* formats, or they can be compressed from and decompressed to planar YUV
|
||||||
|
* images.
|
||||||
*/
|
*/
|
||||||
public static final int CS_GRAY = 2;
|
public static final int CS_GRAY = 2;
|
||||||
/**
|
/**
|
||||||
* CMYK colorspace. When compressing the JPEG image, the C, M, Y, and K
|
* CMYK colorspace. When compressing the JPEG image, the C, M, Y, and K
|
||||||
* components in the source image are reordered into image planes, but no
|
* components in the source image are reordered into image planes, but no
|
||||||
* colorspace conversion or subsampling is performed. CMYK JPEG images can
|
* colorspace conversion or subsampling is performed. CMYK JPEG images can
|
||||||
* only be decompressed to CMYK pixels.
|
* only be decompressed to packed-pixel images with the CMYK pixel format.
|
||||||
*/
|
*/
|
||||||
public static final int CS_CMYK = 3;
|
public static final int CS_CMYK = 3;
|
||||||
/**
|
/**
|
||||||
@@ -368,14 +371,14 @@ public final class TJ {
|
|||||||
* reversibly transformed into YCCK, and as with YCbCr, the chrominance
|
* reversibly transformed into YCCK, and as with YCbCr, the chrominance
|
||||||
* components in the YCCK pixels can be subsampled without incurring major
|
* components in the YCCK pixels can be subsampled without incurring major
|
||||||
* perceptual loss. YCCK JPEG images can only be compressed from and
|
* perceptual loss. YCCK JPEG images can only be compressed from and
|
||||||
* decompressed to CMYK pixels.
|
* decompressed to packed-pixel images with the CMYK pixel format.
|
||||||
*/
|
*/
|
||||||
public static final int CS_YCCK = 4;
|
public static final int CS_YCCK = 4;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The uncompressed source/destination image is stored in bottom-up (Windows,
|
* Rows in the packed-pixel source/destination image are stored in bottom-up
|
||||||
* OpenGL) order, not top-down (X11) order.
|
* (Windows, OpenGL) order rather than in top-down (X11) order.
|
||||||
*/
|
*/
|
||||||
public static final int FLAG_BOTTOMUP = 2;
|
public static final int FLAG_BOTTOMUP = 2;
|
||||||
|
|
||||||
@@ -394,41 +397,39 @@ public final class TJ {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* When decompressing an image that was compressed using chrominance
|
* When decompressing an image that was compressed using chrominance
|
||||||
* subsampling, use the fastest chrominance upsampling algorithm available in
|
* subsampling, use the fastest chrominance upsampling algorithm available.
|
||||||
* the underlying codec. The default is to use smooth upsampling, which
|
* The default is to use smooth upsampling, which creates a smooth transition
|
||||||
* creates a smooth transition between neighboring chrominance components in
|
* between neighboring chrominance components in order to reduce upsampling
|
||||||
* order to reduce upsampling artifacts in the decompressed image.
|
* artifacts in the decompressed image.
|
||||||
*/
|
*/
|
||||||
public static final int FLAG_FASTUPSAMPLE = 256;
|
public static final int FLAG_FASTUPSAMPLE = 256;
|
||||||
/**
|
/**
|
||||||
* Use the fastest DCT/IDCT algorithm available in the underlying codec. The
|
* Use the fastest DCT/IDCT algorithm available. The default if this flag is
|
||||||
* default if this flag is not specified is implementation-specific. For
|
* not specified is implementation-specific. For example, the implementation
|
||||||
* example, the implementation of TurboJPEG for libjpeg[-turbo] uses the fast
|
* of the TurboJPEG API in libjpeg-turbo uses the fast algorithm by default
|
||||||
|
* when compressing, because this has been shown to have only a very slight
|
||||||
|
* effect on accuracy, but it uses the accurate algorithm when decompressing,
|
||||||
|
* because this has been shown to have a larger effect.
|
||||||
|
*/
|
||||||
|
public static final int FLAG_FASTDCT = 2048;
|
||||||
|
/**
|
||||||
|
* Use the most accurate DCT/IDCT algorithm available. The default if this
|
||||||
|
* flag is not specified is implementation-specific. For example, the
|
||||||
|
* implementation of the TurboJPEG API in libjpeg-turbo uses the fast
|
||||||
* algorithm by default when compressing, because this has been shown to have
|
* algorithm by default when compressing, because this has been shown to have
|
||||||
* only a very slight effect on accuracy, but it uses the accurate algorithm
|
* only a very slight effect on accuracy, but it uses the accurate algorithm
|
||||||
* when decompressing, because this has been shown to have a larger effect.
|
* when decompressing, because this has been shown to have a larger effect.
|
||||||
*/
|
*/
|
||||||
public static final int FLAG_FASTDCT = 2048;
|
|
||||||
/**
|
|
||||||
* Use the most accurate DCT/IDCT algorithm available in the underlying
|
|
||||||
* codec. The default if this flag is not specified is
|
|
||||||
* implementation-specific. For example, the implementation of TurboJPEG for
|
|
||||||
* libjpeg[-turbo] uses the fast algorithm by default when compressing,
|
|
||||||
* because this has been shown to have only a very slight effect on accuracy,
|
|
||||||
* but it uses the accurate algorithm when decompressing, because this has
|
|
||||||
* been shown to have a larger effect.
|
|
||||||
*/
|
|
||||||
public static final int FLAG_ACCURATEDCT = 4096;
|
public static final int FLAG_ACCURATEDCT = 4096;
|
||||||
/**
|
/**
|
||||||
* Immediately discontinue the current compression/decompression/transform
|
* Immediately discontinue the current compression/decompression/transform
|
||||||
* operation if the underlying codec throws a warning (non-fatal error). The
|
* operation if a warning (non-fatal error) occurs. The default behavior is
|
||||||
* default behavior is to allow the operation to complete unless a fatal
|
* to allow the operation to complete unless a fatal error is encountered.
|
||||||
* error is encountered.
|
|
||||||
* <p>
|
* <p>
|
||||||
* NOTE: due to the design of the TurboJPEG Java API, only certain methods
|
* NOTE: due to the design of the TurboJPEG Java API, only certain methods
|
||||||
* (specifically, {@link TJDecompressor TJDecompressor.decompress*()} methods
|
* (specifically, {@link TJDecompressor TJDecompressor.decompress*()} methods
|
||||||
* with a void return type) will complete and leave the output image in a
|
* with a void return type) will complete and leave the destination image in
|
||||||
* fully recoverable state after a non-fatal error occurs.
|
* a fully recoverable state after a non-fatal error occurs.
|
||||||
*/
|
*/
|
||||||
public static final int FLAG_STOPONWARNING = 8192;
|
public static final int FLAG_STOPONWARNING = 8192;
|
||||||
/**
|
/**
|
||||||
@@ -455,13 +456,13 @@ public final class TJ {
|
|||||||
*/
|
*/
|
||||||
public static final int NUMERR = 2;
|
public static final int NUMERR = 2;
|
||||||
/**
|
/**
|
||||||
* The error was non-fatal and recoverable, but the image may still be
|
* The error was non-fatal and recoverable, but the destination image may
|
||||||
* corrupt.
|
* still be corrupt.
|
||||||
* <p>
|
* <p>
|
||||||
* NOTE: due to the design of the TurboJPEG Java API, only certain methods
|
* NOTE: due to the design of the TurboJPEG Java API, only certain methods
|
||||||
* (specifically, {@link TJDecompressor TJDecompressor.decompress*()} methods
|
* (specifically, {@link TJDecompressor TJDecompressor.decompress*()} methods
|
||||||
* with a void return type) will complete and leave the output image in a
|
* with a void return type) will complete and leave the destination image in
|
||||||
* fully recoverable state after a non-fatal error occurs.
|
* a fully recoverable state after a non-fatal error occurs.
|
||||||
*/
|
*/
|
||||||
public static final int ERR_WARNING = 0;
|
public static final int ERR_WARNING = 0;
|
||||||
/**
|
/**
|
||||||
@@ -479,7 +480,7 @@ public final class TJ {
|
|||||||
* @param height the height (in pixels) of the JPEG image
|
* @param height the height (in pixels) of the JPEG 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 (one of {@link TJ TJ.SAMP_*})
|
* generating the JPEG image (one of {@link #SAMP_444 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.
|
||||||
@@ -487,23 +488,27 @@ public final class TJ {
|
|||||||
public static native int bufSize(int width, int height, int jpegSubsamp);
|
public static native int bufSize(int width, int height, int jpegSubsamp);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the size of the buffer (in bytes) required to hold a YUV planar
|
* Returns the size of the buffer (in bytes) required to hold a unified
|
||||||
* image with the given width, height, and level of chrominance subsampling.
|
* planar YUV image with the given width, height, and level of chrominance
|
||||||
|
* subsampling.
|
||||||
*
|
*
|
||||||
* @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 align row alignment (in bytes) of the YUV image (must be a power of
|
||||||
* the nearest multiple of this number of bytes (must be a power of 2.)
|
* 2.) Setting this parameter to n specifies that each row in each plane of
|
||||||
|
* the YUV image will be padded to the nearest multiple of n bytes
|
||||||
|
* (1 = unpadded.)
|
||||||
*
|
*
|
||||||
* @param height the height (in pixels) of the YUV image
|
* @param height the height (in pixels) of the YUV image
|
||||||
*
|
*
|
||||||
* @param subsamp the level of chrominance subsampling used in the YUV
|
* @param subsamp the level of chrominance subsampling used in the YUV
|
||||||
* image (one of {@link TJ TJ.SAMP_*})
|
* image (one of {@link #SAMP_444 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 unified
|
||||||
* image with the given width, height, and level of chrominance subsampling.
|
* planar YUV 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 align, int height,
|
||||||
int subsamp);
|
int subsamp);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -523,16 +528,16 @@ public final class TJ {
|
|||||||
* @param width width (in pixels) of the YUV image. NOTE: this is the width
|
* @param width width (in pixels) of the YUV image. NOTE: this is the width
|
||||||
* of the whole image, not the plane width.
|
* of the whole image, not the plane width.
|
||||||
*
|
*
|
||||||
* @param stride bytes per line in the image plane.
|
* @param stride bytes per row in the image plane.
|
||||||
*
|
*
|
||||||
* @param height height (in pixels) of the YUV image. NOTE: this is the
|
* @param height height (in pixels) of the YUV image. NOTE: this is the
|
||||||
* height of the whole image, not the plane height.
|
* height of the whole image, not the plane height.
|
||||||
*
|
*
|
||||||
* @param subsamp the level of chrominance subsampling used in the YUV
|
* @param subsamp the level of chrominance subsampling used in the YUV
|
||||||
* image (one of {@link TJ TJ.SAMP_*})
|
* image (one of {@link #SAMP_444 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 image
|
||||||
* image with the given parameters.
|
* plane with the given parameters.
|
||||||
*/
|
*/
|
||||||
public static native int planeSizeYUV(int componentID, int width, int stride,
|
public static native int planeSizeYUV(int componentID, int width, int stride,
|
||||||
int height, int subsamp);
|
int height, int subsamp);
|
||||||
@@ -547,7 +552,7 @@ public final class TJ {
|
|||||||
* @param width width (in pixels) of the YUV image
|
* @param width width (in pixels) of the YUV image
|
||||||
*
|
*
|
||||||
* @param subsamp the level of chrominance subsampling used in the YUV image
|
* @param subsamp the level of chrominance subsampling used in the YUV image
|
||||||
* (one of {@link TJ TJ.SAMP_*})
|
* (one of {@link #SAMP_444 TJ.SAMP_*})
|
||||||
*
|
*
|
||||||
* @return the plane width of a YUV image plane with the given parameters.
|
* @return the plane width of a YUV image plane with the given parameters.
|
||||||
*/
|
*/
|
||||||
@@ -563,7 +568,7 @@ public final class TJ {
|
|||||||
* @param height height (in pixels) of the YUV image
|
* @param height height (in pixels) of the YUV image
|
||||||
*
|
*
|
||||||
* @param subsamp the level of chrominance subsampling used in the YUV image
|
* @param subsamp the level of chrominance subsampling used in the YUV image
|
||||||
* (one of {@link TJ TJ.SAMP_*})
|
* (one of {@link #SAMP_444 TJ.SAMP_*})
|
||||||
*
|
*
|
||||||
* @return the plane height of a YUV image plane with the given parameters.
|
* @return the plane height of a YUV image plane with the given parameters.
|
||||||
*/
|
*/
|
||||||
@@ -571,11 +576,11 @@ public final class TJ {
|
|||||||
int subsamp);
|
int subsamp);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a list of fractional scaling factors that the JPEG decompressor in
|
* Returns a list of fractional scaling factors that the JPEG decompressor
|
||||||
* this implementation of TurboJPEG supports.
|
* supports.
|
||||||
*
|
*
|
||||||
* @return a list of fractional scaling factors that the JPEG decompressor in
|
* @return a list of fractional scaling factors that the JPEG decompressor
|
||||||
* this implementation of TurboJPEG supports.
|
* supports.
|
||||||
*/
|
*/
|
||||||
public static native TJScalingFactor[] getScalingFactors();
|
public static native TJScalingFactor[] getScalingFactors();
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C)2011-2015, 2018, 2020 D. R. Commander. All Rights Reserved.
|
* Copyright (C)2011-2015, 2018, 2020, 2023 D. R. Commander.
|
||||||
|
* All Rights Reserved.
|
||||||
* Copyright (C)2015 Viktor Szathmáry. All Rights Reserved.
|
* Copyright (C)2015 Viktor Szathmáry. All Rights Reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@@ -49,7 +50,7 @@ public class TJCompressor implements Closeable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a TurboJPEG compressor instance and associate the uncompressed
|
* Create a TurboJPEG compressor instance and associate the packed-pixel
|
||||||
* source image stored in <code>srcImage</code> with the newly created
|
* source image stored in <code>srcImage</code> with the newly created
|
||||||
* instance.
|
* instance.
|
||||||
*
|
*
|
||||||
@@ -85,7 +86,7 @@ public class TJCompressor implements Closeable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a TurboJPEG compressor instance and associate the uncompressed
|
* Create a TurboJPEG compressor instance and associate the packed-pixel
|
||||||
* source image stored in <code>srcImage</code> with the newly created
|
* source image stored in <code>srcImage</code> with the newly created
|
||||||
* instance.
|
* instance.
|
||||||
*
|
*
|
||||||
@@ -110,11 +111,11 @@ public class TJCompressor implements Closeable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Associate an uncompressed RGB, grayscale, or CMYK source image with this
|
* Associate a packed-pixel RGB, grayscale, or CMYK source image with this
|
||||||
* compressor instance.
|
* compressor instance.
|
||||||
*
|
*
|
||||||
* @param srcImage image buffer containing RGB, grayscale, or CMYK pixels to
|
* @param srcImage buffer containing a packed-pixel RGB, grayscale, or CMYK
|
||||||
* be compressed or encoded. This buffer is not modified.
|
* source image to be compressed or encoded. This buffer is not modified.
|
||||||
*
|
*
|
||||||
* @param x x offset (in pixels) of the region in the source image from which
|
* @param x x offset (in pixels) of the region in the source image from which
|
||||||
* the JPEG or YUV image should be compressed/encoded
|
* the JPEG or YUV image should be compressed/encoded
|
||||||
@@ -125,13 +126,13 @@ public class TJCompressor implements Closeable {
|
|||||||
* @param width width (in pixels) of the region in the source image from
|
* @param width width (in pixels) of the region in the source image from
|
||||||
* which the JPEG or YUV image should be compressed/encoded
|
* which the JPEG or YUV image should be compressed/encoded
|
||||||
*
|
*
|
||||||
* @param pitch bytes per line of the source image. Normally, this should be
|
* @param pitch bytes per row in the source image. Normally this should be
|
||||||
* <code>width * TJ.pixelSize(pixelFormat)</code> if the source image is
|
* <code>width * TJ.pixelSize(pixelFormat)</code>, if the source image is
|
||||||
* unpadded, but you can use this parameter to, for instance, specify that
|
* unpadded. However, you can use this parameter to, for instance, specify
|
||||||
* the scanlines in the source image are padded to a 4-byte boundary or to
|
* that the rows in the source image are padded to the nearest multiple of 4
|
||||||
* compress/encode a JPEG or YUV image from a region of a larger source
|
* bytes or to compress/encode a JPEG or YUV image from a region of a larger
|
||||||
* image. You can also be clever and use this parameter to skip lines, etc.
|
* source image. You can also be clever and use this parameter to skip rows,
|
||||||
* Setting this parameter to 0 is the equivalent of setting it to
|
* etc. Setting this parameter to 0 is the equivalent of setting it to
|
||||||
* <code>width * TJ.pixelSize(pixelFormat)</code>.
|
* <code>width * TJ.pixelSize(pixelFormat)</code>.
|
||||||
*
|
*
|
||||||
* @param height height (in pixels) of the region in the source image from
|
* @param height height (in pixels) of the region in the source image from
|
||||||
@@ -174,11 +175,12 @@ public class TJCompressor implements Closeable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Associate an uncompressed RGB or grayscale source image with this
|
* Associate a packed-pixel RGB or grayscale source image with this
|
||||||
* compressor instance.
|
* compressor instance.
|
||||||
*
|
*
|
||||||
* @param srcImage a <code>BufferedImage</code> instance containing RGB or
|
* @param srcImage a <code>BufferedImage</code> instance containing a
|
||||||
* grayscale pixels to be compressed or encoded. This image is not modified.
|
* packed-pixel RGB or grayscale source image to be compressed or encoded.
|
||||||
|
* This image is not modified.
|
||||||
*
|
*
|
||||||
* @param x x offset (in pixels) of the region in the source image from which
|
* @param x x offset (in pixels) of the region in the source image from which
|
||||||
* the JPEG or YUV image should be compressed/encoded
|
* the JPEG or YUV image should be compressed/encoded
|
||||||
@@ -260,11 +262,10 @@ public class TJCompressor implements Closeable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Associate an uncompressed YUV planar source image with this compressor
|
* Associate a planar YUV source image with this compressor instance.
|
||||||
* instance.
|
|
||||||
*
|
*
|
||||||
* @param srcImage YUV planar image to be compressed. This image is not
|
* @param srcImage planar YUV source image to be compressed. This image is
|
||||||
* modified.
|
* not modified.
|
||||||
*/
|
*/
|
||||||
public void setSourceImage(YUVImage srcImage) throws TJException {
|
public void setSourceImage(YUVImage srcImage) throws TJException {
|
||||||
if (handle == 0) init();
|
if (handle == 0) init();
|
||||||
@@ -281,16 +282,16 @@ public class TJCompressor implements Closeable {
|
|||||||
* {@link TJ#CS_YCbCr}) or from CMYK to YCCK (see {@link TJ#CS_YCCK}) as part
|
* {@link TJ#CS_YCbCr}) or from CMYK to YCCK (see {@link TJ#CS_YCCK}) as part
|
||||||
* of the JPEG compression process, some of the Cb and Cr (chrominance)
|
* of the JPEG compression process, some of the Cb and Cr (chrominance)
|
||||||
* components can be discarded or averaged together to produce a smaller
|
* components can be discarded or averaged together to produce a smaller
|
||||||
* image with little perceptible loss of image clarity (the human eye is more
|
* image with little perceptible loss of image clarity. (The human eye is
|
||||||
* sensitive to small changes in brightness than to small changes in color.)
|
* more sensitive to small changes in brightness than to small changes in
|
||||||
* This is called "chrominance subsampling".
|
* color.) This is called "chrominance subsampling".
|
||||||
* <p>
|
* <p>
|
||||||
* NOTE: This method has no effect when compressing a JPEG image from a YUV
|
* NOTE: This method has no effect when compressing a JPEG image from a
|
||||||
* planar source. In that case, the level of chrominance subsampling in
|
* planar YUV source image. In that case, the level of chrominance
|
||||||
* the JPEG image is determined by the source. Furthermore, this method has
|
* subsampling in the JPEG image is determined by the source image.
|
||||||
* no effect when encoding to a pre-allocated {@link YUVImage} instance. In
|
* Furthermore, this method has no effect when encoding to a pre-allocated
|
||||||
* that case, the level of chrominance subsampling is determined by the
|
* {@link YUVImage} instance. In that case, the level of chrominance
|
||||||
* destination.
|
* subsampling is determined by the destination image.
|
||||||
*
|
*
|
||||||
* @param newSubsamp the level of chrominance subsampling to use in
|
* @param newSubsamp the level of chrominance subsampling to use in
|
||||||
* subsequent compress/encode oeprations (one of
|
* subsequent compress/encode oeprations (one of
|
||||||
@@ -315,8 +316,9 @@ public class TJCompressor implements Closeable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Compress the uncompressed source image associated with this compressor
|
* Compress the packed-pixel or planar YUV source image associated with this
|
||||||
* instance and output a JPEG image to the given destination buffer.
|
* compressor instance and output a JPEG image to the given destination
|
||||||
|
* buffer.
|
||||||
*
|
*
|
||||||
* @param dstBuf buffer that will receive the JPEG image. Use
|
* @param dstBuf buffer that will receive the JPEG image. Use
|
||||||
* {@link TJ#bufSize} to determine the maximum size for this buffer based on
|
* {@link TJ#bufSize} to determine the maximum size for this buffer based on
|
||||||
@@ -366,8 +368,8 @@ public class TJCompressor implements Closeable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Compress the uncompressed source image associated with this compressor
|
* Compress the packed-pixel or planar YUV source image associated with this
|
||||||
* instance and return a buffer containing a JPEG image.
|
* compressor instance and return a buffer containing a JPEG image.
|
||||||
*
|
*
|
||||||
* @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_*}
|
||||||
@@ -417,14 +419,14 @@ public class TJCompressor implements Closeable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Encode the uncompressed source image associated with this compressor
|
* Encode the packed-pixel source image associated with this compressor
|
||||||
* instance into a YUV planar image and store it in the given
|
* instance into a planar YUV image and store it in the given
|
||||||
* <code>YUVImage</code> instance. This method uses the accelerated color
|
* {@link YUVImage} instance. This method performs color conversion (which
|
||||||
* conversion routines in TurboJPEG's underlying codec but does not execute
|
* is accelerated in the libjpeg-turbo implementation) but does not execute
|
||||||
* any of the other steps in the JPEG compression process. Encoding
|
* any of the other steps in the JPEG compression process. Encoding CMYK
|
||||||
* CMYK source images to YUV is not supported.
|
* source images into YUV images is not supported.
|
||||||
*
|
*
|
||||||
* @param dstImage {@link YUVImage} instance that will receive the YUV planar
|
* @param dstImage {@link YUVImage} instance that will receive the planar YUV
|
||||||
* image
|
* image
|
||||||
*
|
*
|
||||||
* @param flags the bitwise OR of one or more of
|
* @param flags the bitwise OR of one or more of
|
||||||
@@ -469,52 +471,54 @@ public class TJCompressor implements Closeable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Encode the uncompressed source image associated with this compressor
|
* Encode the packed-pixel source image associated with this compressor
|
||||||
* instance into a unified YUV planar image buffer and return a
|
* instance into a unified planar YUV image and return a {@link YUVImage}
|
||||||
* <code>YUVImage</code> instance containing the encoded image. This method
|
* instance containing the encoded image. This method performs color
|
||||||
* uses the accelerated color conversion routines in TurboJPEG's underlying
|
* conversion (which is accelerated in the libjpeg-turbo implementation) but
|
||||||
* codec but does not execute any of the other steps in the JPEG compression
|
* does not execute any of the other steps in the JPEG compression process.
|
||||||
* process. Encoding CMYK source images to YUV is not supported.
|
* Encoding CMYK source images into YUV images is not supported.
|
||||||
*
|
*
|
||||||
* @param pad the width of each line in each plane of the YUV image will be
|
* @param align row alignment (in bytes) of the YUV image (must be a power of
|
||||||
* padded to the nearest multiple of this number of bytes (must be a power of
|
* 2.) Setting this parameter to n will cause each row in each plane of the
|
||||||
* 2.)
|
* YUV image to be padded to the nearest multiple of n bytes (1 = unpadded.)
|
||||||
*
|
*
|
||||||
* @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 {@link YUVImage} instance containing the unified planar YUV
|
||||||
|
* encoded image
|
||||||
*/
|
*/
|
||||||
public YUVImage encodeYUV(int pad, int flags) throws TJException {
|
public YUVImage encodeYUV(int align, int flags) throws TJException {
|
||||||
checkSourceImage();
|
checkSourceImage();
|
||||||
checkSubsampling();
|
checkSubsampling();
|
||||||
if (pad < 1 || ((pad & (pad - 1)) != 0))
|
if (align < 1 || ((align & (align - 1)) != 0))
|
||||||
throw new IllegalStateException("Invalid argument in encodeYUV()");
|
throw new IllegalStateException("Invalid argument in encodeYUV()");
|
||||||
YUVImage dstYUVImage = new YUVImage(srcWidth, pad, srcHeight, subsamp);
|
YUVImage dstYUVImage = new YUVImage(srcWidth, align, srcHeight, subsamp);
|
||||||
encodeYUV(dstYUVImage, flags);
|
encodeYUV(dstYUVImage, flags);
|
||||||
return dstYUVImage;
|
return dstYUVImage;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Encode the uncompressed source image associated with this compressor
|
* Encode the packed-pixel source image associated with this compressor
|
||||||
* instance into separate Y, U (Cb), and V (Cr) image planes and return a
|
* instance into separate Y, U (Cb), and V (Cr) image planes and return a
|
||||||
* <code>YUVImage</code> instance containing the encoded image planes. This
|
* {@link YUVImage} instance containing the encoded image planes. This
|
||||||
* method uses the accelerated color conversion routines in TurboJPEG's
|
* method performs color conversion (which is accelerated in the
|
||||||
* underlying codec but does not execute any of the other steps in the JPEG
|
* libjpeg-turbo implementation) but does not execute any of the other steps
|
||||||
* compression process. Encoding CMYK source images to YUV is not supported.
|
* in the JPEG compression process. Encoding CMYK source images into YUV
|
||||||
|
* images is not supported.
|
||||||
*
|
*
|
||||||
* @param strides an array of integers, each specifying the number of bytes
|
* @param strides an array of integers, each specifying the number of bytes
|
||||||
* per line in the corresponding plane of the output image. Setting the
|
* per row 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
|
* stride for any plane to 0 is the same as setting it to the plane width
|
||||||
* of the plane. If <code>strides</code> is null, then the strides for all
|
* (see {@link YUVImage}.) If <code>strides</code> is null, then the strides
|
||||||
* planes will be set to their respective component widths. You can adjust
|
* for all planes will be set to their respective plane widths. You can
|
||||||
* the strides in order to add an arbitrary amount of line padding to each
|
* adjust the strides in order to add an arbitrary amount of row padding to
|
||||||
* plane.
|
* each plane.
|
||||||
*
|
*
|
||||||
* @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 {@link YUVImage} instance containing the encoded image planes
|
||||||
*/
|
*/
|
||||||
public YUVImage encodeYUV(int[] strides, int flags) throws TJException {
|
public YUVImage encodeYUV(int[] strides, int flags) throws TJException {
|
||||||
checkSourceImage();
|
checkSourceImage();
|
||||||
@@ -679,6 +683,5 @@ public class TJCompressor implements Closeable {
|
|||||||
private int subsamp = -1;
|
private int subsamp = -1;
|
||||||
private int jpegQuality = -1;
|
private int jpegQuality = -1;
|
||||||
private int compressedSize = 0;
|
private int compressedSize = 0;
|
||||||
private int yuvPad = 4;
|
|
||||||
private ByteOrder byteOrder = null;
|
private ByteOrder byteOrder = null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C)2011, 2013 D. R. Commander. All Rights Reserved.
|
* Copyright (C)2011, 2013, 2023 D. R. Commander. All Rights Reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
@@ -58,7 +58,7 @@ public interface TJCustomFilter {
|
|||||||
* component plane to which <code>coeffBuffer</code> belongs
|
* component plane to which <code>coeffBuffer</code> belongs
|
||||||
*
|
*
|
||||||
* @param componentID ID number of the component plane to which
|
* @param componentID ID number of the component plane to which
|
||||||
* <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.)
|
* of 0, 1, and 2 in typical JPEG images.)
|
||||||
*
|
*
|
||||||
* @param transformID ID number of the transformed image to which
|
* @param transformID ID number of the transformed image to which
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C)2011-2015, 2018, 2022 D. R. Commander. All Rights Reserved.
|
* Copyright (C)2011-2015, 2018, 2022-2023 D. R. Commander.
|
||||||
|
* All Rights Reserved.
|
||||||
* Copyright (C)2015 Viktor Szathmáry. All Rights Reserved.
|
* Copyright (C)2015 Viktor Szathmáry. All Rights Reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@@ -50,10 +51,12 @@ public class TJDecompressor implements Closeable {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a TurboJPEG decompressor instance and associate the JPEG source
|
* Create a TurboJPEG decompressor instance and associate the JPEG source
|
||||||
* image stored in <code>jpegImage</code> with the newly created instance.
|
* image or "abbreviated table specification" (AKA "tables-only") datastream
|
||||||
|
* stored in <code>jpegImage</code> with the newly created instance.
|
||||||
*
|
*
|
||||||
* @param jpegImage JPEG image buffer (size of the JPEG image is assumed to
|
* @param jpegImage buffer containing a JPEG source image or tables-only
|
||||||
* be the length of the array.) This buffer is not modified.
|
* datastream. (The size of the JPEG image or datastream is assumed to be
|
||||||
|
* the length of the array.) This buffer is not modified.
|
||||||
*/
|
*/
|
||||||
public TJDecompressor(byte[] jpegImage) throws TJException {
|
public TJDecompressor(byte[] jpegImage) throws TJException {
|
||||||
init();
|
init();
|
||||||
@@ -62,12 +65,15 @@ public class TJDecompressor implements Closeable {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a TurboJPEG decompressor instance and associate the JPEG source
|
* Create a TurboJPEG decompressor instance and associate the JPEG source
|
||||||
* image of length <code>imageSize</code> bytes stored in
|
* image or "abbreviated table specification" (AKA "tables-only") datastream
|
||||||
* <code>jpegImage</code> with the newly created instance.
|
* of length <code>imageSize</code> bytes stored in <code>jpegImage</code>
|
||||||
|
* with the newly created instance.
|
||||||
*
|
*
|
||||||
* @param jpegImage JPEG image buffer. This buffer is not modified.
|
* @param jpegImage buffer containing a JPEG source image or tables-only
|
||||||
|
* datastream. This buffer is not modified.
|
||||||
*
|
*
|
||||||
* @param imageSize size of the JPEG image (in bytes)
|
* @param imageSize size of the JPEG source image or tables-only datastream
|
||||||
|
* (in bytes)
|
||||||
*/
|
*/
|
||||||
public TJDecompressor(byte[] jpegImage, int imageSize) throws TJException {
|
public TJDecompressor(byte[] jpegImage, int imageSize) throws TJException {
|
||||||
init();
|
init();
|
||||||
@@ -75,11 +81,11 @@ public class TJDecompressor implements Closeable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a TurboJPEG decompressor instance and associate the YUV planar
|
* Create a TurboJPEG decompressor instance and associate the planar YUV
|
||||||
* source image stored in <code>yuvImage</code> with the newly created
|
* source image stored in <code>yuvImage</code> with the newly created
|
||||||
* instance.
|
* instance.
|
||||||
*
|
*
|
||||||
* @param yuvImage {@link YUVImage} instance containing a YUV planar
|
* @param yuvImage {@link YUVImage} instance containing a planar YUV source
|
||||||
* image to be decoded. This image is not modified.
|
* image to be decoded. This image is not modified.
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("checkstyle:HiddenField")
|
@SuppressWarnings("checkstyle:HiddenField")
|
||||||
@@ -100,11 +106,11 @@ public class TJDecompressor implements Closeable {
|
|||||||
* when decompressing video streams in which all frames share the same
|
* when decompressing video streams in which all frames share the same
|
||||||
* quantization and Huffman tables.
|
* quantization and Huffman tables.
|
||||||
*
|
*
|
||||||
* @param jpegImage buffer containing a JPEG image or an "abbreviated table
|
* @param jpegImage buffer containing a JPEG source image or tables-only
|
||||||
* specification" (AKA "tables-only") datastream. This buffer is not
|
* datastream. This buffer is not modified.
|
||||||
* modified.
|
|
||||||
*
|
*
|
||||||
* @param imageSize size of the JPEG image (in bytes)
|
* @param imageSize size of the JPEG source image or tables-only datastream
|
||||||
|
* (in bytes)
|
||||||
*/
|
*/
|
||||||
public void setSourceImage(byte[] jpegImage, int imageSize)
|
public void setSourceImage(byte[] jpegImage, int imageSize)
|
||||||
throws TJException {
|
throws TJException {
|
||||||
@@ -127,12 +133,12 @@ public class TJDecompressor implements Closeable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Associate the specified YUV planar source image with this decompressor
|
* Associate the specified planar YUV source image with this decompressor
|
||||||
* instance. Subsequent decompress operations will decode this image into an
|
* instance. Subsequent decompress operations will decode this image into a
|
||||||
* RGB or grayscale destination image.
|
* packed-pixel RGB or grayscale destination image.
|
||||||
*
|
*
|
||||||
* @param srcImage {@link YUVImage} instance containing a YUV planar image to
|
* @param srcImage {@link YUVImage} instance containing a planar YUV source
|
||||||
* be decoded. This image is not modified.
|
* image to be decoded. This image is not modified.
|
||||||
*/
|
*/
|
||||||
public void setSourceImage(YUVImage srcImage) {
|
public void setSourceImage(YUVImage srcImage) {
|
||||||
if (srcImage == null)
|
if (srcImage == null)
|
||||||
@@ -210,9 +216,9 @@ public class TJDecompressor implements Closeable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the JPEG image buffer associated with this decompressor instance.
|
* Returns the JPEG buffer associated with this decompressor instance.
|
||||||
*
|
*
|
||||||
* @return the JPEG image buffer associated with this decompressor instance.
|
* @return the JPEG buffer associated with this decompressor instance.
|
||||||
*/
|
*/
|
||||||
public byte[] getJPEGBuf() {
|
public byte[] getJPEGBuf() {
|
||||||
if (jpegBuf == null)
|
if (jpegBuf == null)
|
||||||
@@ -239,14 +245,14 @@ public class TJDecompressor implements Closeable {
|
|||||||
* height.
|
* height.
|
||||||
*
|
*
|
||||||
* @param desiredWidth desired width (in pixels) of the decompressed image.
|
* @param desiredWidth desired width (in pixels) of the decompressed image.
|
||||||
* Setting this to 0 is the same as setting it to the width of the JPEG image
|
* Setting this to 0 is the same as setting it to the width of the JPEG
|
||||||
* (in other words, the width will not be considered when determining the
|
* image. (In other words, the width will not be considered when determining
|
||||||
* scaled image size.)
|
* the scaled image size.)
|
||||||
*
|
*
|
||||||
* @param desiredHeight desired height (in pixels) of the decompressed image.
|
* @param desiredHeight desired height (in pixels) of the decompressed image.
|
||||||
* Setting this to 0 is the same as setting it to the height of the JPEG
|
* 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
|
* image. (In other words, the height will not be considered when
|
||||||
* the scaled image size.)
|
* determining the scaled image size.)
|
||||||
*
|
*
|
||||||
* @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
|
||||||
@@ -280,14 +286,14 @@ public class TJDecompressor implements Closeable {
|
|||||||
* height.
|
* height.
|
||||||
*
|
*
|
||||||
* @param desiredWidth desired width (in pixels) of the decompressed image.
|
* @param desiredWidth desired width (in pixels) of the decompressed image.
|
||||||
* Setting this to 0 is the same as setting it to the width of the JPEG image
|
* Setting this to 0 is the same as setting it to the width of the JPEG
|
||||||
* (in other words, the width will not be considered when determining the
|
* image. (In other words, the width will not be considered when determining
|
||||||
* scaled image size.)
|
* the scaled image size.)
|
||||||
*
|
*
|
||||||
* @param desiredHeight desired height (in pixels) of the decompressed image.
|
* @param desiredHeight desired height (in pixels) of the decompressed image.
|
||||||
* Setting this to 0 is the same as setting it to the height of the JPEG
|
* 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
|
* image. (In other words, the height will not be considered when
|
||||||
* the scaled image size.)
|
* determining the scaled image size.)
|
||||||
*
|
*
|
||||||
* @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
|
||||||
@@ -316,27 +322,27 @@ public class TJDecompressor implements Closeable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Decompress the JPEG source image or decode the YUV source image associated
|
* Decompress the JPEG source image or decode the planar YUV source image
|
||||||
* with this decompressor instance and output a grayscale, RGB, or CMYK image
|
* associated with this decompressor instance and output a packed-pixel
|
||||||
* to the given destination buffer.
|
* grayscale, RGB, or CMYK image to the given destination buffer.
|
||||||
* <p>
|
* <p>
|
||||||
* NOTE: The output image is fully recoverable if this method throws a
|
* NOTE: The destination image is fully recoverable if this method throws a
|
||||||
* non-fatal {@link TJException} (unless
|
* non-fatal {@link TJException} (unless
|
||||||
* {@link TJ#FLAG_STOPONWARNING TJ.FLAG_STOPONWARNING} is specified.)
|
* {@link TJ#FLAG_STOPONWARNING TJ.FLAG_STOPONWARNING} is specified.)
|
||||||
*
|
*
|
||||||
* @param dstBuf buffer that will receive the decompressed/decoded image.
|
* @param dstBuf buffer that will receive the packed-pixel
|
||||||
* If the source image is a JPEG image, then this buffer should normally be
|
* decompressed/decoded image. If the source image is a JPEG image, then
|
||||||
* <code>pitch * scaledHeight</code> bytes in size, where
|
* this buffer should normally be <code>pitch * scaledHeight</code> bytes in
|
||||||
* <code>scaledHeight</code> can be determined by calling <code>
|
* size, where <code>scaledHeight</code> can be determined by calling
|
||||||
* scalingFactor.{@link TJScalingFactor#getScaled getScaled}(jpegHeight)
|
* <code>scalingFactor.</code>{@link TJScalingFactor#getScaled getScaled}<code>(jpegHeight)</code>
|
||||||
* </code> with one of the scaling factors returned from {@link
|
* with one of the scaling factors returned from {@link TJ#getScalingFactors}
|
||||||
* TJ#getScalingFactors} or by calling {@link #getScaledHeight}. If the
|
* or by calling {@link #getScaledHeight}. If the source image is a YUV
|
||||||
* source image is a YUV image, then this buffer should normally be
|
* image, then this buffer should normally be <code>pitch * height</code>
|
||||||
* <code>pitch * height</code> bytes in size, where <code>height</code> is
|
* bytes in size, where <code>height</code> is the height of the YUV image.
|
||||||
* the height of the YUV image. However, the buffer may also be larger than
|
* However, the buffer may also be larger than the dimensions of the source
|
||||||
* the dimensions of the source image, in which case the <code>x</code>,
|
* image, in which case the <code>x</code>, <code>y</code>, and
|
||||||
* <code>y</code>, and <code>pitch</code> parameters can be used to specify
|
* <code>pitch</code> parameters can be used to specify the region into which
|
||||||
* the region into which the source image should be decompressed/decoded.
|
* the source image should be decompressed/decoded.
|
||||||
*
|
*
|
||||||
* @param x x offset (in pixels) of the region in the destination image into
|
* @param x x offset (in pixels) of the region in the destination image into
|
||||||
* which the source image should be decompressed/decoded
|
* which the source image should be decompressed/decoded
|
||||||
@@ -350,20 +356,20 @@ public class TJDecompressor implements Closeable {
|
|||||||
* than the source image dimensions, then TurboJPEG will use scaling in the
|
* than the source image dimensions, then TurboJPEG will use scaling in the
|
||||||
* JPEG decompressor to generate the largest possible image that will fit
|
* JPEG decompressor to generate the largest possible image that will fit
|
||||||
* within the desired dimensions. Setting this to 0 is the same as setting
|
* 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
|
* it to the width of the JPEG image. (In other words, the width will not be
|
||||||
* considered when determining the scaled image size.) This parameter is
|
* considered when determining the scaled image size.) This parameter is
|
||||||
* ignored if the source image is a YUV image.
|
* ignored if the source image is a YUV image.
|
||||||
*
|
*
|
||||||
* @param pitch bytes per line of the destination image. Normally, this
|
* @param pitch bytes per row in the destination image. Normally this should
|
||||||
* should be set to <code>scaledWidth * TJ.pixelSize(pixelFormat)</code> if
|
* be set to <code>scaledWidth * TJ.pixelSize(pixelFormat)</code>, if the
|
||||||
* the destination image is unpadded, but you can use this to, for instance,
|
* destination image will be unpadded. However, you can use this to, for
|
||||||
* pad each line of the destination image to a 4-byte boundary or to
|
* instance, pad each row of the destination image to the nearest multiple of
|
||||||
* decompress/decode the source image into a region of a larger image. NOTE:
|
* 4 bytes or to decompress/decode the source image into a region of a larger
|
||||||
* if the source image is a JPEG image, then <code>scaledWidth</code> can be
|
* image. NOTE: if the source image is a JPEG image, then
|
||||||
* determined by calling <code>
|
* <code>scaledWidth</code> can be determined by calling
|
||||||
* scalingFactor.{@link TJScalingFactor#getScaled getScaled}(jpegWidth)
|
* <code>scalingFactor.</code>{@link TJScalingFactor#getScaled getScaled}<code>(jpegWidth)</code>
|
||||||
* </code> or by calling {@link #getScaledWidth}. If the source image is a
|
* or by calling {@link #getScaledWidth}. If the source image is a YUV
|
||||||
* YUV image, then <code>scaledWidth</code> is the width of the YUV image.
|
* 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>.
|
* <code>scaledWidth * TJ.pixelSize(pixelFormat)</code>.
|
||||||
*
|
*
|
||||||
@@ -373,8 +379,8 @@ public class TJDecompressor implements Closeable {
|
|||||||
* than the source image dimensions, then TurboJPEG will use scaling in the
|
* than the source image dimensions, then TurboJPEG will use scaling in the
|
||||||
* JPEG decompressor to generate the largest possible image that will fit
|
* JPEG decompressor to generate the largest possible image that will fit
|
||||||
* within the desired dimensions. Setting this to 0 is the same as setting
|
* 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
|
* it to the height of the JPEG image. (In other words, the height will not
|
||||||
* considered when determining the scaled image size.) This parameter is
|
* be considered when determining the scaled image size.) This parameter is
|
||||||
* ignored if the source image is a YUV image.
|
* ignored if the source image is a YUV image.
|
||||||
*
|
*
|
||||||
* @param pixelFormat pixel format of the decompressed/decoded image (one of
|
* @param pixelFormat pixel format of the decompressed/decoded image (one of
|
||||||
@@ -421,8 +427,9 @@ public class TJDecompressor implements Closeable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Decompress the JPEG source image associated with this decompressor
|
* Decompress the JPEG source image or decode the planar YUV source image
|
||||||
* instance and return a buffer containing the decompressed image.
|
* associated with this decompressor instance and return a buffer containing
|
||||||
|
* the packed-pixel decompressed image.
|
||||||
*
|
*
|
||||||
* @param desiredWidth see
|
* @param desiredWidth see
|
||||||
* {@link #decompress(byte[], int, int, int, int, int, int, int)}
|
* {@link #decompress(byte[], int, int, int, int, int, int, int)}
|
||||||
@@ -442,7 +449,7 @@ public class TJDecompressor implements Closeable {
|
|||||||
* @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 packed-pixel 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 TJException {
|
int pixelFormat, int flags) throws TJException {
|
||||||
@@ -462,22 +469,22 @@ public class TJDecompressor implements Closeable {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 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 store it in the given
|
* instance into a planar YUV image and store it in the given
|
||||||
* <code>YUVImage</code> instance. This method performs JPEG decompression
|
* {@link YUVImage} instance. This method performs JPEG decompression but
|
||||||
* but leaves out the color conversion step, so a planar YUV image is
|
* leaves out the color conversion step, so a planar YUV image is generated
|
||||||
* generated instead of an RGB or grayscale image. This method cannot be
|
* instead of a packed-pixel image. This method cannot be used to decompress
|
||||||
* used to decompress JPEG source images with the CMYK or YCCK colorspace.
|
* JPEG source images with the CMYK or YCCK colorspace.
|
||||||
* <p>
|
* <p>
|
||||||
* NOTE: The YUV planar output image is fully recoverable if this method
|
* NOTE: The planar YUV destination image is fully recoverable if this method
|
||||||
* throws a non-fatal {@link TJException} (unless
|
* throws a non-fatal {@link TJException} (unless
|
||||||
* {@link TJ#FLAG_STOPONWARNING TJ.FLAG_STOPONWARNING} is specified.)
|
* {@link TJ#FLAG_STOPONWARNING TJ.FLAG_STOPONWARNING} is specified.)
|
||||||
*
|
*
|
||||||
* @param dstImage {@link YUVImage} instance that will receive the YUV planar
|
* @param dstImage {@link YUVImage} instance that will receive the planar YUV
|
||||||
* image. The level of subsampling specified in this <code>YUVImage</code>
|
* decompressed image. The level of subsampling specified in this
|
||||||
* instance must match that of the JPEG image, and the width and height
|
* {@link YUVImage} instance must match that of the JPEG image, and the width
|
||||||
* specified in the <code>YUVImage</code> instance must match one of the
|
* and height specified in the {@link YUVImage} instance must match one of
|
||||||
* scaled image sizes that TurboJPEG is capable of generating from the JPEG
|
* the scaled image sizes that the decompressor is capable of generating from
|
||||||
* source image.
|
* the JPEG source image.
|
||||||
*
|
*
|
||||||
* @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_*}
|
||||||
@@ -494,7 +501,7 @@ public class TJDecompressor implements Closeable {
|
|||||||
dstImage.getHeight());
|
dstImage.getHeight());
|
||||||
if (scaledWidth != dstImage.getWidth() ||
|
if (scaledWidth != dstImage.getWidth() ||
|
||||||
scaledHeight != dstImage.getHeight())
|
scaledHeight != dstImage.getHeight())
|
||||||
throw new IllegalArgumentException("YUVImage dimensions do not match one of the scaled image sizes that TurboJPEG is capable of generating.");
|
throw new IllegalArgumentException("YUVImage dimensions do not match one of the scaled image sizes that the decompressor is capable of generating.");
|
||||||
if (jpegSubsamp != dstImage.getSubsamp())
|
if (jpegSubsamp != dstImage.getSubsamp())
|
||||||
throw new IllegalArgumentException("YUVImage subsampling level does not match that of the JPEG image");
|
throw new IllegalArgumentException("YUVImage subsampling level does not match that of the JPEG image");
|
||||||
|
|
||||||
@@ -517,40 +524,41 @@ public class TJDecompressor implements Closeable {
|
|||||||
/**
|
/**
|
||||||
* Decompress the JPEG source image associated with this decompressor
|
* 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
|
* 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.
|
* {@link YUVImage} instance containing the decompressed image planes. This
|
||||||
* This method performs JPEG decompression but leaves out the color
|
* method performs JPEG decompression but leaves out the color conversion
|
||||||
* conversion step, so a planar YUV image is generated instead of an RGB or
|
* step, so a planar YUV image is generated instead of a packed-pixel image.
|
||||||
* grayscale image. This method cannot be used to decompress JPEG source
|
* This method cannot be used to decompress JPEG source images with the CMYK
|
||||||
* images with the CMYK or YCCK colorspace.
|
* 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
|
||||||
* image being decompressed, then TurboJPEG will use scaling in the JPEG
|
* image being decompressed, then TurboJPEG will use scaling in the JPEG
|
||||||
* decompressor to generate the largest possible image that will fit within
|
* 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 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
|
* the width of the JPEG image. (In other words, the width will not be
|
||||||
* considered when determining the scaled image size.)
|
* considered when determining the scaled image size.)
|
||||||
*
|
*
|
||||||
* @param strides an array of integers, each specifying the number of bytes
|
* @param strides an array of integers, each specifying the number of bytes
|
||||||
* per line in the corresponding plane of the output image. Setting the
|
* per row in the corresponding plane of the YUV image. Setting the stride
|
||||||
* stride for any plane to 0 is the same as setting it to the scaled
|
* for any plane to 0 is the same as setting it to the scaled plane width
|
||||||
* component width of the plane. If <tt>strides</tt> is NULL, then the
|
* (see {@link YUVImage}.) If <code>strides</code> is null, then the strides
|
||||||
* strides for all planes will be set to their respective scaled component
|
* for all planes will be set to their respective scaled plane widths. You
|
||||||
* widths. You can adjust the strides in order to add an arbitrary amount of
|
* can adjust the strides in order to add an arbitrary amount of row padding
|
||||||
* line padding to each plane.
|
* to each plane.
|
||||||
*
|
*
|
||||||
* @param desiredHeight desired height (in pixels) of the YUV image. If the
|
* @param desiredHeight desired height (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
|
||||||
* decompressor to generate the largest possible image that will fit within
|
* 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 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
|
* the height of the JPEG image. (In other words, the height will not be
|
||||||
* considered when determining the scaled image size.)
|
* considered when determining the scaled image size.)
|
||||||
*
|
*
|
||||||
* @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 {@link YUVImage} instance containing the decompressed image
|
||||||
|
* planes
|
||||||
*/
|
*/
|
||||||
public YUVImage decompressToYUV(int desiredWidth, int[] strides,
|
public YUVImage decompressToYUV(int desiredWidth, int[] strides,
|
||||||
int desiredHeight,
|
int desiredHeight,
|
||||||
@@ -574,40 +582,41 @@ public class TJDecompressor implements Closeable {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Decompress the JPEG source image associated with this decompressor
|
* Decompress the JPEG source image associated with this decompressor
|
||||||
* instance into a unified YUV planar image buffer and return a
|
* instance into a unified planar YUV image and return a {@link YUVImage}
|
||||||
* <code>YUVImage</code> instance containing the decompressed image. This
|
* instance containing the decompressed image. This method performs JPEG
|
||||||
* method performs JPEG decompression but leaves out the color conversion
|
* decompression but leaves out the color conversion step, so a planar YUV
|
||||||
* step, so a planar YUV image is generated instead of an RGB or grayscale
|
* image is generated instead of a packed-pixel image. This method cannot be
|
||||||
* image. This method cannot be used to decompress JPEG source images with
|
* used to decompress JPEG source images with the CMYK or YCCK colorspace.
|
||||||
* 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
|
||||||
* image being decompressed, then TurboJPEG will use scaling in the JPEG
|
* image being decompressed, then TurboJPEG will use scaling in the JPEG
|
||||||
* decompressor to generate the largest possible image that will fit within
|
* 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 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
|
* the width of the JPEG image. (In other words, the width will not be
|
||||||
* considered when determining the scaled image size.)
|
* considered when determining the scaled image size.)
|
||||||
*
|
*
|
||||||
* @param pad the width of each line in each plane of the YUV image will be
|
* @param align row alignment (in bytes) of the YUV image (must be a power of
|
||||||
* padded to the nearest multiple of this number of bytes (must be a power of
|
* 2.) Setting this parameter to n will cause each row in each plane of the
|
||||||
* 2.)
|
* YUV image to be padded to the nearest multiple of n bytes (1 = unpadded.)
|
||||||
*
|
*
|
||||||
* @param desiredHeight desired height (in pixels) of the YUV image. If the
|
* @param desiredHeight desired height (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
|
||||||
* decompressor to generate the largest possible image that will fit within
|
* 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 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
|
* the height of the JPEG image. (In other words, the height will not be
|
||||||
* considered when determining the scaled image size.)
|
* considered when determining the scaled image size.)
|
||||||
*
|
*
|
||||||
* @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 {@link YUVImage} instance containing the unified planar YUV
|
||||||
|
* decompressed image
|
||||||
*/
|
*/
|
||||||
public YUVImage decompressToYUV(int desiredWidth, int pad, int desiredHeight,
|
public YUVImage decompressToYUV(int desiredWidth, int align,
|
||||||
int flags) throws TJException {
|
int desiredHeight, int flags)
|
||||||
|
throws TJException {
|
||||||
if (flags < 0)
|
if (flags < 0)
|
||||||
throw new IllegalArgumentException("Invalid argument in decompressToYUV()");
|
throw new IllegalArgumentException("Invalid argument in decompressToYUV()");
|
||||||
if (jpegWidth < 1 || jpegHeight < 1 || jpegSubsamp < 0)
|
if (jpegWidth < 1 || jpegHeight < 1 || jpegSubsamp < 0)
|
||||||
@@ -619,7 +628,7 @@ public class TJDecompressor implements Closeable {
|
|||||||
|
|
||||||
int scaledWidth = getScaledWidth(desiredWidth, desiredHeight);
|
int scaledWidth = getScaledWidth(desiredWidth, desiredHeight);
|
||||||
int scaledHeight = getScaledHeight(desiredWidth, desiredHeight);
|
int scaledHeight = getScaledHeight(desiredWidth, desiredHeight);
|
||||||
YUVImage dstYUVImage = new YUVImage(scaledWidth, pad, scaledHeight,
|
YUVImage dstYUVImage = new YUVImage(scaledWidth, align, scaledHeight,
|
||||||
jpegSubsamp);
|
jpegSubsamp);
|
||||||
decompressToYUV(dstYUVImage, flags);
|
decompressToYUV(dstYUVImage, flags);
|
||||||
return dstYUVImage;
|
return dstYUVImage;
|
||||||
@@ -637,27 +646,27 @@ public class TJDecompressor implements Closeable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Decompress the JPEG source image or decode the YUV source image associated
|
* Decompress the JPEG source image or decode the planar YUV source image
|
||||||
* with this decompressor instance and output a grayscale, RGB, or CMYK image
|
* associated with this decompressor instance and output a packed-pixel
|
||||||
* to the given destination buffer.
|
* grayscale, RGB, or CMYK image to the given destination buffer.
|
||||||
* <p>
|
* <p>
|
||||||
* NOTE: The output image is fully recoverable if this method throws a
|
* NOTE: The destination image is fully recoverable if this method throws a
|
||||||
* non-fatal {@link TJException} (unless
|
* non-fatal {@link TJException} (unless
|
||||||
* {@link TJ#FLAG_STOPONWARNING TJ.FLAG_STOPONWARNING} is specified.)
|
* {@link TJ#FLAG_STOPONWARNING TJ.FLAG_STOPONWARNING} is specified.)
|
||||||
*
|
*
|
||||||
* @param dstBuf buffer that will receive the decompressed/decoded image.
|
* @param dstBuf buffer that will receive the packed-pixel
|
||||||
* If the source image is a JPEG image, then this buffer should normally be
|
* decompressed/decoded image. If the source image is a JPEG image, then
|
||||||
* <code>stride * scaledHeight</code> pixels in size, where
|
* this buffer should normally be <code>stride * scaledHeight</code> pixels
|
||||||
* <code>scaledHeight</code> can be determined by calling <code>
|
* in size, where <code>scaledHeight</code> can be determined by calling
|
||||||
* scalingFactor.{@link TJScalingFactor#getScaled getScaled}(jpegHeight)
|
* <code>scalingFactor.</code>{@link TJScalingFactor#getScaled getScaled}<code>(jpegHeight)</code>
|
||||||
* </code> with one of the scaling factors returned from {@link
|
* with one of the scaling factors returned from {@link TJ#getScalingFactors}
|
||||||
* TJ#getScalingFactors} or by calling {@link #getScaledHeight}. If the
|
* or by calling {@link #getScaledHeight}. If the source image is a YUV
|
||||||
* source image is a YUV image, then this buffer should normally be
|
* image, then this buffer should normally be <code>stride * height</code>
|
||||||
* <code>stride * height</code> pixels in size, where <code>height</code> is
|
* pixels in size, where <code>height</code> is the height of the YUV image.
|
||||||
* the height of the YUV image. However, the buffer may also be larger than
|
* However, the buffer may also be larger than the dimensions of the JPEG
|
||||||
* the dimensions of the JPEG image, in which case the <code>x</code>,
|
* image, in which case the <code>x</code>, <code>y</code>, and
|
||||||
* <code>y</code>, and <code>stride</code> parameters can be used to specify
|
* <code>stride</code> parameters can be used to specify the region into
|
||||||
* the region into which the source image should be decompressed.
|
* which the source image should be decompressed.
|
||||||
*
|
*
|
||||||
* @param x x offset (in pixels) of the region in the destination image into
|
* @param x x offset (in pixels) of the region in the destination image into
|
||||||
* which the source image should be decompressed/decoded
|
* which the source image should be decompressed/decoded
|
||||||
@@ -671,18 +680,18 @@ public class TJDecompressor implements Closeable {
|
|||||||
* than the source image dimensions, then TurboJPEG will use scaling in the
|
* than the source image dimensions, then TurboJPEG will use scaling in the
|
||||||
* JPEG decompressor to generate the largest possible image that will fit
|
* JPEG decompressor to generate the largest possible image that will fit
|
||||||
* within the desired dimensions. Setting this to 0 is the same as setting
|
* 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
|
* it to the width of the JPEG image. (In other words, the width will not be
|
||||||
* considered when determining the scaled image size.) This parameter is
|
* considered when determining the scaled image size.) This parameter is
|
||||||
* ignored if the source image is a YUV image.
|
* ignored if the source image is a YUV image.
|
||||||
*
|
*
|
||||||
* @param stride pixels per line of the destination image. Normally, this
|
* @param stride pixels per row in the destination image. Normally this
|
||||||
* should be set to <code>scaledWidth</code>, but you can use this to, for
|
* should be set to <code>scaledWidth</code>, but you can use this to, for
|
||||||
* instance, decompress the JPEG image into a region of a larger image.
|
* instance, decompress the JPEG image into a region of a larger image.
|
||||||
* 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
|
||||||
* scalingFactor.{@link TJScalingFactor#getScaled getScaled}(jpegWidth)
|
* <code>scalingFactor.</code>{@link TJScalingFactor#getScaled getScaled}<code>(jpegWidth)</code>
|
||||||
* </code> or by calling {@link #getScaledWidth}. If the source image is a
|
* or by calling {@link #getScaledWidth}. If the source image is a YUV
|
||||||
* YUV image, then <code>scaledWidth</code> is the width of the YUV image.
|
* 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>.
|
* <code>scaledWidth</code>.
|
||||||
*
|
*
|
||||||
@@ -692,8 +701,8 @@ public class TJDecompressor implements Closeable {
|
|||||||
* than the source image dimensions, then TurboJPEG will use scaling in the
|
* than the source image dimensions, then TurboJPEG will use scaling in the
|
||||||
* JPEG decompressor to generate the largest possible image that will fit
|
* JPEG decompressor to generate the largest possible image that will fit
|
||||||
* within the desired dimensions. Setting this to 0 is the same as setting
|
* 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
|
* it to the height of the JPEG image. (In other words, the height will not
|
||||||
* considered when determining the scaled image size.) This parameter is
|
* be considered when determining the scaled image size.) This parameter is
|
||||||
* ignored if the source image is a YUV image.
|
* ignored if the source image is a YUV image.
|
||||||
*
|
*
|
||||||
* @param pixelFormat pixel format of the decompressed image (one of
|
* @param pixelFormat pixel format of the decompressed image (one of
|
||||||
@@ -722,21 +731,22 @@ public class TJDecompressor implements Closeable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Decompress the JPEG source image or decode the YUV source image associated
|
* Decompress the JPEG source image or decode the planar YUV source image
|
||||||
* with this decompressor instance and output a decompressed/decoded image to
|
* associated with this decompressor instance and output a packed-pixel
|
||||||
* the given <code>BufferedImage</code> instance.
|
* decompressed/decoded image to the given <code>BufferedImage</code>
|
||||||
|
* instance.
|
||||||
* <p>
|
* <p>
|
||||||
* NOTE: The output image is fully recoverable if this method throws a
|
* NOTE: The destination image is fully recoverable if this method throws a
|
||||||
* non-fatal {@link TJException} (unless
|
* non-fatal {@link TJException} (unless
|
||||||
* {@link TJ#FLAG_STOPONWARNING TJ.FLAG_STOPONWARNING} is specified.)
|
* {@link TJ#FLAG_STOPONWARNING TJ.FLAG_STOPONWARNING} is specified.)
|
||||||
*
|
*
|
||||||
* @param dstImage a <code>BufferedImage</code> instance that will receive
|
* @param dstImage a <code>BufferedImage</code> instance that will receive
|
||||||
* the decompressed/decoded image. If the source image is a JPEG image, then
|
* the packed-pixel decompressed/decoded image. If the source image is a
|
||||||
* the width and height of the <code>BufferedImage</code> instance must match
|
* JPEG image, then the width and height of the <code>BufferedImage</code>
|
||||||
* one of the scaled image sizes that TurboJPEG is capable of generating from
|
* instance must match one of the scaled image sizes that the decompressor is
|
||||||
* the JPEG image. If the source image is a YUV image, then the width and
|
* capable of generating from the JPEG image. If the source image is a YUV
|
||||||
* height of the <code>BufferedImage</code> instance must match the width and
|
* image, then the width and height of the <code>BufferedImage</code>
|
||||||
* height of the YUV image.
|
* instance must match the width and height of the YUV image.
|
||||||
*
|
*
|
||||||
* @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_*}
|
||||||
@@ -759,7 +769,7 @@ public class TJDecompressor implements Closeable {
|
|||||||
scaledWidth = getScaledWidth(desiredWidth, desiredHeight);
|
scaledWidth = getScaledWidth(desiredWidth, desiredHeight);
|
||||||
scaledHeight = getScaledHeight(desiredWidth, desiredHeight);
|
scaledHeight = getScaledHeight(desiredWidth, desiredHeight);
|
||||||
if (scaledWidth != desiredWidth || scaledHeight != desiredHeight)
|
if (scaledWidth != desiredWidth || scaledHeight != desiredHeight)
|
||||||
throw new IllegalArgumentException("BufferedImage dimensions do not match one of the scaled image sizes that TurboJPEG is capable of generating.");
|
throw new IllegalArgumentException("BufferedImage dimensions do not match one of the scaled image sizes that the decompressor is capable of generating.");
|
||||||
}
|
}
|
||||||
int pixelFormat; boolean intPixels = false;
|
int pixelFormat; boolean intPixels = false;
|
||||||
if (byteOrder == null)
|
if (byteOrder == null)
|
||||||
@@ -829,7 +839,7 @@ public class TJDecompressor implements Closeable {
|
|||||||
/**
|
/**
|
||||||
* Decompress the JPEG source image or decode the YUV source image associated
|
* 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.
|
* instance containing the packed-pixel decompressed/decoded image.
|
||||||
*
|
*
|
||||||
* @param desiredWidth see
|
* @param desiredWidth see
|
||||||
* {@link #decompress(byte[], int, int, int, int, int, int, int)} for
|
* {@link #decompress(byte[], int, int, int, int, int, int, int)} for
|
||||||
@@ -846,7 +856,7 @@ public class TJDecompressor implements Closeable {
|
|||||||
* @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 <code>BufferedImage</code> instance containing the
|
* @return a <code>BufferedImage</code> instance containing the packed-pixel
|
||||||
* decompressed/decoded image.
|
* decompressed/decoded image.
|
||||||
*/
|
*/
|
||||||
public BufferedImage decompress(int desiredWidth, int desiredHeight,
|
public BufferedImage decompress(int desiredWidth, int desiredHeight,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C)2011, 2013, 2018 D. R. Commander. All Rights Reserved.
|
* Copyright (C)2011, 2013, 2018, 2023 D. R. Commander. All Rights Reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
@@ -114,8 +114,8 @@ public class TJTransform extends Rectangle {
|
|||||||
*/
|
*/
|
||||||
public static final int OPT_CROP = 4;
|
public static final int OPT_CROP = 4;
|
||||||
/**
|
/**
|
||||||
* This option will discard the color data in the input image and produce
|
* This option will discard the color data in the source image and produce a
|
||||||
* a grayscale output image.
|
* grayscale destination image.
|
||||||
*/
|
*/
|
||||||
public static final int OPT_GRAY = 8;
|
public static final int OPT_GRAY = 8;
|
||||||
/**
|
/**
|
||||||
@@ -127,7 +127,7 @@ public class TJTransform extends Rectangle {
|
|||||||
*/
|
*/
|
||||||
public static final int OPT_NOOUTPUT = 16;
|
public static final int OPT_NOOUTPUT = 16;
|
||||||
/**
|
/**
|
||||||
* This option will enable progressive entropy coding in the output image
|
* This option will enable progressive entropy coding in the JPEG image
|
||||||
* generated by this particular transform. Progressive entropy coding will
|
* generated by this particular transform. Progressive entropy coding will
|
||||||
* generally improve compression relative to baseline entropy coding (the
|
* generally improve compression relative to baseline entropy coding (the
|
||||||
* default), but it will reduce compression and decompression performance
|
* default), but it will reduce compression and decompression performance
|
||||||
@@ -137,7 +137,7 @@ public class TJTransform extends Rectangle {
|
|||||||
/**
|
/**
|
||||||
* This option will prevent {@link TJTransformer#transform
|
* This option will prevent {@link TJTransformer#transform
|
||||||
* TJTransformer.transform()} from copying any extra markers (including EXIF
|
* TJTransformer.transform()} from copying any extra markers (including EXIF
|
||||||
* and ICC profile data) from the source image to the output image.
|
* and ICC profile data) from the source image to the destination image.
|
||||||
*/
|
*/
|
||||||
public static final int OPT_COPYNONE = 64;
|
public static final int OPT_COPYNONE = 64;
|
||||||
|
|
||||||
@@ -165,10 +165,10 @@ public class TJTransform extends Rectangle {
|
|||||||
* equivalent of setting it to (height of the source JPEG image -
|
* equivalent of setting it to (height of the source JPEG image -
|
||||||
* <code>y</code>).
|
* <code>y</code>).
|
||||||
*
|
*
|
||||||
* @param op one of the transform operations (<code>OP_*</code>)
|
* @param op one of the transform operations ({@link #OP_NONE OP_*})
|
||||||
*
|
*
|
||||||
* @param options the bitwise OR of one or more of the transform options
|
* @param options the bitwise OR of one or more of the transform options
|
||||||
* (<code>OPT_*</code>)
|
* ({@link #OPT_PERFECT OPT_*})
|
||||||
*
|
*
|
||||||
* @param cf an instance of an object that implements the {@link
|
* @param cf an instance of an object that implements the {@link
|
||||||
* TJCustomFilter} interface, or null if no custom filter is needed
|
* TJCustomFilter} interface, or null if no custom filter is needed
|
||||||
@@ -190,10 +190,10 @@ public class TJTransform extends Rectangle {
|
|||||||
* #TJTransform(int, int, int, int, int, int, TJCustomFilter)} for more
|
* #TJTransform(int, int, int, int, int, int, TJCustomFilter)} for more
|
||||||
* detail.
|
* detail.
|
||||||
*
|
*
|
||||||
* @param op one of the transform operations (<code>OP_*</code>)
|
* @param op one of the transform operations ({@link #OP_NONE OP_*})
|
||||||
*
|
*
|
||||||
* @param options the bitwise OR of one or more of the transform options
|
* @param options the bitwise OR of one or more of the transform options
|
||||||
* (<code>OPT_*</code>)
|
* ({@link #OPT_PERFECT OPT_*})
|
||||||
*
|
*
|
||||||
* @param cf an instance of an object that implements the {@link
|
* @param cf an instance of an object that implements the {@link
|
||||||
* TJCustomFilter} interface, or null if no custom filter is needed
|
* TJCustomFilter} interface, or null if no custom filter is needed
|
||||||
@@ -208,13 +208,14 @@ public class TJTransform extends Rectangle {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Transform operation (one of <code>OP_*</code>)
|
* Transform operation (one of {@link #OP_NONE OP_*})
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("checkstyle:VisibilityModifier")
|
@SuppressWarnings("checkstyle:VisibilityModifier")
|
||||||
public int op = 0;
|
public int op = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Transform options (bitwise OR of one or more of <code>OPT_*</code>)
|
* Transform options (bitwise OR of one or more of
|
||||||
|
* {@link #OPT_PERFECT OPT_*})
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("checkstyle:VisibilityModifier")
|
@SuppressWarnings("checkstyle:VisibilityModifier")
|
||||||
public int options = 0;
|
public int options = 0;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C)2011, 2013-2015 D. R. Commander. All Rights Reserved.
|
* Copyright (C)2011, 2013-2015, 2023 D. R. Commander. All Rights Reserved.
|
||||||
* Copyright (C)2015 Viktor Szathmáry. All Rights Reserved.
|
* Copyright (C)2015 Viktor Szathmáry. All Rights Reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@@ -43,10 +43,12 @@ public class TJTransformer extends TJDecompressor {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a TurboJPEG lossless transformer instance and associate the JPEG
|
* Create a TurboJPEG lossless transformer instance and associate the JPEG
|
||||||
* image stored in <code>jpegImage</code> with the newly created instance.
|
* source image stored in <code>jpegImage</code> with the newly created
|
||||||
|
* instance.
|
||||||
*
|
*
|
||||||
* @param jpegImage JPEG image buffer (size of the JPEG image is assumed to
|
* @param jpegImage buffer containing the JPEG source image to transform.
|
||||||
* be the length of the array.) This buffer is not modified.
|
* (The size of the JPEG image is assumed to be the length of the array.)
|
||||||
|
* This buffer is not modified.
|
||||||
*/
|
*/
|
||||||
public TJTransformer(byte[] jpegImage) throws TJException {
|
public TJTransformer(byte[] jpegImage) throws TJException {
|
||||||
init();
|
init();
|
||||||
@@ -55,12 +57,13 @@ public class TJTransformer extends TJDecompressor {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a TurboJPEG lossless transformer instance and associate the JPEG
|
* Create a TurboJPEG lossless transformer instance and associate the JPEG
|
||||||
* image of length <code>imageSize</code> bytes stored in
|
* source image of length <code>imageSize</code> bytes stored in
|
||||||
* <code>jpegImage</code> with the newly created instance.
|
* <code>jpegImage</code> with the newly created instance.
|
||||||
*
|
*
|
||||||
* @param jpegImage JPEG image buffer. This buffer is not modified.
|
* @param jpegImage buffer containing the JPEG source image to transform.
|
||||||
|
* This buffer is not modified.
|
||||||
*
|
*
|
||||||
* @param imageSize size of the JPEG image (in bytes)
|
* @param imageSize size of the JPEG source image (in bytes)
|
||||||
*/
|
*/
|
||||||
public TJTransformer(byte[] jpegImage, int imageSize) throws TJException {
|
public TJTransformer(byte[] jpegImage, int imageSize) throws TJException {
|
||||||
init();
|
init();
|
||||||
@@ -68,28 +71,29 @@ public class TJTransformer extends TJDecompressor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Losslessly transform the JPEG image associated with this transformer
|
* Losslessly transform the JPEG source image associated with this
|
||||||
* instance into one or more JPEG images stored in the given destination
|
* transformer instance into one or more JPEG images stored in the given
|
||||||
* buffers. Lossless transforms work by moving the raw coefficients from one
|
* destination buffers. Lossless transforms work by moving the raw
|
||||||
* JPEG image structure to another without altering the values of the
|
* coefficients from one JPEG image structure to another without altering the
|
||||||
* coefficients. While this is typically faster than decompressing the
|
* values of the coefficients. While this is typically faster than
|
||||||
* image, transforming it, and re-compressing it, lossless transforms are not
|
* decompressing the image, transforming it, and re-compressing it, lossless
|
||||||
* free. Each lossless transform requires reading and performing Huffman
|
* transforms are not free. Each lossless transform requires reading and
|
||||||
* decoding on all of the coefficients in the source image, regardless of the
|
* performing Huffman decoding on all of the coefficients in the source
|
||||||
* size of the destination image. Thus, this method provides a means of
|
* image, regardless of the size of the destination image. Thus, this method
|
||||||
* generating multiple transformed images from the same source or of applying
|
* provides a means of generating multiple transformed images from the same
|
||||||
* multiple transformations simultaneously, in order to eliminate the need to
|
* source or of applying multiple transformations simultaneously, in order to
|
||||||
* read the source coefficients multiple times.
|
* eliminate the need to read the source coefficients multiple times.
|
||||||
*
|
*
|
||||||
* @param dstBufs an array of image buffers. <code>dstbufs[i]</code> will
|
* @param dstBufs an array of JPEG destination buffers.
|
||||||
* receive a JPEG image that has been transformed using the parameters in
|
* <code>dstbufs[i]</code> will receive a JPEG image that has been
|
||||||
* <code>transforms[i]</code>. Use {@link TJ#bufSize} to determine the
|
* transformed using the parameters in <code>transforms[i]</code>. Use
|
||||||
* maximum size for each buffer based on the transformed or cropped width and
|
* {@link TJ#bufSize} to determine the maximum size for each buffer based on
|
||||||
* height and the level of subsampling used in the source image.
|
* the transformed or cropped width and height and the level of subsampling
|
||||||
|
* used in the source image.
|
||||||
*
|
*
|
||||||
* @param transforms an array of {@link TJTransform} instances, each of
|
* @param transforms an array of {@link TJTransform} instances, each of
|
||||||
* which specifies the transform parameters and/or cropping region for the
|
* which specifies the transform parameters and/or cropping region for the
|
||||||
* corresponding transformed output image
|
* corresponding transformed JPEG image
|
||||||
*
|
*
|
||||||
* @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_*}
|
||||||
@@ -103,13 +107,13 @@ public class TJTransformer extends TJDecompressor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Losslessly transform the JPEG image associated with this transformer
|
* Losslessly transform the JPEG source image associated with this
|
||||||
* instance and return an array of {@link TJDecompressor} instances, each of
|
* transformer instance and return an array of {@link TJDecompressor}
|
||||||
* which has a transformed JPEG image associated with it.
|
* instances, each of which has a transformed JPEG image associated with it.
|
||||||
*
|
*
|
||||||
* @param transforms an array of {@link TJTransform} instances, each of
|
* @param transforms an array of {@link TJTransform} instances, each of
|
||||||
* which specifies the transform parameters and/or cropping region for the
|
* which specifies the transform parameters and/or cropping region for the
|
||||||
* corresponding transformed output image
|
* corresponding transformed JPEG image
|
||||||
*
|
*
|
||||||
* @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_*}
|
||||||
@@ -139,10 +143,10 @@ public class TJTransformer extends TJDecompressor {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns an array containing the sizes of the transformed JPEG images
|
* Returns an array containing the sizes of the transformed JPEG images
|
||||||
* generated by the most recent transform operation.
|
* (in bytes) 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.
|
* (in bytes) generated by the most recent transform operation.
|
||||||
*/
|
*/
|
||||||
public int[] getTransformedSizes() {
|
public int[] getTransformedSizes() {
|
||||||
if (transformedSizes == null)
|
if (transformedSizes == null)
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C)2014, 2017 D. R. Commander. All Rights Reserved.
|
* Copyright (C)2014, 2017, 2023 D. R. Commander. All Rights Reserved.
|
||||||
* Copyright (C)2015 Viktor Szathmáry. All Rights Reserved.
|
* Copyright (C)2015 Viktor Szathmáry. All Rights Reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
package org.libjpegturbo.turbojpeg;
|
package org.libjpegturbo.turbojpeg;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class encapsulates a YUV planar image and the metadata
|
* This class encapsulates a planar YUV image and the metadata
|
||||||
* associated with it. The TurboJPEG API allows both the JPEG compression and
|
* associated with it. The TurboJPEG API allows both the JPEG compression and
|
||||||
* decompression pipelines to be split into stages: YUV encode, compress from
|
* decompression pipelines to be split into stages: YUV encode, compress from
|
||||||
* YUV, decompress to YUV, and YUV decode. A <code>YUVImage</code> instance
|
* YUV, decompress to YUV, and YUV decode. A <code>YUVImage</code> instance
|
||||||
@@ -38,30 +38,32 @@ package org.libjpegturbo.turbojpeg;
|
|||||||
* operations and as the source image for compress-from-YUV and YUV decode
|
* operations and as the source image for compress-from-YUV and YUV decode
|
||||||
* operations.
|
* operations.
|
||||||
* <p>
|
* <p>
|
||||||
* Technically, the JPEG format uses the YCbCr colorspace (which technically is
|
* Technically, the JPEG format uses the YCbCr colorspace (which is technically
|
||||||
* not a "colorspace" but rather a "color transform"), but per the convention
|
* not a colorspace but a color transform), but per the convention of the
|
||||||
* of the digital video community, the TurboJPEG API uses "YUV" to refer to an
|
* digital video community, the TurboJPEG API uses "YUV" to refer to an image
|
||||||
* image format consisting of Y, Cb, and Cr image planes.
|
* 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 (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 width and height of each plane are determined by the image
|
* image. The width and height of each plane are determined by the image
|
||||||
* width, height, and level of chrominance subsampling. The luminance plane
|
* width, height, and level of chrominance subsampling. The luminance plane
|
||||||
* width is the image width padded to the nearest multiple of the horizontal
|
* 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
|
* subsampling factor (1 in the case of 4:4:4, grayscale, or 4:4:0; 2 in the
|
||||||
* 4:1:1, 1 in the case of 4:4:4 or grayscale.) Similarly, the luminance plane
|
* case of 4:2:2 or 4:2:0; 4 in the case of 4:1:1.) Similarly, the luminance
|
||||||
* height is the image height padded to the nearest multiple of the vertical
|
* plane height is the image height padded to the nearest multiple of the
|
||||||
* subsampling factor (2 in the case of 4:2:0 or 4:4:0, 1 in the case of 4:4:4
|
* vertical subsampling factor (1 in the case of 4:4:4, 4:2:2, grayscale, or
|
||||||
* or grayscale.) The chrominance plane width is equal to the luminance plane
|
* 4:1:1; 2 in the case of 4:2:0 or 4:4:0.) This is irrespective of any
|
||||||
* width divided by the horizontal subsampling factor, and the chrominance
|
* additional padding that may be specified as an argument to the various
|
||||||
* plane height is equal to the luminance plane height divided by the vertical
|
* YUVImage methods. The chrominance plane width is equal to the luminance
|
||||||
* subsampling factor.
|
* 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
|
* 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
|
||||||
* chrominance planes would be 18 x 35 bytes. If you specify a line padding of
|
* chrominance planes would be 18 x 35 bytes. If you specify a row alignment
|
||||||
* 4 bytes on top of this, then the luminance plane would be 36 x 35 bytes, and
|
* of 4 bytes on top of this, then the luminance plane would be 36 x 35 bytes,
|
||||||
* each of the chrominance planes would be 20 x 35 bytes.
|
* and each of the chrominance planes would be 20 x 35 bytes.
|
||||||
*/
|
*/
|
||||||
public class YUVImage {
|
public class YUVImage {
|
||||||
|
|
||||||
@@ -75,7 +77,7 @@ public class YUVImage {
|
|||||||
* @param width width (in pixels) of the YUV image
|
* @param width width (in pixels) of the YUV image
|
||||||
*
|
*
|
||||||
* @param strides an array of integers, each specifying the number of bytes
|
* @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
|
* per row 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
|
* 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
|
* {@link YUVImage above}.) If <code>strides</code> is null, then the
|
||||||
* strides for all planes will be set to their respective plane widths. When
|
* strides for all planes will be set to their respective plane widths. When
|
||||||
@@ -92,22 +94,24 @@ public class YUVImage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new <code>YUVImage</code> instance backed by a unified image
|
* Create a new <code>YUVImage</code> instance backed by a unified buffer,
|
||||||
* buffer, and allocate memory for the image buffer.
|
* and allocate memory for the buffer.
|
||||||
*
|
*
|
||||||
* @param width width (in pixels) of the YUV image
|
* @param width width (in pixels) of the YUV image
|
||||||
*
|
*
|
||||||
* @param pad Each line of each plane in the YUV image buffer will be padded
|
* @param align row alignment (in bytes) of the YUV image (must be a power of
|
||||||
* to this number of bytes (must be a power of 2.)
|
* 2.) Setting this parameter to n specifies that each row in each plane of
|
||||||
|
* the YUV image will be padded to the nearest multiple of n bytes
|
||||||
|
* (1 = unpadded.)
|
||||||
*
|
*
|
||||||
* @param height height (in pixels) of the YUV image
|
* @param height height (in pixels) of the YUV image
|
||||||
*
|
*
|
||||||
* @param subsamp the level of chrominance subsampling to be used in the YUV
|
* @param subsamp the level of chrominance subsampling to be used in the YUV
|
||||||
* 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 align, int height, int subsamp) {
|
||||||
setBuf(new byte[TJ.bufSizeYUV(width, pad, height, subsamp)], width, pad,
|
setBuf(new byte[TJ.bufSizeYUV(width, align, height, subsamp)], width,
|
||||||
height, subsamp);
|
align, height, subsamp);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -117,8 +121,8 @@ public class YUVImage {
|
|||||||
* @param planes an array of buffers representing the Y, U (Cb), and V (Cr)
|
* @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
|
* image planes (or just the Y plane, if the image is grayscale.) These
|
||||||
* planes can be contiguous or non-contiguous in memory. Plane
|
* planes can be contiguous or non-contiguous in memory. Plane
|
||||||
* <code>i</code> should be at least <code>offsets[i] +
|
* <code>i</code> should be at least <code>offsets[i] + </code>
|
||||||
* {@link TJ#planeSizeYUV TJ.planeSizeYUV}(i, width, strides[i], height, subsamp)</code>
|
* {@link TJ#planeSizeYUV TJ.planeSizeYUV}<code>(i, width, strides[i], height, subsamp)</code>
|
||||||
* bytes in size.
|
* bytes in size.
|
||||||
*
|
*
|
||||||
* @param offsets If this <code>YUVImage</code> instance represents a
|
* @param offsets If this <code>YUVImage</code> instance represents a
|
||||||
@@ -130,11 +134,11 @@ public class YUVImage {
|
|||||||
* @param width width (in pixels) of the new YUV image (or subregion)
|
* @param width width (in pixels) of the new YUV image (or subregion)
|
||||||
*
|
*
|
||||||
* @param strides an array of integers, each specifying the number of bytes
|
* @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
|
* per row 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
|
* 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
|
* {@link YUVImage above}.) If <code>strides</code> is null, then the
|
||||||
* strides for all planes will be set to their respective plane widths. You
|
* 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
|
* can adjust the strides in order to add an arbitrary amount of row padding
|
||||||
* to each plane or to specify that this <code>YUVImage</code> instance is a
|
* 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
|
* 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.)
|
* be set to the plane width of plane <code>i</code> in the larger image.)
|
||||||
@@ -150,29 +154,30 @@ public class YUVImage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new <code>YUVImage</code> instance from an existing unified image
|
* Create a new <code>YUVImage</code> instance from an existing unified
|
||||||
* buffer.
|
* buffer.
|
||||||
*
|
*
|
||||||
* @param yuvImage image buffer that contains or will contain YUV planar
|
* @param yuvImage buffer that contains or will receive a unified planar YUV
|
||||||
* image data. Use {@link TJ#bufSizeYUV} to determine the minimum size for
|
* image. Use {@link TJ#bufSizeYUV} to determine the minimum size for this
|
||||||
* this buffer. The Y, U (Cb), and V (Cr) image planes are stored
|
* buffer. The Y, U (Cb), and V (Cr) image planes are stored sequentially in
|
||||||
* sequentially in the buffer (see {@link YUVImage above} for a description
|
* the buffer. (See {@link YUVImage above} for a description of the image
|
||||||
* of the image format.)
|
* format.)
|
||||||
*
|
*
|
||||||
* @param width width (in pixels) of the YUV image
|
* @param width width (in pixels) of the YUV image
|
||||||
*
|
*
|
||||||
* @param pad the line padding used in the YUV image buffer. For
|
* @param align row alignment (in bytes) of the YUV image (must be a power of
|
||||||
* instance, if each line in each plane of the buffer is padded to the
|
* 2.) Setting this parameter to n specifies that each row in each plane of
|
||||||
* nearest multiple of 4 bytes, then <code>pad</code> should be set to 4.
|
* the YUV image will be padded to the nearest multiple of n bytes
|
||||||
|
* (1 = unpadded.)
|
||||||
*
|
*
|
||||||
* @param height height (in pixels) of the YUV image
|
* @param height height (in pixels) of the YUV image
|
||||||
*
|
*
|
||||||
* @param subsamp the level of chrominance subsampling used in the YUV
|
* @param subsamp the level of chrominance subsampling used in the YUV
|
||||||
* image (one of {@link TJ#SAMP_444 TJ.SAMP_*})
|
* image (one of {@link TJ#SAMP_444 TJ.SAMP_*})
|
||||||
*/
|
*/
|
||||||
public YUVImage(byte[] yuvImage, int width, int pad, int height,
|
public YUVImage(byte[] yuvImage, int width, int align, int height,
|
||||||
int subsamp) {
|
int subsamp) {
|
||||||
setBuf(yuvImage, width, pad, height, subsamp);
|
setBuf(yuvImage, width, align, height, subsamp);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -181,8 +186,8 @@ public class YUVImage {
|
|||||||
* @param planes an array of buffers representing the Y, U (Cb), and V (Cr)
|
* @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
|
* image planes (or just the Y plane, if the image is grayscale.) These
|
||||||
* planes can be contiguous or non-contiguous in memory. Plane
|
* planes can be contiguous or non-contiguous in memory. Plane
|
||||||
* <code>i</code> should be at least <code>offsets[i] +
|
* <code>i</code> should be at least <code>offsets[i] + </code>
|
||||||
* {@link TJ#planeSizeYUV TJ.planeSizeYUV}(i, width, strides[i], height, subsamp)</code>
|
* {@link TJ#planeSizeYUV TJ.planeSizeYUV}<code>(i, width, strides[i], height, subsamp)</code>
|
||||||
* bytes in size.
|
* bytes in size.
|
||||||
*
|
*
|
||||||
* @param offsets If this <code>YUVImage</code> instance represents a
|
* @param offsets If this <code>YUVImage</code> instance represents a
|
||||||
@@ -194,12 +199,12 @@ public class YUVImage {
|
|||||||
* @param width width (in pixels) of the YUV image (or subregion)
|
* @param width width (in pixels) of the YUV image (or subregion)
|
||||||
*
|
*
|
||||||
* @param strides an array of integers, each specifying the number of bytes
|
* @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
|
* per row 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
|
* 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
|
* {@link YUVImage above}.) If <code>strides</code> is null, then the
|
||||||
* strides for all planes will be set to their respective plane widths. You
|
* 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
|
* can adjust the strides in order to add an arbitrary amount of row padding
|
||||||
* to each plane or to specify that this <code>YUVImage</code> image is a
|
* 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
|
* 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.)
|
* be set to the plane width of plane <code>i</code> in the larger image.)
|
||||||
*
|
*
|
||||||
@@ -263,32 +268,34 @@ public class YUVImage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Assign a unified image buffer to this <code>YUVImage</code> instance.
|
* Assign a unified buffer to this <code>YUVImage</code> instance.
|
||||||
*
|
*
|
||||||
* @param yuvImage image buffer that contains or will contain YUV planar
|
* @param yuvImage buffer that contains or will receive a unified planar YUV
|
||||||
* image data. Use {@link TJ#bufSizeYUV} to determine the minimum size for
|
* image. Use {@link TJ#bufSizeYUV} to determine the minimum size for this
|
||||||
* this buffer. The Y, U (Cb), and V (Cr) image planes are stored
|
* buffer. The Y, U (Cb), and V (Cr) image planes are stored sequentially in
|
||||||
* sequentially in the buffer (see {@link YUVImage above} for a description
|
* the buffer. (See {@link YUVImage above} for a description of the image
|
||||||
* of the image format.)
|
* format.)
|
||||||
*
|
*
|
||||||
* @param width width (in pixels) of the YUV image
|
* @param width width (in pixels) of the YUV image
|
||||||
*
|
*
|
||||||
* @param pad the line padding used in the YUV image buffer. For
|
* @param align row alignment (in bytes) of the YUV image (must be a power of
|
||||||
* instance, if each line in each plane of the buffer is padded to the
|
* 2.) Setting this parameter to n specifies that each row in each plane of
|
||||||
* nearest multiple of 4 bytes, then <code>pad</code> should be set to 4.
|
* the YUV image will be padded to the nearest multiple of n bytes
|
||||||
|
* (1 = unpadded.)
|
||||||
*
|
*
|
||||||
* @param height height (in pixels) of the YUV image
|
* @param height height (in pixels) of the YUV image
|
||||||
*
|
*
|
||||||
* @param subsamp the level of chrominance subsampling used in the YUV
|
* @param subsamp the level of chrominance subsampling used in the YUV
|
||||||
* image (one of {@link TJ#SAMP_444 TJ.SAMP_*})
|
* image (one of {@link TJ#SAMP_444 TJ.SAMP_*})
|
||||||
*/
|
*/
|
||||||
public void setBuf(byte[] yuvImage, int width, int pad, int height,
|
public void setBuf(byte[] yuvImage, int width, int align, int height,
|
||||||
int subsamp) {
|
int subsamp) {
|
||||||
if (yuvImage == null || width < 1 || pad < 1 || ((pad & (pad - 1)) != 0) ||
|
if (yuvImage == null || width < 1 || align < 1 ||
|
||||||
height < 1 || subsamp < 0 || subsamp >= TJ.NUMSAMP)
|
((align & (align - 1)) != 0) || height < 1 || subsamp < 0 ||
|
||||||
|
subsamp >= TJ.NUMSAMP)
|
||||||
throw new IllegalArgumentException("Invalid argument in YUVImage::setBuf()");
|
throw new IllegalArgumentException("Invalid argument in YUVImage::setBuf()");
|
||||||
if (yuvImage.length < TJ.bufSizeYUV(width, pad, height, subsamp))
|
if (yuvImage.length < TJ.bufSizeYUV(width, align, height, subsamp))
|
||||||
throw new IllegalArgumentException("YUV image buffer is not large enough");
|
throw new IllegalArgumentException("YUV buffer is not large enough");
|
||||||
|
|
||||||
int nc = (subsamp == TJ.SAMP_GRAY ? 1 : 3);
|
int nc = (subsamp == TJ.SAMP_GRAY ? 1 : 3);
|
||||||
byte[][] planes = new byte[nc][];
|
byte[][] planes = new byte[nc][];
|
||||||
@@ -296,9 +303,9 @@ public class YUVImage {
|
|||||||
int[] offsets = new int[nc];
|
int[] offsets = new int[nc];
|
||||||
|
|
||||||
planes[0] = yuvImage;
|
planes[0] = yuvImage;
|
||||||
strides[0] = pad(TJ.planeWidth(0, width, subsamp), pad);
|
strides[0] = pad(TJ.planeWidth(0, width, subsamp), align);
|
||||||
if (subsamp != TJ.SAMP_GRAY) {
|
if (subsamp != TJ.SAMP_GRAY) {
|
||||||
strides[1] = strides[2] = pad(TJ.planeWidth(1, width, subsamp), pad);
|
strides[1] = strides[2] = pad(TJ.planeWidth(1, width, subsamp), align);
|
||||||
planes[1] = planes[2] = yuvImage;
|
planes[1] = planes[2] = yuvImage;
|
||||||
offsets[1] = offsets[0] +
|
offsets[1] = offsets[0] +
|
||||||
strides[0] * TJ.planeHeight(0, height, subsamp);
|
strides[0] * TJ.planeHeight(0, height, subsamp);
|
||||||
@@ -306,7 +313,7 @@ public class YUVImage {
|
|||||||
strides[1] * TJ.planeHeight(1, height, subsamp);
|
strides[1] * TJ.planeHeight(1, height, subsamp);
|
||||||
}
|
}
|
||||||
|
|
||||||
yuvPad = pad;
|
yuvAlign = align;
|
||||||
setBuf(planes, offsets, width, strides, height, subsamp);
|
setBuf(planes, offsets, width, strides, height, subsamp);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -333,23 +340,23 @@ public class YUVImage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the line padding used in the YUV image buffer (if this image is
|
* Returns the row alignment (in bytes) of the YUV buffer (if this image is
|
||||||
* stored in a unified buffer rather than separate image planes.)
|
* stored in a unified buffer rather than separate image planes.)
|
||||||
*
|
*
|
||||||
* @return the line padding used in the YUV image buffer
|
* @return the row alignment of the YUV buffer
|
||||||
*/
|
*/
|
||||||
public int getPad() {
|
public int getPad() {
|
||||||
if (yuvPlanes == null)
|
if (yuvPlanes == null)
|
||||||
throw new IllegalStateException(NO_ASSOC_ERROR);
|
throw new IllegalStateException(NO_ASSOC_ERROR);
|
||||||
if (yuvPad < 1 || ((yuvPad & (yuvPad - 1)) != 0))
|
if (yuvAlign < 1 || ((yuvAlign & (yuvAlign - 1)) != 0))
|
||||||
throw new IllegalStateException("Image is not stored in a unified buffer");
|
throw new IllegalStateException("Image is not stored in a unified buffer");
|
||||||
return yuvPad;
|
return yuvAlign;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the number of bytes per line of each plane in the YUV image.
|
* Returns the number of bytes per row of each plane in the YUV image.
|
||||||
*
|
*
|
||||||
* @return the number of bytes per line of each plane in the YUV image
|
* @return the number of bytes per row of each plane in the YUV image
|
||||||
*/
|
*/
|
||||||
public int[] getStrides() {
|
public int[] getStrides() {
|
||||||
if (yuvStrides == null)
|
if (yuvStrides == null)
|
||||||
@@ -395,10 +402,10 @@ public class YUVImage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the YUV image buffer (if this image is stored in a unified
|
* Returns the YUV buffer (if this image is stored in a unified buffer rather
|
||||||
* buffer rather than separate image planes.)
|
* than separate image planes.)
|
||||||
*
|
*
|
||||||
* @return the YUV image buffer
|
* @return the YUV buffer
|
||||||
*/
|
*/
|
||||||
public byte[] getBuf() {
|
public byte[] getBuf() {
|
||||||
if (yuvPlanes == null || yuvSubsamp < 0 || yuvSubsamp >= TJ.NUMSAMP)
|
if (yuvPlanes == null || yuvSubsamp < 0 || yuvSubsamp >= TJ.NUMSAMP)
|
||||||
@@ -412,22 +419,22 @@ public class YUVImage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the size (in bytes) of the YUV image buffer (if this image is
|
* Returns the size (in bytes) of the YUV buffer (if this image is stored in
|
||||||
* stored in a unified buffer rather than separate image planes.)
|
* 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 buffer
|
||||||
*/
|
*/
|
||||||
public int getSize() {
|
public int getSize() {
|
||||||
if (yuvPlanes == null || yuvSubsamp < 0 || yuvSubsamp >= TJ.NUMSAMP)
|
if (yuvPlanes == null || yuvSubsamp < 0 || yuvSubsamp >= TJ.NUMSAMP)
|
||||||
throw new IllegalStateException(NO_ASSOC_ERROR);
|
throw new IllegalStateException(NO_ASSOC_ERROR);
|
||||||
int nc = (yuvSubsamp == TJ.SAMP_GRAY ? 1 : 3);
|
int nc = (yuvSubsamp == TJ.SAMP_GRAY ? 1 : 3);
|
||||||
if (yuvPad < 1)
|
if (yuvAlign < 1)
|
||||||
throw new IllegalStateException("Image is not stored in a unified buffer");
|
throw new IllegalStateException("Image is not stored in a unified buffer");
|
||||||
for (int i = 1; i < nc; i++) {
|
for (int i = 1; i < nc; i++) {
|
||||||
if (yuvPlanes[i] != yuvPlanes[0])
|
if (yuvPlanes[i] != yuvPlanes[0])
|
||||||
throw new IllegalStateException("Image is not stored in a unified buffer");
|
throw new IllegalStateException("Image is not stored in a unified buffer");
|
||||||
}
|
}
|
||||||
return TJ.bufSizeYUV(yuvWidth, yuvPad, yuvHeight, yuvSubsamp);
|
return TJ.bufSizeYUV(yuvWidth, yuvAlign, yuvHeight, yuvSubsamp);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static int pad(int v, int p) {
|
private static int pad(int v, int p) {
|
||||||
@@ -438,7 +445,7 @@ public class YUVImage {
|
|||||||
protected byte[][] yuvPlanes = null;
|
protected byte[][] yuvPlanes = null;
|
||||||
protected int[] yuvOffsets = null;
|
protected int[] yuvOffsets = null;
|
||||||
protected int[] yuvStrides = null;
|
protected int[] yuvStrides = null;
|
||||||
protected int yuvPad = 0;
|
protected int yuvAlign = 1;
|
||||||
protected int yuvWidth = 0;
|
protected int yuvWidth = 0;
|
||||||
protected int yuvHeight = 0;
|
protected int yuvHeight = 0;
|
||||||
protected int yuvSubsamp = -1;
|
protected int yuvSubsamp = -1;
|
||||||
|
|||||||
22
tjbench.c
22
tjbench.c
@@ -82,7 +82,7 @@ int tjErrorLine = -1, tjErrorCode = -1;
|
|||||||
}
|
}
|
||||||
|
|
||||||
int flags = TJFLAG_NOREALLOC, compOnly = 0, decompOnly = 0, doYUV = 0,
|
int flags = TJFLAG_NOREALLOC, compOnly = 0, decompOnly = 0, doYUV = 0,
|
||||||
quiet = 0, doTile = 0, pf = TJPF_BGR, yuvPad = 1, doWrite = 1;
|
quiet = 0, doTile = 0, pf = TJPF_BGR, yuvAlign = 1, doWrite = 1;
|
||||||
char *ext = "ppm";
|
char *ext = "ppm";
|
||||||
const char *pixFormatStr[TJ_NUMPF] = {
|
const char *pixFormatStr[TJ_NUMPF] = {
|
||||||
"RGB", "BGR", "RGBX", "BGRX", "XBGR", "XRGB", "GRAY", "", "", "", "", "CMYK"
|
"RGB", "BGR", "RGBX", "BGRX", "XBGR", "XRGB", "GRAY", "", "", "", "", "CMYK"
|
||||||
@@ -182,7 +182,7 @@ static int decomp(unsigned char *srcBuf, unsigned char **jpegBuf,
|
|||||||
if (doYUV) {
|
if (doYUV) {
|
||||||
int width = doTile ? tilew : scaledw;
|
int width = doTile ? tilew : scaledw;
|
||||||
int height = doTile ? tileh : scaledh;
|
int height = doTile ? tileh : scaledh;
|
||||||
unsigned long yuvSize = tjBufSizeYUV2(width, yuvPad, height, subsamp);
|
unsigned long yuvSize = tjBufSizeYUV2(width, yuvAlign, height, subsamp);
|
||||||
|
|
||||||
if (yuvSize == (unsigned long)-1)
|
if (yuvSize == (unsigned long)-1)
|
||||||
THROW_TJ("allocating YUV buffer");
|
THROW_TJ("allocating YUV buffer");
|
||||||
@@ -209,10 +209,10 @@ static int decomp(unsigned char *srcBuf, unsigned char **jpegBuf,
|
|||||||
double startDecode;
|
double startDecode;
|
||||||
|
|
||||||
if (tjDecompressToYUV2(handle, jpegBuf[tile], jpegSize[tile], yuvBuf,
|
if (tjDecompressToYUV2(handle, jpegBuf[tile], jpegSize[tile], yuvBuf,
|
||||||
width, yuvPad, height, flags) == -1)
|
width, yuvAlign, height, flags) == -1)
|
||||||
THROW_TJ("executing tjDecompressToYUV2()");
|
THROW_TJ("executing tjDecompressToYUV2()");
|
||||||
startDecode = getTime();
|
startDecode = getTime();
|
||||||
if (tjDecodeYUV(handle, yuvBuf, yuvPad, subsamp, dstPtr2, width,
|
if (tjDecodeYUV(handle, yuvBuf, yuvAlign, subsamp, dstPtr2, width,
|
||||||
pitch, height, pf, flags) == -1)
|
pitch, height, pf, flags) == -1)
|
||||||
THROW_TJ("executing tjDecodeYUV()");
|
THROW_TJ("executing tjDecodeYUV()");
|
||||||
if (iter >= 0) elapsedDecode += getTime() - startDecode;
|
if (iter >= 0) elapsedDecode += getTime() - startDecode;
|
||||||
@@ -380,7 +380,7 @@ static int fullTest(unsigned char *srcBuf, int w, int h, int subsamp,
|
|||||||
THROW_TJ("executing tjInitCompress()");
|
THROW_TJ("executing tjInitCompress()");
|
||||||
|
|
||||||
if (doYUV) {
|
if (doYUV) {
|
||||||
yuvSize = tjBufSizeYUV2(tilew, yuvPad, tileh, subsamp);
|
yuvSize = tjBufSizeYUV2(tilew, yuvAlign, tileh, subsamp);
|
||||||
if (yuvSize == (unsigned long)-1)
|
if (yuvSize == (unsigned long)-1)
|
||||||
THROW_TJ("allocating YUV buffer");
|
THROW_TJ("allocating YUV buffer");
|
||||||
if ((yuvBuf = (unsigned char *)malloc(yuvSize)) == NULL)
|
if ((yuvBuf = (unsigned char *)malloc(yuvSize)) == NULL)
|
||||||
@@ -407,10 +407,10 @@ static int fullTest(unsigned char *srcBuf, int w, int h, int subsamp,
|
|||||||
double startEncode = getTime();
|
double startEncode = getTime();
|
||||||
|
|
||||||
if (tjEncodeYUV3(handle, srcPtr2, width, pitch, height, pf, yuvBuf,
|
if (tjEncodeYUV3(handle, srcPtr2, width, pitch, height, pf, yuvBuf,
|
||||||
yuvPad, subsamp, flags) == -1)
|
yuvAlign, subsamp, flags) == -1)
|
||||||
THROW_TJ("executing tjEncodeYUV3()");
|
THROW_TJ("executing tjEncodeYUV3()");
|
||||||
if (iter >= 0) elapsedEncode += getTime() - startEncode;
|
if (iter >= 0) elapsedEncode += getTime() - startEncode;
|
||||||
if (tjCompressFromYUV(handle, yuvBuf, width, yuvPad, height,
|
if (tjCompressFromYUV(handle, yuvBuf, width, yuvAlign, height,
|
||||||
subsamp, &jpegBuf[tile], &jpegSize[tile],
|
subsamp, &jpegBuf[tile], &jpegSize[tile],
|
||||||
jpegQual, flags) == -1)
|
jpegQual, flags) == -1)
|
||||||
THROW_TJ("executing tjCompressFromYUV()");
|
THROW_TJ("executing tjCompressFromYUV()");
|
||||||
@@ -779,8 +779,8 @@ static void usage(char *progName)
|
|||||||
printf("-quiet = Output results in tabular rather than verbose format\n");
|
printf("-quiet = Output results in tabular rather than verbose format\n");
|
||||||
printf("-yuv = Test YUV encoding/decoding functions\n");
|
printf("-yuv = Test YUV encoding/decoding functions\n");
|
||||||
printf("-yuvpad <p> = If testing YUV encoding/decoding, this specifies the number of\n");
|
printf("-yuvpad <p> = If testing YUV encoding/decoding, this specifies the number of\n");
|
||||||
printf(" bytes to which each row of each plane in the intermediate YUV image is\n");
|
printf(" bytes by which each row of each plane in the intermediate YUV image is\n");
|
||||||
printf(" padded (default = 1)\n");
|
printf(" evenly divisible (default = 1)\n");
|
||||||
printf("-scale M/N = Scale down the width/height of the decompressed JPEG image by a\n");
|
printf("-scale M/N = Scale down the width/height of the decompressed JPEG image by a\n");
|
||||||
printf(" factor of M/N (M/N = ");
|
printf(" factor of M/N (M/N = ");
|
||||||
for (i = 0; i < nsf; i++) {
|
for (i = 0; i < nsf; i++) {
|
||||||
@@ -940,12 +940,12 @@ int main(int argc, char *argv[])
|
|||||||
else if (!strcasecmp(argv[i], "-bmp"))
|
else if (!strcasecmp(argv[i], "-bmp"))
|
||||||
ext = "bmp";
|
ext = "bmp";
|
||||||
else if (!strcasecmp(argv[i], "-yuv")) {
|
else if (!strcasecmp(argv[i], "-yuv")) {
|
||||||
printf("Testing YUV planar encoding/decoding\n\n");
|
printf("Testing planar YUV encoding/decoding\n\n");
|
||||||
doYUV = 1;
|
doYUV = 1;
|
||||||
} else if (!strcasecmp(argv[i], "-yuvpad") && i < argc - 1) {
|
} else if (!strcasecmp(argv[i], "-yuvpad") && i < argc - 1) {
|
||||||
int tempi = atoi(argv[++i]);
|
int tempi = atoi(argv[++i]);
|
||||||
|
|
||||||
if (tempi >= 1) yuvPad = tempi;
|
if (tempi >= 1) yuvAlign = tempi;
|
||||||
} else if (!strcasecmp(argv[i], "-subsamp") && i < argc - 1) {
|
} else if (!strcasecmp(argv[i], "-subsamp") && i < argc - 1) {
|
||||||
i++;
|
i++;
|
||||||
if (toupper(argv[i][0]) == 'G') subsamp = TJSAMP_GRAY;
|
if (toupper(argv[i][0]) == 'G') subsamp = TJSAMP_GRAY;
|
||||||
|
|||||||
36
tjunittest.c
36
tjunittest.c
@@ -57,7 +57,7 @@ static void usage(char *progName)
|
|||||||
printf("Options:\n");
|
printf("Options:\n");
|
||||||
printf("-yuv = test YUV encoding/decoding support\n");
|
printf("-yuv = test YUV encoding/decoding support\n");
|
||||||
printf("-noyuvpad = do not pad each line of each Y, U, and V plane to the nearest\n");
|
printf("-noyuvpad = do not pad each line of each Y, U, and V plane to the nearest\n");
|
||||||
printf(" 4-byte boundary\n");
|
printf(" multiple of 4 bytes\n");
|
||||||
printf("-alloc = test automatic buffer allocation\n");
|
printf("-alloc = test automatic buffer allocation\n");
|
||||||
printf("-bmp = tjLoadImage()/tjSaveImage() unit test\n\n");
|
printf("-bmp = tjLoadImage()/tjSaveImage() unit test\n\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
@@ -95,7 +95,7 @@ const int _4byteFormats[] = {
|
|||||||
const int _onlyGray[] = { TJPF_GRAY };
|
const int _onlyGray[] = { TJPF_GRAY };
|
||||||
const int _onlyRGB[] = { TJPF_RGB };
|
const int _onlyRGB[] = { TJPF_RGB };
|
||||||
|
|
||||||
int doYUV = 0, alloc = 0, pad = 4;
|
int doYUV = 0, alloc = 0, yuvAlign = 4;
|
||||||
|
|
||||||
int exitStatus = 0;
|
int exitStatus = 0;
|
||||||
#define BAILOUT() { exitStatus = -1; goto bailout; }
|
#define BAILOUT() { exitStatus = -1; goto bailout; }
|
||||||
@@ -282,7 +282,7 @@ static int checkBufYUV(unsigned char *buf, int w, int h, int subsamp,
|
|||||||
int hsf = tjMCUWidth[subsamp] / 8, vsf = tjMCUHeight[subsamp] / 8;
|
int hsf = tjMCUWidth[subsamp] / 8, vsf = tjMCUHeight[subsamp] / 8;
|
||||||
int pw = PAD(w, hsf), ph = PAD(h, vsf);
|
int pw = PAD(w, hsf), ph = PAD(h, vsf);
|
||||||
int cw = pw / hsf, ch = ph / vsf;
|
int cw = pw / hsf, ch = ph / vsf;
|
||||||
int ypitch = PAD(pw, pad), uvpitch = PAD(cw, pad);
|
int ypitch = PAD(pw, yuvAlign), uvpitch = PAD(cw, yuvAlign);
|
||||||
int retval = 1;
|
int retval = 1;
|
||||||
int halfway = 16 * sf.num / sf.denom;
|
int halfway = 16 * sf.num / sf.denom;
|
||||||
int blocksize = 8 * sf.num / sf.denom;
|
int blocksize = 8 * sf.num / sf.denom;
|
||||||
@@ -381,7 +381,7 @@ static void compTest(tjhandle handle, unsigned char **dstBuf,
|
|||||||
|
|
||||||
if (!alloc) flags |= TJFLAG_NOREALLOC;
|
if (!alloc) flags |= TJFLAG_NOREALLOC;
|
||||||
if (doYUV) {
|
if (doYUV) {
|
||||||
unsigned long yuvSize = tjBufSizeYUV2(w, pad, h, subsamp);
|
unsigned long yuvSize = tjBufSizeYUV2(w, yuvAlign, h, subsamp);
|
||||||
tjscalingfactor sf = { 1, 1 };
|
tjscalingfactor sf = { 1, 1 };
|
||||||
tjhandle handle2 = tjInitCompress();
|
tjhandle handle2 = tjInitCompress();
|
||||||
|
|
||||||
@@ -392,15 +392,15 @@ static void compTest(tjhandle handle, unsigned char **dstBuf,
|
|||||||
memset(yuvBuf, 0, yuvSize);
|
memset(yuvBuf, 0, yuvSize);
|
||||||
|
|
||||||
printf("%s %s -> YUV %s ... ", pfStr, buStrLong, subNameLong[subsamp]);
|
printf("%s %s -> YUV %s ... ", pfStr, buStrLong, subNameLong[subsamp]);
|
||||||
TRY_TJ(tjEncodeYUV3(handle2, srcBuf, w, 0, h, pf, yuvBuf, pad, subsamp,
|
TRY_TJ(tjEncodeYUV3(handle2, srcBuf, w, 0, h, pf, yuvBuf, yuvAlign,
|
||||||
flags));
|
subsamp, flags));
|
||||||
tjDestroy(handle2);
|
tjDestroy(handle2);
|
||||||
if (checkBufYUV(yuvBuf, w, h, subsamp, sf)) printf("Passed.\n");
|
if (checkBufYUV(yuvBuf, w, h, subsamp, sf)) printf("Passed.\n");
|
||||||
else printf("FAILED!\n");
|
else printf("FAILED!\n");
|
||||||
|
|
||||||
printf("YUV %s %s -> JPEG Q%d ... ", subNameLong[subsamp], buStrLong,
|
printf("YUV %s %s -> JPEG Q%d ... ", subNameLong[subsamp], buStrLong,
|
||||||
jpegQual);
|
jpegQual);
|
||||||
TRY_TJ(tjCompressFromYUV(handle, yuvBuf, w, pad, h, subsamp, dstBuf,
|
TRY_TJ(tjCompressFromYUV(handle, yuvBuf, w, yuvAlign, h, subsamp, dstBuf,
|
||||||
dstSize, jpegQual, flags));
|
dstSize, jpegQual, flags));
|
||||||
} else {
|
} else {
|
||||||
printf("%s %s -> %s Q%d ... ", pfStr, buStrLong, subNameLong[subsamp],
|
printf("%s %s -> %s Q%d ... ", pfStr, buStrLong, subNameLong[subsamp],
|
||||||
@@ -442,7 +442,7 @@ static void _decompTest(tjhandle handle, unsigned char *jpegBuf,
|
|||||||
memset(dstBuf, 0, dstSize);
|
memset(dstBuf, 0, dstSize);
|
||||||
|
|
||||||
if (doYUV) {
|
if (doYUV) {
|
||||||
unsigned long yuvSize = tjBufSizeYUV2(scaledWidth, pad, scaledHeight,
|
unsigned long yuvSize = tjBufSizeYUV2(scaledWidth, yuvAlign, scaledHeight,
|
||||||
subsamp);
|
subsamp);
|
||||||
tjhandle handle2 = tjInitDecompress();
|
tjhandle handle2 = tjInitDecompress();
|
||||||
|
|
||||||
@@ -457,15 +457,15 @@ static void _decompTest(tjhandle handle, unsigned char *jpegBuf,
|
|||||||
printf("%d/%d ... ", sf.num, sf.denom);
|
printf("%d/%d ... ", sf.num, sf.denom);
|
||||||
else printf("... ");
|
else printf("... ");
|
||||||
TRY_TJ(tjDecompressToYUV2(handle, jpegBuf, jpegSize, yuvBuf, scaledWidth,
|
TRY_TJ(tjDecompressToYUV2(handle, jpegBuf, jpegSize, yuvBuf, scaledWidth,
|
||||||
pad, scaledHeight, flags));
|
yuvAlign, scaledHeight, flags));
|
||||||
if (checkBufYUV(yuvBuf, scaledWidth, scaledHeight, subsamp, sf))
|
if (checkBufYUV(yuvBuf, scaledWidth, scaledHeight, subsamp, sf))
|
||||||
printf("Passed.\n");
|
printf("Passed.\n");
|
||||||
else printf("FAILED!\n");
|
else printf("FAILED!\n");
|
||||||
|
|
||||||
printf("YUV %s -> %s %s ... ", subNameLong[subsamp], pixFormatStr[pf],
|
printf("YUV %s -> %s %s ... ", subNameLong[subsamp], pixFormatStr[pf],
|
||||||
(flags & TJFLAG_BOTTOMUP) ? "Bottom-Up" : "Top-Down ");
|
(flags & TJFLAG_BOTTOMUP) ? "Bottom-Up" : "Top-Down ");
|
||||||
TRY_TJ(tjDecodeYUV(handle2, yuvBuf, pad, subsamp, dstBuf, scaledWidth, 0,
|
TRY_TJ(tjDecodeYUV(handle2, yuvBuf, yuvAlign, subsamp, dstBuf, scaledWidth,
|
||||||
scaledHeight, pf, flags));
|
0, scaledHeight, pf, flags));
|
||||||
tjDestroy(handle2);
|
tjDestroy(handle2);
|
||||||
} else {
|
} else {
|
||||||
printf("JPEG -> %s %s ", pixFormatStr[pf],
|
printf("JPEG -> %s %s ", pixFormatStr[pf],
|
||||||
@@ -618,7 +618,7 @@ static void bufSizeTest(void)
|
|||||||
if ((srcBuf = (unsigned char *)malloc(w * h * 4)) == NULL)
|
if ((srcBuf = (unsigned char *)malloc(w * h * 4)) == NULL)
|
||||||
THROW("Memory allocation failure");
|
THROW("Memory allocation failure");
|
||||||
if (!alloc || doYUV) {
|
if (!alloc || doYUV) {
|
||||||
if (doYUV) dstSize = tjBufSizeYUV2(w, pad, h, subsamp);
|
if (doYUV) dstSize = tjBufSizeYUV2(w, yuvAlign, h, subsamp);
|
||||||
else dstSize = tjBufSize(w, h, subsamp);
|
else dstSize = tjBufSize(w, h, subsamp);
|
||||||
if ((dstBuf = (unsigned char *)tjAlloc(dstSize)) == NULL)
|
if ((dstBuf = (unsigned char *)tjAlloc(dstSize)) == NULL)
|
||||||
THROW("Memory allocation failure");
|
THROW("Memory allocation failure");
|
||||||
@@ -630,8 +630,8 @@ static void bufSizeTest(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (doYUV) {
|
if (doYUV) {
|
||||||
TRY_TJ(tjEncodeYUV3(handle, srcBuf, w, 0, h, TJPF_BGRX, dstBuf, pad,
|
TRY_TJ(tjEncodeYUV3(handle, srcBuf, w, 0, h, TJPF_BGRX, dstBuf,
|
||||||
subsamp, 0));
|
yuvAlign, subsamp, 0));
|
||||||
} else {
|
} else {
|
||||||
TRY_TJ(tjCompress2(handle, srcBuf, w, 0, h, TJPF_BGRX, &dstBuf,
|
TRY_TJ(tjCompress2(handle, srcBuf, w, 0, h, TJPF_BGRX, &dstBuf,
|
||||||
&dstSize, subsamp, 100,
|
&dstSize, subsamp, 100,
|
||||||
@@ -645,7 +645,7 @@ static void bufSizeTest(void)
|
|||||||
if ((srcBuf = (unsigned char *)malloc(h * w * 4)) == NULL)
|
if ((srcBuf = (unsigned char *)malloc(h * w * 4)) == NULL)
|
||||||
THROW("Memory allocation failure");
|
THROW("Memory allocation failure");
|
||||||
if (!alloc || doYUV) {
|
if (!alloc || doYUV) {
|
||||||
if (doYUV) dstSize = tjBufSizeYUV2(h, pad, w, subsamp);
|
if (doYUV) dstSize = tjBufSizeYUV2(h, yuvAlign, w, subsamp);
|
||||||
else dstSize = tjBufSize(h, w, subsamp);
|
else dstSize = tjBufSize(h, w, subsamp);
|
||||||
if ((dstBuf = (unsigned char *)tjAlloc(dstSize)) == NULL)
|
if ((dstBuf = (unsigned char *)tjAlloc(dstSize)) == NULL)
|
||||||
THROW("Memory allocation failure");
|
THROW("Memory allocation failure");
|
||||||
@@ -657,8 +657,8 @@ static void bufSizeTest(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (doYUV) {
|
if (doYUV) {
|
||||||
TRY_TJ(tjEncodeYUV3(handle, srcBuf, h, 0, w, TJPF_BGRX, dstBuf, pad,
|
TRY_TJ(tjEncodeYUV3(handle, srcBuf, h, 0, w, TJPF_BGRX, dstBuf,
|
||||||
subsamp, 0));
|
yuvAlign, subsamp, 0));
|
||||||
} else {
|
} else {
|
||||||
TRY_TJ(tjCompress2(handle, srcBuf, h, 0, w, TJPF_BGRX, &dstBuf,
|
TRY_TJ(tjCompress2(handle, srcBuf, h, 0, w, TJPF_BGRX, &dstBuf,
|
||||||
&dstSize, subsamp, 100,
|
&dstSize, subsamp, 100,
|
||||||
@@ -902,7 +902,7 @@ int main(int argc, char *argv[])
|
|||||||
if (argc > 1) {
|
if (argc > 1) {
|
||||||
for (i = 1; i < argc; i++) {
|
for (i = 1; i < argc; i++) {
|
||||||
if (!strcasecmp(argv[i], "-yuv")) doYUV = 1;
|
if (!strcasecmp(argv[i], "-yuv")) doYUV = 1;
|
||||||
else if (!strcasecmp(argv[i], "-noyuvpad")) pad = 1;
|
else if (!strcasecmp(argv[i], "-noyuvpad")) yuvAlign = 1;
|
||||||
else if (!strcasecmp(argv[i], "-alloc")) alloc = 1;
|
else if (!strcasecmp(argv[i], "-alloc")) alloc = 1;
|
||||||
else if (!strcasecmp(argv[i], "-bmp")) return bmpTest();
|
else if (!strcasecmp(argv[i], "-bmp")) return bmpTest();
|
||||||
else usage(argv[0]);
|
else usage(argv[0]);
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C)2011-2022 D. R. Commander. All Rights Reserved.
|
* Copyright (C)2011-2023 D. R. Commander. All Rights Reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
@@ -142,9 +142,9 @@ bailout:
|
|||||||
|
|
||||||
/* TurboJPEG 1.4.x: TJ::bufSizeYUV() */
|
/* TurboJPEG 1.4.x: TJ::bufSizeYUV() */
|
||||||
JNIEXPORT jint JNICALL Java_org_libjpegturbo_turbojpeg_TJ_bufSizeYUV__IIII
|
JNIEXPORT jint JNICALL Java_org_libjpegturbo_turbojpeg_TJ_bufSizeYUV__IIII
|
||||||
(JNIEnv *env, jclass cls, jint width, jint pad, jint height, jint subsamp)
|
(JNIEnv *env, jclass cls, jint width, jint align, jint height, jint subsamp)
|
||||||
{
|
{
|
||||||
jint retval = (jint)tjBufSizeYUV2(width, pad, height, subsamp);
|
jint retval = (jint)tjBufSizeYUV2(width, align, height, subsamp);
|
||||||
|
|
||||||
if (retval == -1) THROW_ARG(tjGetErrorStr());
|
if (retval == -1) THROW_ARG(tjGetErrorStr());
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
TURBOJPEG_1.0
|
TURBOJPEG_1.0
|
||||||
{
|
{
|
||||||
global:
|
global:
|
||||||
tjInitCompress;
|
|
||||||
tjCompress;
|
|
||||||
TJBUFSIZE;
|
TJBUFSIZE;
|
||||||
tjInitDecompress;
|
tjCompress;
|
||||||
tjDecompressHeader;
|
|
||||||
tjDecompress;
|
tjDecompress;
|
||||||
|
tjDecompressHeader;
|
||||||
tjDestroy;
|
tjDestroy;
|
||||||
tjGetErrorStr;
|
tjGetErrorStr;
|
||||||
|
tjInitCompress;
|
||||||
|
tjInitDecompress;
|
||||||
local:
|
local:
|
||||||
*;
|
*;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
TURBOJPEG_1.0
|
TURBOJPEG_1.0
|
||||||
{
|
{
|
||||||
global:
|
global:
|
||||||
tjInitCompress;
|
|
||||||
tjCompress;
|
|
||||||
TJBUFSIZE;
|
TJBUFSIZE;
|
||||||
tjInitDecompress;
|
tjCompress;
|
||||||
tjDecompressHeader;
|
|
||||||
tjDecompress;
|
tjDecompress;
|
||||||
|
tjDecompressHeader;
|
||||||
tjDestroy;
|
tjDestroy;
|
||||||
tjGetErrorStr;
|
tjGetErrorStr;
|
||||||
|
tjInitCompress;
|
||||||
|
tjInitDecompress;
|
||||||
local:
|
local:
|
||||||
*;
|
*;
|
||||||
};
|
};
|
||||||
|
|||||||
102
turbojpeg.c
102
turbojpeg.c
@@ -97,7 +97,7 @@ static void my_emit_message(j_common_ptr cinfo, int msg_level)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Global structures, macros, etc. */
|
/********************** Global structures, macros, etc. **********************/
|
||||||
|
|
||||||
enum { COMPRESS = 1, DECOMPRESS = 2 };
|
enum { COMPRESS = 1, DECOMPRESS = 2 };
|
||||||
|
|
||||||
@@ -425,8 +425,9 @@ static int getSubsamp(j_decompress_ptr dinfo)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* General API functions */
|
/*************************** General API functions ***************************/
|
||||||
|
|
||||||
|
/* TurboJPEG 2.0+ */
|
||||||
DLLEXPORT char *tjGetErrorStr2(tjhandle handle)
|
DLLEXPORT char *tjGetErrorStr2(tjhandle handle)
|
||||||
{
|
{
|
||||||
tjinstance *this = (tjinstance *)handle;
|
tjinstance *this = (tjinstance *)handle;
|
||||||
@@ -439,12 +440,14 @@ DLLEXPORT char *tjGetErrorStr2(tjhandle handle)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* TurboJPEG 1.0+ */
|
||||||
DLLEXPORT char *tjGetErrorStr(void)
|
DLLEXPORT char *tjGetErrorStr(void)
|
||||||
{
|
{
|
||||||
return errStr;
|
return errStr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* TurboJPEG 2.0+ */
|
||||||
DLLEXPORT int tjGetErrorCode(tjhandle handle)
|
DLLEXPORT int tjGetErrorCode(tjhandle handle)
|
||||||
{
|
{
|
||||||
tjinstance *this = (tjinstance *)handle;
|
tjinstance *this = (tjinstance *)handle;
|
||||||
@@ -454,6 +457,7 @@ DLLEXPORT int tjGetErrorCode(tjhandle handle)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* TurboJPEG 1.0+ */
|
||||||
DLLEXPORT int tjDestroy(tjhandle handle)
|
DLLEXPORT int tjDestroy(tjhandle handle)
|
||||||
{
|
{
|
||||||
GET_INSTANCE(handle);
|
GET_INSTANCE(handle);
|
||||||
@@ -471,19 +475,21 @@ DLLEXPORT int tjDestroy(tjhandle handle)
|
|||||||
with turbojpeg.dll for compatibility reasons. However, these functions
|
with turbojpeg.dll for compatibility reasons. However, these functions
|
||||||
can potentially be used for other purposes by different implementations. */
|
can potentially be used for other purposes by different implementations. */
|
||||||
|
|
||||||
|
/* TurboJPEG 1.2+ */
|
||||||
DLLEXPORT void tjFree(unsigned char *buf)
|
DLLEXPORT void tjFree(unsigned char *buf)
|
||||||
{
|
{
|
||||||
free(buf);
|
free(buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* TurboJPEG 1.2+ */
|
||||||
DLLEXPORT unsigned char *tjAlloc(int bytes)
|
DLLEXPORT unsigned char *tjAlloc(int bytes)
|
||||||
{
|
{
|
||||||
return (unsigned char *)malloc(bytes);
|
return (unsigned char *)malloc(bytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Compressor */
|
/******************************** Compressor *********************************/
|
||||||
|
|
||||||
static tjhandle _tjInitCompress(tjinstance *this)
|
static tjhandle _tjInitCompress(tjinstance *this)
|
||||||
{
|
{
|
||||||
@@ -515,6 +521,7 @@ static tjhandle _tjInitCompress(tjinstance *this)
|
|||||||
return (tjhandle)this;
|
return (tjhandle)this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* TurboJPEG 1.0+ */
|
||||||
DLLEXPORT tjhandle tjInitCompress(void)
|
DLLEXPORT tjhandle tjInitCompress(void)
|
||||||
{
|
{
|
||||||
tjinstance *this = NULL;
|
tjinstance *this = NULL;
|
||||||
@@ -530,6 +537,7 @@ DLLEXPORT tjhandle tjInitCompress(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* TurboJPEG 1.2+ */
|
||||||
DLLEXPORT unsigned long tjBufSize(int width, int height, int jpegSubsamp)
|
DLLEXPORT unsigned long tjBufSize(int width, int height, int jpegSubsamp)
|
||||||
{
|
{
|
||||||
unsigned long long retval = 0;
|
unsigned long long retval = 0;
|
||||||
@@ -552,6 +560,7 @@ bailout:
|
|||||||
return (unsigned long)retval;
|
return (unsigned long)retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* TurboJPEG 1.0+ */
|
||||||
DLLEXPORT unsigned long TJBUFSIZE(int width, int height)
|
DLLEXPORT unsigned long TJBUFSIZE(int width, int height)
|
||||||
{
|
{
|
||||||
unsigned long long retval = 0;
|
unsigned long long retval = 0;
|
||||||
@@ -571,19 +580,20 @@ bailout:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
DLLEXPORT unsigned long tjBufSizeYUV2(int width, int pad, int height,
|
/* TurboJPEG 1.4+ */
|
||||||
|
DLLEXPORT unsigned long tjBufSizeYUV2(int width, int align, int height,
|
||||||
int subsamp)
|
int subsamp)
|
||||||
{
|
{
|
||||||
unsigned long long retval = 0;
|
unsigned long long retval = 0;
|
||||||
int nc, i;
|
int nc, i;
|
||||||
|
|
||||||
if (pad < 1 || !IS_POW2(pad) || subsamp < 0 || subsamp >= TJ_NUMSAMP)
|
if (align < 1 || !IS_POW2(align) || subsamp < 0 || subsamp >= TJ_NUMSAMP)
|
||||||
THROWG("tjBufSizeYUV2(): Invalid argument");
|
THROWG("tjBufSizeYUV2(): Invalid argument");
|
||||||
|
|
||||||
nc = (subsamp == TJSAMP_GRAY ? 1 : 3);
|
nc = (subsamp == TJSAMP_GRAY ? 1 : 3);
|
||||||
for (i = 0; i < nc; i++) {
|
for (i = 0; i < nc; i++) {
|
||||||
int pw = tjPlaneWidth(i, width, subsamp);
|
int pw = tjPlaneWidth(i, width, subsamp);
|
||||||
int stride = PAD(pw, pad);
|
int stride = PAD(pw, align);
|
||||||
int ph = tjPlaneHeight(i, height, subsamp);
|
int ph = tjPlaneHeight(i, height, subsamp);
|
||||||
|
|
||||||
if (pw < 0 || ph < 0) return -1;
|
if (pw < 0 || ph < 0) return -1;
|
||||||
@@ -596,17 +606,20 @@ bailout:
|
|||||||
return (unsigned long)retval;
|
return (unsigned long)retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* TurboJPEG 1.2+ */
|
||||||
DLLEXPORT unsigned long tjBufSizeYUV(int width, int height, int subsamp)
|
DLLEXPORT unsigned long tjBufSizeYUV(int width, int height, int subsamp)
|
||||||
{
|
{
|
||||||
return tjBufSizeYUV2(width, 4, height, subsamp);
|
return tjBufSizeYUV2(width, 4, height, subsamp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* TurboJPEG 1.1+ */
|
||||||
DLLEXPORT unsigned long TJBUFSIZEYUV(int width, int height, int subsamp)
|
DLLEXPORT unsigned long TJBUFSIZEYUV(int width, int height, int subsamp)
|
||||||
{
|
{
|
||||||
return tjBufSizeYUV(width, height, subsamp);
|
return tjBufSizeYUV(width, height, subsamp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* TurboJPEG 1.4+ */
|
||||||
DLLEXPORT int tjPlaneWidth(int componentID, int width, int subsamp)
|
DLLEXPORT int tjPlaneWidth(int componentID, int width, int subsamp)
|
||||||
{
|
{
|
||||||
int pw, nc, retval = 0;
|
int pw, nc, retval = 0;
|
||||||
@@ -628,6 +641,7 @@ bailout:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* TurboJPEG 1.4+ */
|
||||||
DLLEXPORT int tjPlaneHeight(int componentID, int height, int subsamp)
|
DLLEXPORT int tjPlaneHeight(int componentID, int height, int subsamp)
|
||||||
{
|
{
|
||||||
int ph, nc, retval = 0;
|
int ph, nc, retval = 0;
|
||||||
@@ -649,6 +663,7 @@ bailout:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* TurboJPEG 1.4+ */
|
||||||
DLLEXPORT unsigned long tjPlaneSizeYUV(int componentID, int width, int stride,
|
DLLEXPORT unsigned long tjPlaneSizeYUV(int componentID, int width, int stride,
|
||||||
int height, int subsamp)
|
int height, int subsamp)
|
||||||
{
|
{
|
||||||
@@ -674,6 +689,7 @@ bailout:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* TurboJPEG 1.2+ */
|
||||||
DLLEXPORT int tjCompress2(tjhandle handle, const unsigned char *srcBuf,
|
DLLEXPORT int tjCompress2(tjhandle handle, const unsigned char *srcBuf,
|
||||||
int width, int pitch, int height, int pixelFormat,
|
int width, int pitch, int height, int pixelFormat,
|
||||||
unsigned char **jpegBuf, unsigned long *jpegSize,
|
unsigned char **jpegBuf, unsigned long *jpegSize,
|
||||||
@@ -742,6 +758,7 @@ bailout:
|
|||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* TurboJPEG 1.0+ */
|
||||||
DLLEXPORT int tjCompress(tjhandle handle, unsigned char *srcBuf, int width,
|
DLLEXPORT int tjCompress(tjhandle handle, unsigned char *srcBuf, int width,
|
||||||
int pitch, int height, int pixelSize,
|
int pitch, int height, int pixelSize,
|
||||||
unsigned char *jpegBuf, unsigned long *jpegSize,
|
unsigned char *jpegBuf, unsigned long *jpegSize,
|
||||||
@@ -765,6 +782,7 @@ DLLEXPORT int tjCompress(tjhandle handle, unsigned char *srcBuf, int width,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* TurboJPEG 1.4+ */
|
||||||
DLLEXPORT int tjEncodeYUVPlanes(tjhandle handle, const unsigned char *srcBuf,
|
DLLEXPORT int tjEncodeYUVPlanes(tjhandle handle, const unsigned char *srcBuf,
|
||||||
int width, int pitch, int height,
|
int width, int pitch, int height,
|
||||||
int pixelFormat, unsigned char **dstPlanes,
|
int pixelFormat, unsigned char **dstPlanes,
|
||||||
@@ -797,7 +815,7 @@ DLLEXPORT int tjEncodeYUVPlanes(tjhandle handle, const unsigned char *srcBuf,
|
|||||||
THROW("tjEncodeYUVPlanes(): Invalid argument");
|
THROW("tjEncodeYUVPlanes(): Invalid argument");
|
||||||
|
|
||||||
if (pixelFormat == TJPF_CMYK)
|
if (pixelFormat == TJPF_CMYK)
|
||||||
THROW("tjEncodeYUVPlanes(): Cannot generate YUV images from CMYK pixels");
|
THROW("tjEncodeYUVPlanes(): Cannot generate YUV images from packed-pixel CMYK images");
|
||||||
|
|
||||||
if (pitch == 0) pitch = width * tjPixelSize[pixelFormat];
|
if (pitch == 0) pitch = width * tjPixelSize[pixelFormat];
|
||||||
|
|
||||||
@@ -923,9 +941,10 @@ bailout:
|
|||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* TurboJPEG 1.4+ */
|
||||||
DLLEXPORT int tjEncodeYUV3(tjhandle handle, const unsigned char *srcBuf,
|
DLLEXPORT int tjEncodeYUV3(tjhandle handle, const unsigned char *srcBuf,
|
||||||
int width, int pitch, int height, int pixelFormat,
|
int width, int pitch, int height, int pixelFormat,
|
||||||
unsigned char *dstBuf, int pad, int subsamp,
|
unsigned char *dstBuf, int align, int subsamp,
|
||||||
int flags)
|
int flags)
|
||||||
{
|
{
|
||||||
unsigned char *dstPlanes[3];
|
unsigned char *dstPlanes[3];
|
||||||
@@ -935,14 +954,14 @@ DLLEXPORT int tjEncodeYUV3(tjhandle handle, const unsigned char *srcBuf,
|
|||||||
if (!this) THROWG("tjEncodeYUV3(): Invalid handle");
|
if (!this) THROWG("tjEncodeYUV3(): Invalid handle");
|
||||||
this->isInstanceError = FALSE;
|
this->isInstanceError = FALSE;
|
||||||
|
|
||||||
if (width <= 0 || height <= 0 || dstBuf == NULL || pad < 1 ||
|
if (width <= 0 || height <= 0 || dstBuf == NULL || align < 1 ||
|
||||||
!IS_POW2(pad) || subsamp < 0 || subsamp >= TJ_NUMSAMP)
|
!IS_POW2(align) || subsamp < 0 || subsamp >= TJ_NUMSAMP)
|
||||||
THROW("tjEncodeYUV3(): Invalid argument");
|
THROW("tjEncodeYUV3(): Invalid argument");
|
||||||
|
|
||||||
pw0 = tjPlaneWidth(0, width, subsamp);
|
pw0 = tjPlaneWidth(0, width, subsamp);
|
||||||
ph0 = tjPlaneHeight(0, height, subsamp);
|
ph0 = tjPlaneHeight(0, height, subsamp);
|
||||||
dstPlanes[0] = dstBuf;
|
dstPlanes[0] = dstBuf;
|
||||||
strides[0] = PAD(pw0, pad);
|
strides[0] = PAD(pw0, align);
|
||||||
if (subsamp == TJSAMP_GRAY) {
|
if (subsamp == TJSAMP_GRAY) {
|
||||||
strides[1] = strides[2] = 0;
|
strides[1] = strides[2] = 0;
|
||||||
dstPlanes[1] = dstPlanes[2] = NULL;
|
dstPlanes[1] = dstPlanes[2] = NULL;
|
||||||
@@ -950,7 +969,7 @@ DLLEXPORT int tjEncodeYUV3(tjhandle handle, const unsigned char *srcBuf,
|
|||||||
int pw1 = tjPlaneWidth(1, width, subsamp);
|
int pw1 = tjPlaneWidth(1, width, subsamp);
|
||||||
int ph1 = tjPlaneHeight(1, height, subsamp);
|
int ph1 = tjPlaneHeight(1, height, subsamp);
|
||||||
|
|
||||||
strides[1] = strides[2] = PAD(pw1, pad);
|
strides[1] = strides[2] = PAD(pw1, align);
|
||||||
dstPlanes[1] = dstPlanes[0] + strides[0] * ph0;
|
dstPlanes[1] = dstPlanes[0] + strides[0] * ph0;
|
||||||
dstPlanes[2] = dstPlanes[1] + strides[1] * ph1;
|
dstPlanes[2] = dstPlanes[1] + strides[1] * ph1;
|
||||||
}
|
}
|
||||||
@@ -962,6 +981,7 @@ bailout:
|
|||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* TurboJPEG 1.2+ */
|
||||||
DLLEXPORT int tjEncodeYUV2(tjhandle handle, unsigned char *srcBuf, int width,
|
DLLEXPORT int tjEncodeYUV2(tjhandle handle, unsigned char *srcBuf, int width,
|
||||||
int pitch, int height, int pixelFormat,
|
int pitch, int height, int pixelFormat,
|
||||||
unsigned char *dstBuf, int subsamp, int flags)
|
unsigned char *dstBuf, int subsamp, int flags)
|
||||||
@@ -970,6 +990,7 @@ DLLEXPORT int tjEncodeYUV2(tjhandle handle, unsigned char *srcBuf, int width,
|
|||||||
dstBuf, 4, subsamp, flags);
|
dstBuf, 4, subsamp, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* TurboJPEG 1.1+ */
|
||||||
DLLEXPORT int tjEncodeYUV(tjhandle handle, unsigned char *srcBuf, int width,
|
DLLEXPORT int tjEncodeYUV(tjhandle handle, unsigned char *srcBuf, int width,
|
||||||
int pitch, int height, int pixelSize,
|
int pitch, int height, int pixelSize,
|
||||||
unsigned char *dstBuf, int subsamp, int flags)
|
unsigned char *dstBuf, int subsamp, int flags)
|
||||||
@@ -980,6 +1001,7 @@ DLLEXPORT int tjEncodeYUV(tjhandle handle, unsigned char *srcBuf, int width,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* TurboJPEG 1.4+ */
|
||||||
DLLEXPORT int tjCompressFromYUVPlanes(tjhandle handle,
|
DLLEXPORT int tjCompressFromYUVPlanes(tjhandle handle,
|
||||||
const unsigned char **srcPlanes,
|
const unsigned char **srcPlanes,
|
||||||
int width, const int *strides,
|
int width, const int *strides,
|
||||||
@@ -1118,8 +1140,9 @@ bailout:
|
|||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* TurboJPEG 1.4+ */
|
||||||
DLLEXPORT int tjCompressFromYUV(tjhandle handle, const unsigned char *srcBuf,
|
DLLEXPORT int tjCompressFromYUV(tjhandle handle, const unsigned char *srcBuf,
|
||||||
int width, int pad, int height, int subsamp,
|
int width, int align, int height, int subsamp,
|
||||||
unsigned char **jpegBuf,
|
unsigned char **jpegBuf,
|
||||||
unsigned long *jpegSize, int jpegQual,
|
unsigned long *jpegSize, int jpegQual,
|
||||||
int flags)
|
int flags)
|
||||||
@@ -1131,14 +1154,14 @@ DLLEXPORT int tjCompressFromYUV(tjhandle handle, const unsigned char *srcBuf,
|
|||||||
if (!this) THROWG("tjCompressFromYUV(): Invalid handle");
|
if (!this) THROWG("tjCompressFromYUV(): Invalid handle");
|
||||||
this->isInstanceError = FALSE;
|
this->isInstanceError = FALSE;
|
||||||
|
|
||||||
if (srcBuf == NULL || width <= 0 || pad < 1 || !IS_POW2(pad) ||
|
if (srcBuf == NULL || width <= 0 || align < 1 || !IS_POW2(align) ||
|
||||||
height <= 0 || subsamp < 0 || subsamp >= TJ_NUMSAMP)
|
height <= 0 || subsamp < 0 || subsamp >= TJ_NUMSAMP)
|
||||||
THROW("tjCompressFromYUV(): Invalid argument");
|
THROW("tjCompressFromYUV(): Invalid argument");
|
||||||
|
|
||||||
pw0 = tjPlaneWidth(0, width, subsamp);
|
pw0 = tjPlaneWidth(0, width, subsamp);
|
||||||
ph0 = tjPlaneHeight(0, height, subsamp);
|
ph0 = tjPlaneHeight(0, height, subsamp);
|
||||||
srcPlanes[0] = srcBuf;
|
srcPlanes[0] = srcBuf;
|
||||||
strides[0] = PAD(pw0, pad);
|
strides[0] = PAD(pw0, align);
|
||||||
if (subsamp == TJSAMP_GRAY) {
|
if (subsamp == TJSAMP_GRAY) {
|
||||||
strides[1] = strides[2] = 0;
|
strides[1] = strides[2] = 0;
|
||||||
srcPlanes[1] = srcPlanes[2] = NULL;
|
srcPlanes[1] = srcPlanes[2] = NULL;
|
||||||
@@ -1146,7 +1169,7 @@ DLLEXPORT int tjCompressFromYUV(tjhandle handle, const unsigned char *srcBuf,
|
|||||||
int pw1 = tjPlaneWidth(1, width, subsamp);
|
int pw1 = tjPlaneWidth(1, width, subsamp);
|
||||||
int ph1 = tjPlaneHeight(1, height, subsamp);
|
int ph1 = tjPlaneHeight(1, height, subsamp);
|
||||||
|
|
||||||
strides[1] = strides[2] = PAD(pw1, pad);
|
strides[1] = strides[2] = PAD(pw1, align);
|
||||||
srcPlanes[1] = srcPlanes[0] + strides[0] * ph0;
|
srcPlanes[1] = srcPlanes[0] + strides[0] * ph0;
|
||||||
srcPlanes[2] = srcPlanes[1] + strides[1] * ph1;
|
srcPlanes[2] = srcPlanes[1] + strides[1] * ph1;
|
||||||
}
|
}
|
||||||
@@ -1159,7 +1182,7 @@ bailout:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Decompressor */
|
/******************************* Decompressor ********************************/
|
||||||
|
|
||||||
static tjhandle _tjInitDecompress(tjinstance *this)
|
static tjhandle _tjInitDecompress(tjinstance *this)
|
||||||
{
|
{
|
||||||
@@ -1189,6 +1212,7 @@ static tjhandle _tjInitDecompress(tjinstance *this)
|
|||||||
return (tjhandle)this;
|
return (tjhandle)this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* TurboJPEG 1.0+ */
|
||||||
DLLEXPORT tjhandle tjInitDecompress(void)
|
DLLEXPORT tjhandle tjInitDecompress(void)
|
||||||
{
|
{
|
||||||
tjinstance *this;
|
tjinstance *this;
|
||||||
@@ -1204,6 +1228,7 @@ DLLEXPORT tjhandle tjInitDecompress(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* TurboJPEG 1.4+ */
|
||||||
DLLEXPORT int tjDecompressHeader3(tjhandle handle,
|
DLLEXPORT int tjDecompressHeader3(tjhandle handle,
|
||||||
const unsigned char *jpegBuf,
|
const unsigned char *jpegBuf,
|
||||||
unsigned long jpegSize, int *width,
|
unsigned long jpegSize, int *width,
|
||||||
@@ -1260,6 +1285,7 @@ bailout:
|
|||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* TurboJPEG 1.1+ */
|
||||||
DLLEXPORT int tjDecompressHeader2(tjhandle handle, unsigned char *jpegBuf,
|
DLLEXPORT int tjDecompressHeader2(tjhandle handle, unsigned char *jpegBuf,
|
||||||
unsigned long jpegSize, int *width,
|
unsigned long jpegSize, int *width,
|
||||||
int *height, int *jpegSubsamp)
|
int *height, int *jpegSubsamp)
|
||||||
@@ -1270,6 +1296,7 @@ DLLEXPORT int tjDecompressHeader2(tjhandle handle, unsigned char *jpegBuf,
|
|||||||
jpegSubsamp, &jpegColorspace);
|
jpegSubsamp, &jpegColorspace);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* TurboJPEG 1.0+ */
|
||||||
DLLEXPORT int tjDecompressHeader(tjhandle handle, unsigned char *jpegBuf,
|
DLLEXPORT int tjDecompressHeader(tjhandle handle, unsigned char *jpegBuf,
|
||||||
unsigned long jpegSize, int *width,
|
unsigned long jpegSize, int *width,
|
||||||
int *height)
|
int *height)
|
||||||
@@ -1281,19 +1308,21 @@ DLLEXPORT int tjDecompressHeader(tjhandle handle, unsigned char *jpegBuf,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
DLLEXPORT tjscalingfactor *tjGetScalingFactors(int *numscalingfactors)
|
/* TurboJPEG 1.2+ */
|
||||||
|
DLLEXPORT tjscalingfactor *tjGetScalingFactors(int *numScalingFactors)
|
||||||
{
|
{
|
||||||
if (numscalingfactors == NULL) {
|
if (numScalingFactors == NULL) {
|
||||||
SNPRINTF(errStr, JMSG_LENGTH_MAX,
|
SNPRINTF(errStr, JMSG_LENGTH_MAX,
|
||||||
"tjGetScalingFactors(): Invalid argument");
|
"tjGetScalingFactors(): Invalid argument");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
*numscalingfactors = NUMSF;
|
*numScalingFactors = NUMSF;
|
||||||
return (tjscalingfactor *)sf;
|
return (tjscalingfactor *)sf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* TurboJPEG 1.2+ */
|
||||||
DLLEXPORT int tjDecompress2(tjhandle handle, const unsigned char *jpegBuf,
|
DLLEXPORT int tjDecompress2(tjhandle handle, const unsigned char *jpegBuf,
|
||||||
unsigned long jpegSize, unsigned char *dstBuf,
|
unsigned long jpegSize, unsigned char *dstBuf,
|
||||||
int width, int pitch, int height, int pixelFormat,
|
int width, int pitch, int height, int pixelFormat,
|
||||||
@@ -1381,6 +1410,7 @@ bailout:
|
|||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* TurboJPEG 1.0+ */
|
||||||
DLLEXPORT int tjDecompress(tjhandle handle, unsigned char *jpegBuf,
|
DLLEXPORT int tjDecompress(tjhandle handle, unsigned char *jpegBuf,
|
||||||
unsigned long jpegSize, unsigned char *dstBuf,
|
unsigned long jpegSize, unsigned char *dstBuf,
|
||||||
int width, int pitch, int height, int pixelSize,
|
int width, int pitch, int height, int pixelSize,
|
||||||
@@ -1442,6 +1472,7 @@ static void my_reset_marker_reader(j_decompress_ptr dinfo)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* TurboJPEG 1.4+ */
|
||||||
DLLEXPORT int tjDecodeYUVPlanes(tjhandle handle,
|
DLLEXPORT int tjDecodeYUVPlanes(tjhandle handle,
|
||||||
const unsigned char **srcPlanes,
|
const unsigned char **srcPlanes,
|
||||||
const int *strides, int subsamp,
|
const int *strides, int subsamp,
|
||||||
@@ -1480,7 +1511,7 @@ DLLEXPORT int tjDecodeYUVPlanes(tjhandle handle,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (pixelFormat == TJPF_CMYK)
|
if (pixelFormat == TJPF_CMYK)
|
||||||
THROW("tjDecodeYUVPlanes(): Cannot decode YUV images into CMYK pixels.");
|
THROW("tjDecodeYUVPlanes(): Cannot decode YUV images into packed-pixel CMYK images.");
|
||||||
|
|
||||||
if (pitch == 0) pitch = width * tjPixelSize[pixelFormat];
|
if (pitch == 0) pitch = width * tjPixelSize[pixelFormat];
|
||||||
dinfo->image_width = width;
|
dinfo->image_width = width;
|
||||||
@@ -1588,8 +1619,9 @@ bailout:
|
|||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* TurboJPEG 1.4+ */
|
||||||
DLLEXPORT int tjDecodeYUV(tjhandle handle, const unsigned char *srcBuf,
|
DLLEXPORT int tjDecodeYUV(tjhandle handle, const unsigned char *srcBuf,
|
||||||
int pad, int subsamp, unsigned char *dstBuf,
|
int align, int subsamp, unsigned char *dstBuf,
|
||||||
int width, int pitch, int height, int pixelFormat,
|
int width, int pitch, int height, int pixelFormat,
|
||||||
int flags)
|
int flags)
|
||||||
{
|
{
|
||||||
@@ -1600,14 +1632,14 @@ DLLEXPORT int tjDecodeYUV(tjhandle handle, const unsigned char *srcBuf,
|
|||||||
if (!this) THROWG("tjDecodeYUV(): Invalid handle");
|
if (!this) THROWG("tjDecodeYUV(): Invalid handle");
|
||||||
this->isInstanceError = FALSE;
|
this->isInstanceError = FALSE;
|
||||||
|
|
||||||
if (srcBuf == NULL || pad < 1 || !IS_POW2(pad) || subsamp < 0 ||
|
if (srcBuf == NULL || align < 1 || !IS_POW2(align) || subsamp < 0 ||
|
||||||
subsamp >= TJ_NUMSAMP || width <= 0 || height <= 0)
|
subsamp >= TJ_NUMSAMP || width <= 0 || height <= 0)
|
||||||
THROW("tjDecodeYUV(): Invalid argument");
|
THROW("tjDecodeYUV(): Invalid argument");
|
||||||
|
|
||||||
pw0 = tjPlaneWidth(0, width, subsamp);
|
pw0 = tjPlaneWidth(0, width, subsamp);
|
||||||
ph0 = tjPlaneHeight(0, height, subsamp);
|
ph0 = tjPlaneHeight(0, height, subsamp);
|
||||||
srcPlanes[0] = srcBuf;
|
srcPlanes[0] = srcBuf;
|
||||||
strides[0] = PAD(pw0, pad);
|
strides[0] = PAD(pw0, align);
|
||||||
if (subsamp == TJSAMP_GRAY) {
|
if (subsamp == TJSAMP_GRAY) {
|
||||||
strides[1] = strides[2] = 0;
|
strides[1] = strides[2] = 0;
|
||||||
srcPlanes[1] = srcPlanes[2] = NULL;
|
srcPlanes[1] = srcPlanes[2] = NULL;
|
||||||
@@ -1615,7 +1647,7 @@ DLLEXPORT int tjDecodeYUV(tjhandle handle, const unsigned char *srcBuf,
|
|||||||
int pw1 = tjPlaneWidth(1, width, subsamp);
|
int pw1 = tjPlaneWidth(1, width, subsamp);
|
||||||
int ph1 = tjPlaneHeight(1, height, subsamp);
|
int ph1 = tjPlaneHeight(1, height, subsamp);
|
||||||
|
|
||||||
strides[1] = strides[2] = PAD(pw1, pad);
|
strides[1] = strides[2] = PAD(pw1, align);
|
||||||
srcPlanes[1] = srcPlanes[0] + strides[0] * ph0;
|
srcPlanes[1] = srcPlanes[0] + strides[0] * ph0;
|
||||||
srcPlanes[2] = srcPlanes[1] + strides[1] * ph1;
|
srcPlanes[2] = srcPlanes[1] + strides[1] * ph1;
|
||||||
}
|
}
|
||||||
@@ -1627,6 +1659,7 @@ bailout:
|
|||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* TurboJPEG 1.4+ */
|
||||||
DLLEXPORT int tjDecompressToYUVPlanes(tjhandle handle,
|
DLLEXPORT int tjDecompressToYUVPlanes(tjhandle handle,
|
||||||
const unsigned char *jpegBuf,
|
const unsigned char *jpegBuf,
|
||||||
unsigned long jpegSize,
|
unsigned long jpegSize,
|
||||||
@@ -1807,9 +1840,10 @@ bailout:
|
|||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* TurboJPEG 1.4+ */
|
||||||
DLLEXPORT int tjDecompressToYUV2(tjhandle handle, const unsigned char *jpegBuf,
|
DLLEXPORT int tjDecompressToYUV2(tjhandle handle, const unsigned char *jpegBuf,
|
||||||
unsigned long jpegSize, unsigned char *dstBuf,
|
unsigned long jpegSize, unsigned char *dstBuf,
|
||||||
int width, int pad, int height, int flags)
|
int width, int align, int height, int flags)
|
||||||
{
|
{
|
||||||
unsigned char *dstPlanes[3];
|
unsigned char *dstPlanes[3];
|
||||||
int pw0, ph0, strides[3], retval = -1, jpegSubsamp = -1;
|
int pw0, ph0, strides[3], retval = -1, jpegSubsamp = -1;
|
||||||
@@ -1819,7 +1853,7 @@ DLLEXPORT int tjDecompressToYUV2(tjhandle handle, const unsigned char *jpegBuf,
|
|||||||
this->jerr.stopOnWarning = (flags & TJFLAG_STOPONWARNING) ? TRUE : FALSE;
|
this->jerr.stopOnWarning = (flags & TJFLAG_STOPONWARNING) ? TRUE : FALSE;
|
||||||
|
|
||||||
if (jpegBuf == NULL || jpegSize <= 0 || dstBuf == NULL || width < 0 ||
|
if (jpegBuf == NULL || jpegSize <= 0 || dstBuf == NULL || width < 0 ||
|
||||||
pad < 1 || !IS_POW2(pad) || height < 0)
|
align < 1 || !IS_POW2(align) || height < 0)
|
||||||
THROW("tjDecompressToYUV2(): Invalid argument");
|
THROW("tjDecompressToYUV2(): Invalid argument");
|
||||||
|
|
||||||
if (setjmp(this->jerr.setjmp_buffer)) {
|
if (setjmp(this->jerr.setjmp_buffer)) {
|
||||||
@@ -1836,7 +1870,6 @@ DLLEXPORT int tjDecompressToYUV2(tjhandle handle, const unsigned char *jpegBuf,
|
|||||||
jpegwidth = dinfo->image_width; jpegheight = dinfo->image_height;
|
jpegwidth = dinfo->image_width; jpegheight = dinfo->image_height;
|
||||||
if (width == 0) width = jpegwidth;
|
if (width == 0) width = jpegwidth;
|
||||||
if (height == 0) height = jpegheight;
|
if (height == 0) height = jpegheight;
|
||||||
|
|
||||||
for (i = 0; i < NUMSF; i++) {
|
for (i = 0; i < NUMSF; i++) {
|
||||||
scaledw = TJSCALED(jpegwidth, sf[i]);
|
scaledw = TJSCALED(jpegwidth, sf[i]);
|
||||||
scaledh = TJSCALED(jpegheight, sf[i]);
|
scaledh = TJSCALED(jpegheight, sf[i]);
|
||||||
@@ -1849,7 +1882,7 @@ DLLEXPORT int tjDecompressToYUV2(tjhandle handle, const unsigned char *jpegBuf,
|
|||||||
pw0 = tjPlaneWidth(0, width, jpegSubsamp);
|
pw0 = tjPlaneWidth(0, width, jpegSubsamp);
|
||||||
ph0 = tjPlaneHeight(0, height, jpegSubsamp);
|
ph0 = tjPlaneHeight(0, height, jpegSubsamp);
|
||||||
dstPlanes[0] = dstBuf;
|
dstPlanes[0] = dstBuf;
|
||||||
strides[0] = PAD(pw0, pad);
|
strides[0] = PAD(pw0, align);
|
||||||
if (jpegSubsamp == TJSAMP_GRAY) {
|
if (jpegSubsamp == TJSAMP_GRAY) {
|
||||||
strides[1] = strides[2] = 0;
|
strides[1] = strides[2] = 0;
|
||||||
dstPlanes[1] = dstPlanes[2] = NULL;
|
dstPlanes[1] = dstPlanes[2] = NULL;
|
||||||
@@ -1857,7 +1890,7 @@ DLLEXPORT int tjDecompressToYUV2(tjhandle handle, const unsigned char *jpegBuf,
|
|||||||
int pw1 = tjPlaneWidth(1, width, jpegSubsamp);
|
int pw1 = tjPlaneWidth(1, width, jpegSubsamp);
|
||||||
int ph1 = tjPlaneHeight(1, height, jpegSubsamp);
|
int ph1 = tjPlaneHeight(1, height, jpegSubsamp);
|
||||||
|
|
||||||
strides[1] = strides[2] = PAD(pw1, pad);
|
strides[1] = strides[2] = PAD(pw1, align);
|
||||||
dstPlanes[1] = dstPlanes[0] + strides[0] * ph0;
|
dstPlanes[1] = dstPlanes[0] + strides[0] * ph0;
|
||||||
dstPlanes[2] = dstPlanes[1] + strides[1] * ph1;
|
dstPlanes[2] = dstPlanes[1] + strides[1] * ph1;
|
||||||
}
|
}
|
||||||
@@ -1871,6 +1904,7 @@ bailout:
|
|||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* TurboJPEG 1.1+ */
|
||||||
DLLEXPORT int tjDecompressToYUV(tjhandle handle, unsigned char *jpegBuf,
|
DLLEXPORT int tjDecompressToYUV(tjhandle handle, unsigned char *jpegBuf,
|
||||||
unsigned long jpegSize, unsigned char *dstBuf,
|
unsigned long jpegSize, unsigned char *dstBuf,
|
||||||
int flags)
|
int flags)
|
||||||
@@ -1879,8 +1913,9 @@ DLLEXPORT int tjDecompressToYUV(tjhandle handle, unsigned char *jpegBuf,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Transformer */
|
/******************************** Transformer ********************************/
|
||||||
|
|
||||||
|
/* TurboJPEG 1.2+ */
|
||||||
DLLEXPORT tjhandle tjInitTransform(void)
|
DLLEXPORT tjhandle tjInitTransform(void)
|
||||||
{
|
{
|
||||||
tjinstance *this = NULL;
|
tjinstance *this = NULL;
|
||||||
@@ -1900,6 +1935,7 @@ DLLEXPORT tjhandle tjInitTransform(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* TurboJPEG 1.2+ */
|
||||||
DLLEXPORT int tjTransform(tjhandle handle, const unsigned char *jpegBuf,
|
DLLEXPORT int tjTransform(tjhandle handle, const unsigned char *jpegBuf,
|
||||||
unsigned long jpegSize, int n,
|
unsigned long jpegSize, int n,
|
||||||
unsigned char **dstBufs, unsigned long *dstSizes,
|
unsigned char **dstBufs, unsigned long *dstSizes,
|
||||||
@@ -2068,6 +2104,9 @@ bailout:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*************************** Packed-Pixel Image I/O **************************/
|
||||||
|
|
||||||
|
/* TurboJPEG 2.0+ */
|
||||||
DLLEXPORT unsigned char *tjLoadImage(const char *filename, int *width,
|
DLLEXPORT unsigned char *tjLoadImage(const char *filename, int *width,
|
||||||
int align, int *height, int *pixelFormat,
|
int align, int *height, int *pixelFormat,
|
||||||
int flags)
|
int flags)
|
||||||
@@ -2170,6 +2209,7 @@ bailout:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* TurboJPEG 2.0+ */
|
||||||
DLLEXPORT int tjSaveImage(const char *filename, unsigned char *buffer,
|
DLLEXPORT int tjSaveImage(const char *filename, unsigned char *buffer,
|
||||||
int width, int pitch, int height, int pixelFormat,
|
int width, int pitch, int height, int pixelFormat,
|
||||||
int flags)
|
int flags)
|
||||||
|
|||||||
941
turbojpeg.h
941
turbojpeg.h
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user