| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| <html xmlns="http://www.w3.org/1999/xhtml"> |
| <head> |
| <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> |
| <meta http-equiv="X-UA-Compatible" content="IE=9"/> |
| <meta name="generator" content="Doxygen 1.8.20"/> |
| <meta name="viewport" content="width=device-width, initial-scale=1"/> |
| <title>TurboJPEG: TurboJPEG</title> |
| <link href="tabs.css" rel="stylesheet" type="text/css"/> |
| <script type="text/javascript" src="jquery.js"></script> |
| <script type="text/javascript" src="dynsections.js"></script> |
| <link href="search/search.css" rel="stylesheet" type="text/css"/> |
| <script type="text/javascript" src="search/searchdata.js"></script> |
| <script type="text/javascript" src="search/search.js"></script> |
| <link href="doxygen.css" rel="stylesheet" type="text/css" /> |
| <link href="doxygen-extra.css" rel="stylesheet" type="text/css"/> |
| </head> |
| <body> |
| <div id="top"><!-- do not remove this div, it is closed by doxygen! --> |
| <div id="titlearea"> |
| <table cellspacing="0" cellpadding="0"> |
| <tbody> |
| <tr style="height: 56px;"> |
| <td id="projectalign" style="padding-left: 0.5em;"> |
| <div id="projectname">TurboJPEG |
|  <span id="projectnumber">2.1.4</span> |
| </div> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <!-- end header part --> |
| <!-- Generated by Doxygen 1.8.20 --> |
| <script type="text/javascript"> |
| /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ |
| var searchBox = new SearchBox("searchBox", "search",false,'Search'); |
| /* @license-end */ |
| </script> |
| <script type="text/javascript" src="menudata.js"></script> |
| <script type="text/javascript" src="menu.js"></script> |
| <script type="text/javascript"> |
| /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ |
| $(function() { |
| initMenu('',true,false,'search.php','Search'); |
| $(document).ready(function() { init_search(); }); |
| }); |
| /* @license-end */</script> |
| <div id="main-nav"></div> |
| </div><!-- top --> |
| <!-- window showing the filter options --> |
| <div id="MSearchSelectWindow" |
| onmouseover="return searchBox.OnSearchSelectShow()" |
| onmouseout="return searchBox.OnSearchSelectHide()" |
| onkeydown="return searchBox.OnSearchSelectKey(event)"> |
| </div> |
| |
| <!-- iframe showing the search results (closed by default) --> |
| <div id="MSearchResultsWindow"> |
| <iframe src="javascript:void(0)" frameborder="0" |
| name="MSearchResults" id="MSearchResults"> |
| </iframe> |
| </div> |
| |
| <div class="header"> |
| <div class="summary"> |
| <a href="#nested-classes">Data Structures</a> | |
| <a href="#define-members">Macros</a> | |
| <a href="#typedef-members">Typedefs</a> | |
| <a href="#enum-members">Enumerations</a> | |
| <a href="#func-members">Functions</a> | |
| <a href="#var-members">Variables</a> </div> |
| <div class="headertitle"> |
| <div class="title">TurboJPEG</div> </div> |
| </div><!--header--> |
| <div class="contents"> |
| |
| <p>TurboJPEG API. |
| <a href="#details">More...</a></p> |
| <table class="memberdecls"> |
| <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a> |
| Data Structures</h2></td></tr> |
| <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structtjscalingfactor.html">tjscalingfactor</a></td></tr> |
| <tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Scaling factor. <a href="structtjscalingfactor.html#details">More...</a><br /></td></tr> |
| <tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structtjregion.html">tjregion</a></td></tr> |
| <tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Cropping region. <a href="structtjregion.html#details">More...</a><br /></td></tr> |
| <tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structtjtransform.html">tjtransform</a></td></tr> |
| <tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Lossless transform. <a href="structtjtransform.html#details">More...</a><br /></td></tr> |
| <tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> |
| </table><table class="memberdecls"> |
| <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a> |
| Macros</h2></td></tr> |
| <tr class="memitem:ga5ef3d169162ce77ce348e292a0b7477c"><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#ga5ef3d169162ce77ce348e292a0b7477c">TJ_NUMSAMP</a></td></tr> |
| <tr class="memdesc:ga5ef3d169162ce77ce348e292a0b7477c"><td class="mdescLeft"> </td><td class="mdescRight">The number of chrominance subsampling options. <a href="group___turbo_j_p_e_g.html#ga5ef3d169162ce77ce348e292a0b7477c">More...</a><br /></td></tr> |
| <tr class="separator:ga5ef3d169162ce77ce348e292a0b7477c"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:ga7010a4402f54a45ba822ad8675a4655e"><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#ga7010a4402f54a45ba822ad8675a4655e">TJ_NUMPF</a></td></tr> |
| <tr class="memdesc:ga7010a4402f54a45ba822ad8675a4655e"><td class="mdescLeft"> </td><td class="mdescRight">The number of pixel formats. <a href="group___turbo_j_p_e_g.html#ga7010a4402f54a45ba822ad8675a4655e">More...</a><br /></td></tr> |
| <tr class="separator:ga7010a4402f54a45ba822ad8675a4655e"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:ga39f57a6fb02d9cf32e7b6890099b5a71"><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#ga39f57a6fb02d9cf32e7b6890099b5a71">TJ_NUMCS</a></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="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">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="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. <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="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 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="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. <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="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. <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="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 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="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="separator:ga43b426750b46190a25d34a67ef76df1b"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:ga163e6482dc5096831feef9c79ff3f805"><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#ga163e6482dc5096831feef9c79ff3f805">TJFLAG_LIMITSCANS</a></td></tr> |
| <tr class="memdesc:ga163e6482dc5096831feef9c79ff3f805"><td class="mdescLeft"> </td><td class="mdescRight">Limit the number of progressive JPEG scans that the decompression and transform functions will process. <a href="group___turbo_j_p_e_g.html#ga163e6482dc5096831feef9c79ff3f805">More...</a><br /></td></tr> |
| <tr class="separator:ga163e6482dc5096831feef9c79ff3f805"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:ga79bde1b4a3e2351e00887e47781b966e"><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#ga79bde1b4a3e2351e00887e47781b966e">TJ_NUMERR</a></td></tr> |
| <tr class="memdesc:ga79bde1b4a3e2351e00887e47781b966e"><td class="mdescLeft"> </td><td class="mdescRight">The number of error codes. <a href="group___turbo_j_p_e_g.html#ga79bde1b4a3e2351e00887e47781b966e">More...</a><br /></td></tr> |
| <tr class="separator:ga79bde1b4a3e2351e00887e47781b966e"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:ga0f6dbd18adf38b7d46ac547f0f4d562c"><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#ga0f6dbd18adf38b7d46ac547f0f4d562c">TJ_NUMXOP</a></td></tr> |
| <tr class="memdesc:ga0f6dbd18adf38b7d46ac547f0f4d562c"><td class="mdescLeft"> </td><td class="mdescRight">The number of transform operations. <a href="group___turbo_j_p_e_g.html#ga0f6dbd18adf38b7d46ac547f0f4d562c">More...</a><br /></td></tr> |
| <tr class="separator:ga0f6dbd18adf38b7d46ac547f0f4d562c"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:ga50e03cb5ed115330e212417429600b00"><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#ga50e03cb5ed115330e212417429600b00">TJXOPT_PERFECT</a></td></tr> |
| <tr class="memdesc:ga50e03cb5ed115330e212417429600b00"><td class="mdescLeft"> </td><td class="mdescRight">This option will cause <a class="el" href="group___turbo_j_p_e_g.html#ga9cb8abf4cc91881e04a0329b2270be25" title="Losslessly transform a JPEG image into another JPEG image.">tjTransform()</a> to return an error if the transform is not perfect. <a href="group___turbo_j_p_e_g.html#ga50e03cb5ed115330e212417429600b00">More...</a><br /></td></tr> |
| <tr class="separator:ga50e03cb5ed115330e212417429600b00"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:ga319826b7eb1583c0595bbe7b95428709"><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#ga319826b7eb1583c0595bbe7b95428709">TJXOPT_TRIM</a></td></tr> |
| <tr class="memdesc:ga319826b7eb1583c0595bbe7b95428709"><td class="mdescLeft"> </td><td class="mdescRight">This option will cause <a class="el" href="group___turbo_j_p_e_g.html#ga9cb8abf4cc91881e04a0329b2270be25" title="Losslessly transform a JPEG image into another JPEG image.">tjTransform()</a> to discard any partial MCU blocks that cannot be transformed. <a href="group___turbo_j_p_e_g.html#ga319826b7eb1583c0595bbe7b95428709">More...</a><br /></td></tr> |
| <tr class="separator:ga319826b7eb1583c0595bbe7b95428709"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:ga9c771a757fc1294add611906b89ab2d2"><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#ga9c771a757fc1294add611906b89ab2d2">TJXOPT_CROP</a></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="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 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="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. <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="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 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="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 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="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 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="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="separator:ga84878bb65404204743aa18cac02781df"><td class="memSeparator" colspan="2"> </td></tr> |
| </table><table class="memberdecls"> |
| <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a> |
| Typedefs</h2></td></tr> |
| <tr class="memitem:ga504805ec0161f1b505397ca0118bf8fd"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structtjtransform.html">tjtransform</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#ga504805ec0161f1b505397ca0118bf8fd">tjtransform</a></td></tr> |
| <tr class="memdesc:ga504805ec0161f1b505397ca0118bf8fd"><td class="mdescLeft"> </td><td class="mdescRight">Lossless transform. <a href="group___turbo_j_p_e_g.html#ga504805ec0161f1b505397ca0118bf8fd">More...</a><br /></td></tr> |
| <tr class="separator:ga504805ec0161f1b505397ca0118bf8fd"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:ga758d2634ecb4949de7815cba621f5763"><td class="memItemLeft" align="right" valign="top">typedef void * </td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a></td></tr> |
| <tr class="memdesc:ga758d2634ecb4949de7815cba621f5763"><td class="mdescLeft"> </td><td class="mdescRight">TurboJPEG instance handle. <a href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">More...</a><br /></td></tr> |
| <tr class="separator:ga758d2634ecb4949de7815cba621f5763"><td class="memSeparator" colspan="2"> </td></tr> |
| </table><table class="memberdecls"> |
| <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a> |
| Enumerations</h2></td></tr> |
| <tr class="memitem:ga1d047060ea80bb9820d540bb928e9074"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#ga1d047060ea80bb9820d540bb928e9074">TJSAMP</a> { <br /> |
|   <a class="el" href="group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074afb8da4f44197837bdec0a4f593dacae3">TJSAMP_444</a>, |
| <a class="el" href="group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074a136130902cc578f11f32429b59368404">TJSAMP_422</a>, |
| <a class="el" href="group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074a63085dbf683cfe39e513cdb6343e3737">TJSAMP_420</a>, |
| <a class="el" href="group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074a3f1c9504842ddc7a48d0f690754b6248">TJSAMP_GRAY</a>, |
| <br /> |
|   <a class="el" href="group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074accf740e6f3aa6ba20ba922cad13cb974">TJSAMP_440</a>, |
| <a class="el" href="group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074a28ec62575e5ea295c3fde3001dc628e2">TJSAMP_411</a> |
| <br /> |
| }</td></tr> |
| <tr class="memdesc:ga1d047060ea80bb9820d540bb928e9074"><td class="mdescLeft"> </td><td class="mdescRight">Chrominance subsampling options. <a href="group___turbo_j_p_e_g.html#ga1d047060ea80bb9820d540bb928e9074">More...</a><br /></td></tr> |
| <tr class="separator:ga1d047060ea80bb9820d540bb928e9074"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:gac916144e26c3817ac514e64ae5d12e2a"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#gac916144e26c3817ac514e64ae5d12e2a">TJPF</a> { <br /> |
|   <a class="el" href="group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa7ce93230bff449518ce387c17e6ed37c">TJPF_RGB</a>, |
| <a class="el" href="group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aab10624437fb8ef495a0b153e65749839">TJPF_BGR</a>, |
| <a class="el" href="group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa83973bebb7e2dc6fa8bae89ff3f42e01">TJPF_RGBX</a>, |
| <a class="el" href="group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa2a1fbf569ca79897eae886e3376ca4c8">TJPF_BGRX</a>, |
| <br /> |
|   <a class="el" href="group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aaf6603b27147de47e212e75dac027b2af">TJPF_XBGR</a>, |
| <a class="el" href="group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aadae996905efcfa3b42a0bb3bea7f9d84">TJPF_XRGB</a>, |
| <a class="el" href="group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa5431b54b015337705f13118073711a1a">TJPF_GRAY</a>, |
| <a class="el" href="group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa88d2e88fab67f6503cf972e14851cc12">TJPF_RGBA</a>, |
| <br /> |
|   <a class="el" href="group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aac037ff1845cf9b74bb81a3659c2b9fb4">TJPF_BGRA</a>, |
| <a class="el" href="group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa1ba1a7f1631dbeaa49a0a85fc4a40081">TJPF_ABGR</a>, |
| <a class="el" href="group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aae8f846ed9d9de99b6e1dfe448848765c">TJPF_ARGB</a>, |
| <a class="el" href="group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa7f5100ec44c91994e243f1cf55553f8b">TJPF_CMYK</a>, |
| <br /> |
|   <a class="el" href="group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa84c1a6cead7952998e2fb895844a21ed">TJPF_UNKNOWN</a> |
| <br /> |
| }</td></tr> |
| <tr class="memdesc:gac916144e26c3817ac514e64ae5d12e2a"><td class="mdescLeft"> </td><td class="mdescRight">Pixel formats. <a href="group___turbo_j_p_e_g.html#gac916144e26c3817ac514e64ae5d12e2a">More...</a><br /></td></tr> |
| <tr class="separator:gac916144e26c3817ac514e64ae5d12e2a"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:ga4f83ad3368e0e29d1957be0efa7c3720"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#ga4f83ad3368e0e29d1957be0efa7c3720">TJCS</a> { <br /> |
|   <a class="el" href="group___turbo_j_p_e_g.html#gga4f83ad3368e0e29d1957be0efa7c3720a677cb7ccb85c4038ac41964a2e09e555">TJCS_RGB</a>, |
| <a class="el" href="group___turbo_j_p_e_g.html#gga4f83ad3368e0e29d1957be0efa7c3720a7389b8f65bb387ffedce3efd0d78ec75">TJCS_YCbCr</a>, |
| <a class="el" href="group___turbo_j_p_e_g.html#gga4f83ad3368e0e29d1957be0efa7c3720ab3e7d6a87f695e45b81c1b5262b5a50a">TJCS_GRAY</a>, |
| <a class="el" href="group___turbo_j_p_e_g.html#gga4f83ad3368e0e29d1957be0efa7c3720a6c8b636152ac8195b869587db315ee53">TJCS_CMYK</a>, |
| <br /> |
|   <a class="el" href="group___turbo_j_p_e_g.html#gga4f83ad3368e0e29d1957be0efa7c3720a53839e0fe867b76b58d16b0a1a7c598e">TJCS_YCCK</a> |
| <br /> |
| }</td></tr> |
| <tr class="memdesc:ga4f83ad3368e0e29d1957be0efa7c3720"><td class="mdescLeft"> </td><td class="mdescRight">JPEG colorspaces. <a href="group___turbo_j_p_e_g.html#ga4f83ad3368e0e29d1957be0efa7c3720">More...</a><br /></td></tr> |
| <tr class="separator:ga4f83ad3368e0e29d1957be0efa7c3720"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:gafbc17cfa57d0d5d11fea35ac025950fe"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#gafbc17cfa57d0d5d11fea35ac025950fe">TJERR</a> { <a class="el" href="group___turbo_j_p_e_g.html#ggafbc17cfa57d0d5d11fea35ac025950fea342dd6e2aedb47bb257b4e7568329b59">TJERR_WARNING</a>, |
| <a class="el" href="group___turbo_j_p_e_g.html#ggafbc17cfa57d0d5d11fea35ac025950feafc9cceeada13122b09e4851e3788039a">TJERR_FATAL</a> |
| }</td></tr> |
| <tr class="memdesc:gafbc17cfa57d0d5d11fea35ac025950fe"><td class="mdescLeft"> </td><td class="mdescRight">Error codes. <a href="group___turbo_j_p_e_g.html#gafbc17cfa57d0d5d11fea35ac025950fe">More...</a><br /></td></tr> |
| <tr class="separator:gafbc17cfa57d0d5d11fea35ac025950fe"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:ga2de531af4e7e6c4f124908376b354866"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#ga2de531af4e7e6c4f124908376b354866">TJXOP</a> { <br /> |
|   <a class="el" href="group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866aad88c0366cd3f7d0eac9d7a3fa1c2c27">TJXOP_NONE</a>, |
| <a class="el" href="group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866aa0df69776caa30f0fa28e26332d311ce">TJXOP_HFLIP</a>, |
| <a class="el" href="group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866a324eddfbec53b7e691f61e56929d0d5d">TJXOP_VFLIP</a>, |
| <a class="el" href="group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866a31060aed199f886afdd417f80499c32d">TJXOP_TRANSPOSE</a>, |
| <br /> |
|   <a class="el" href="group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866af3b14d488aea6ece9e5b3df73a74d6a4">TJXOP_TRANSVERSE</a>, |
| <a class="el" href="group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866a43b2bbb23bc4bd548422d43fbe9af128">TJXOP_ROT90</a>, |
| <a class="el" href="group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866a140952eb8dd0300accfcc22726d69692">TJXOP_ROT180</a>, |
| <a class="el" href="group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866a3064ee5dfb7f032df332818587567a08">TJXOP_ROT270</a> |
| <br /> |
| }</td></tr> |
| <tr class="memdesc:ga2de531af4e7e6c4f124908376b354866"><td class="mdescLeft"> </td><td class="mdescRight">Transform operations for <a class="el" href="group___turbo_j_p_e_g.html#ga9cb8abf4cc91881e04a0329b2270be25" title="Losslessly transform a JPEG image into another JPEG image.">tjTransform()</a> <a href="group___turbo_j_p_e_g.html#ga2de531af4e7e6c4f124908376b354866">More...</a><br /></td></tr> |
| <tr class="separator:ga2de531af4e7e6c4f124908376b354866"><td class="memSeparator" colspan="2"> </td></tr> |
| </table><table class="memberdecls"> |
| <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> |
| Functions</h2></td></tr> |
| <tr class="memitem:ga9d63a05fc6d813f4aae06107041a37e8"><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#ga9d63a05fc6d813f4aae06107041a37e8">tjInitCompress</a> (void)</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="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 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="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: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: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="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="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="separator:ga67ac12fee79073242cb216e07c9f1f90"><td class="memSeparator" colspan="2"> </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: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: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="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="memitem:ga63fb66bb1e36c74008c4634360becbb1"><td class="memItemLeft" align="right" valign="top">DLLEXPORT int </td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#ga63fb66bb1e36c74008c4634360becbb1">tjPlaneWidth</a> (int componentID, int width, int subsamp)</td></tr> |
| <tr class="memdesc:ga63fb66bb1e36c74008c4634360becbb1"><td class="mdescLeft"> </td><td class="mdescRight">The plane width of a YUV image plane with the given parameters. <a href="group___turbo_j_p_e_g.html#ga63fb66bb1e36c74008c4634360becbb1">More...</a><br /></td></tr> |
| <tr class="separator:ga63fb66bb1e36c74008c4634360becbb1"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:ga1a209696c6a80748f20e134b3c64789f"><td class="memItemLeft" align="right" valign="top">DLLEXPORT int </td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#ga1a209696c6a80748f20e134b3c64789f">tjPlaneHeight</a> (int componentID, int height, int subsamp)</td></tr> |
| <tr class="memdesc:ga1a209696c6a80748f20e134b3c64789f"><td class="mdescLeft"> </td><td class="mdescRight">The plane height of a YUV image plane with the given parameters. <a href="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="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: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: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="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="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="separator:ga52300eac3f3d9ef4bab303bc244f62d3"><td class="memSeparator" colspan="2"> </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="separator:ga0595681096bba7199cc6f3533cb25f77"><td class="memSeparator" colspan="2"> </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: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: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="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="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: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: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="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="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: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: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="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="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="separator:ga928beff6ac248ceadf01089fc6b41957"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:ga9cb8abf4cc91881e04a0329b2270be25"><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#ga9cb8abf4cc91881e04a0329b2270be25">tjTransform</a> (<a class="el" href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> handle, const unsigned char *jpegBuf, unsigned long jpegSize, int n, unsigned char **dstBufs, unsigned long *dstSizes, <a class="el" href="structtjtransform.html">tjtransform</a> *transforms, int flags)</td></tr> |
| <tr class="memdesc:ga9cb8abf4cc91881e04a0329b2270be25"><td class="mdescLeft"> </td><td class="mdescRight">Losslessly transform a JPEG image into another JPEG image. <a href="group___turbo_j_p_e_g.html#ga9cb8abf4cc91881e04a0329b2270be25">More...</a><br /></td></tr> |
| <tr class="separator:ga9cb8abf4cc91881e04a0329b2270be25"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:ga75f355fa27225ba1a4ee392c852394d2"><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#ga75f355fa27225ba1a4ee392c852394d2">tjDestroy</a> (<a class="el" href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> handle)</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="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 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="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 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="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 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="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 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="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="separator:ga1ead8574f9f39fbafc6b497124e7aafa"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:ga414feeffbf860ebd31c745df203de410"><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#ga414feeffbf860ebd31c745df203de410">tjGetErrorCode</a> (<a class="el" href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> handle)</td></tr> |
| <tr class="memdesc:ga414feeffbf860ebd31c745df203de410"><td class="mdescLeft"> </td><td class="mdescRight">Returns a code indicating the severity of the last error. <a href="group___turbo_j_p_e_g.html#ga414feeffbf860ebd31c745df203de410">More...</a><br /></td></tr> |
| <tr class="separator:ga414feeffbf860ebd31c745df203de410"><td class="memSeparator" colspan="2"> </td></tr> |
| </table><table class="memberdecls"> |
| <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a> |
| Variables</h2></td></tr> |
| <tr class="memitem:ga9e61e7cd47a15a173283ba94e781308c"><td class="memItemLeft" align="right" valign="top">static const int </td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#ga9e61e7cd47a15a173283ba94e781308c">tjMCUWidth</a> [<a class="el" href="group___turbo_j_p_e_g.html#ga5ef3d169162ce77ce348e292a0b7477c">TJ_NUMSAMP</a>]</td></tr> |
| <tr class="memdesc:ga9e61e7cd47a15a173283ba94e781308c"><td class="mdescLeft"> </td><td class="mdescRight">MCU block width (in pixels) for a given level of chrominance subsampling. <a href="group___turbo_j_p_e_g.html#ga9e61e7cd47a15a173283ba94e781308c">More...</a><br /></td></tr> |
| <tr class="separator:ga9e61e7cd47a15a173283ba94e781308c"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:gabd247bb9fecb393eca57366feb8327bf"><td class="memItemLeft" align="right" valign="top">static const int </td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#gabd247bb9fecb393eca57366feb8327bf">tjMCUHeight</a> [<a class="el" href="group___turbo_j_p_e_g.html#ga5ef3d169162ce77ce348e292a0b7477c">TJ_NUMSAMP</a>]</td></tr> |
| <tr class="memdesc:gabd247bb9fecb393eca57366feb8327bf"><td class="mdescLeft"> </td><td class="mdescRight">MCU block height (in pixels) for a given level of chrominance subsampling. <a href="group___turbo_j_p_e_g.html#gabd247bb9fecb393eca57366feb8327bf">More...</a><br /></td></tr> |
| <tr class="separator:gabd247bb9fecb393eca57366feb8327bf"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:gadd9b446742ac8a3923f7992c7988fea8"><td class="memItemLeft" align="right" valign="top">static const int </td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#gadd9b446742ac8a3923f7992c7988fea8">tjRedOffset</a> [<a class="el" href="group___turbo_j_p_e_g.html#ga7010a4402f54a45ba822ad8675a4655e">TJ_NUMPF</a>]</td></tr> |
| <tr class="memdesc:gadd9b446742ac8a3923f7992c7988fea8"><td class="mdescLeft"> </td><td class="mdescRight">Red offset (in bytes) for a given pixel format. <a href="group___turbo_j_p_e_g.html#gadd9b446742ac8a3923f7992c7988fea8">More...</a><br /></td></tr> |
| <tr class="separator:gadd9b446742ac8a3923f7992c7988fea8"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:ga82d6e35da441112a411da41923c0ba2f"><td class="memItemLeft" align="right" valign="top">static const int </td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#ga82d6e35da441112a411da41923c0ba2f">tjGreenOffset</a> [<a class="el" href="group___turbo_j_p_e_g.html#ga7010a4402f54a45ba822ad8675a4655e">TJ_NUMPF</a>]</td></tr> |
| <tr class="memdesc:ga82d6e35da441112a411da41923c0ba2f"><td class="mdescLeft"> </td><td class="mdescRight">Green offset (in bytes) for a given pixel format. <a href="group___turbo_j_p_e_g.html#ga82d6e35da441112a411da41923c0ba2f">More...</a><br /></td></tr> |
| <tr class="separator:ga82d6e35da441112a411da41923c0ba2f"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:ga84e2e35d3f08025f976ec1ec53693dea"><td class="memItemLeft" align="right" valign="top">static const int </td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#ga84e2e35d3f08025f976ec1ec53693dea">tjBlueOffset</a> [<a class="el" href="group___turbo_j_p_e_g.html#ga7010a4402f54a45ba822ad8675a4655e">TJ_NUMPF</a>]</td></tr> |
| <tr class="memdesc:ga84e2e35d3f08025f976ec1ec53693dea"><td class="mdescLeft"> </td><td class="mdescRight">Blue offset (in bytes) for a given pixel format. <a href="group___turbo_j_p_e_g.html#ga84e2e35d3f08025f976ec1ec53693dea">More...</a><br /></td></tr> |
| <tr class="separator:ga84e2e35d3f08025f976ec1ec53693dea"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:ga5af0ab065feefd526debf1e20c43e837"><td class="memItemLeft" align="right" valign="top">static const int </td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#ga5af0ab065feefd526debf1e20c43e837">tjAlphaOffset</a> [<a class="el" href="group___turbo_j_p_e_g.html#ga7010a4402f54a45ba822ad8675a4655e">TJ_NUMPF</a>]</td></tr> |
| <tr class="memdesc:ga5af0ab065feefd526debf1e20c43e837"><td class="mdescLeft"> </td><td class="mdescRight">Alpha offset (in bytes) for a given pixel format. <a href="group___turbo_j_p_e_g.html#ga5af0ab065feefd526debf1e20c43e837">More...</a><br /></td></tr> |
| <tr class="separator:ga5af0ab065feefd526debf1e20c43e837"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:gad77cf8fe5b2bfd3cb3f53098146abb4c"><td class="memItemLeft" align="right" valign="top">static const int </td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#gad77cf8fe5b2bfd3cb3f53098146abb4c">tjPixelSize</a> [<a class="el" href="group___turbo_j_p_e_g.html#ga7010a4402f54a45ba822ad8675a4655e">TJ_NUMPF</a>]</td></tr> |
| <tr class="memdesc:gad77cf8fe5b2bfd3cb3f53098146abb4c"><td class="mdescLeft"> </td><td class="mdescRight">Pixel size (in bytes) for a given pixel format. <a href="group___turbo_j_p_e_g.html#gad77cf8fe5b2bfd3cb3f53098146abb4c">More...</a><br /></td></tr> |
| <tr class="separator:gad77cf8fe5b2bfd3cb3f53098146abb4c"><td class="memSeparator" colspan="2"> </td></tr> |
| </table> |
| <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> |
| <p>TurboJPEG API. </p> |
| <p>This API provides an interface for generating, decoding, and transforming planar YUV and JPEG images in memory.</p> |
| <p><a class="anchor" id="YUVnotes"></a></p> |
| <h2><a class="anchor" id="autotoc_md0"></a> |
| 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>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 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> |
| <a id="ga39f57a6fb02d9cf32e7b6890099b5a71"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#ga39f57a6fb02d9cf32e7b6890099b5a71">◆ </a></span>TJ_NUMCS</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">#define TJ_NUMCS</td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>The number of JPEG colorspaces. </p> |
| |
| </div> |
| </div> |
| <a id="ga79bde1b4a3e2351e00887e47781b966e"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#ga79bde1b4a3e2351e00887e47781b966e">◆ </a></span>TJ_NUMERR</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">#define TJ_NUMERR</td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>The number of error codes. </p> |
| |
| </div> |
| </div> |
| <a id="ga7010a4402f54a45ba822ad8675a4655e"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#ga7010a4402f54a45ba822ad8675a4655e">◆ </a></span>TJ_NUMPF</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">#define TJ_NUMPF</td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>The number of pixel formats. </p> |
| |
| </div> |
| </div> |
| <a id="ga5ef3d169162ce77ce348e292a0b7477c"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#ga5ef3d169162ce77ce348e292a0b7477c">◆ </a></span>TJ_NUMSAMP</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">#define TJ_NUMSAMP</td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>The number of chrominance subsampling options. </p> |
| |
| </div> |
| </div> |
| <a id="ga0f6dbd18adf38b7d46ac547f0f4d562c"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#ga0f6dbd18adf38b7d46ac547f0f4d562c">◆ </a></span>TJ_NUMXOP</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">#define TJ_NUMXOP</td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>The number of transform operations. </p> |
| |
| </div> |
| </div> |
| <a id="gacb233cfd722d66d1ccbf48a7de81f0e0"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#gacb233cfd722d66d1ccbf48a7de81f0e0">◆ </a></span>TJFLAG_ACCURATEDCT</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">#define TJFLAG_ACCURATEDCT</td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <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 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> |
| <a id="ga72ecf4ebe6eb702d3c6f5ca27455e1ec"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#ga72ecf4ebe6eb702d3c6f5ca27455e1ec">◆ </a></span>TJFLAG_BOTTOMUP</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">#define TJFLAG_BOTTOMUP</td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <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> |
| <a id="gaabce235db80d3f698b27f36cbd453da2"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#gaabce235db80d3f698b27f36cbd453da2">◆ </a></span>TJFLAG_FASTDCT</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">#define TJFLAG_FASTDCT</td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <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 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> |
| <a id="ga4ee4506c81177a06f77e2504a22efd2d"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#ga4ee4506c81177a06f77e2504a22efd2d">◆ </a></span>TJFLAG_FASTUPSAMPLE</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">#define TJFLAG_FASTUPSAMPLE</td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <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> |
| |
| </div> |
| </div> |
| <a id="ga163e6482dc5096831feef9c79ff3f805"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#ga163e6482dc5096831feef9c79ff3f805">◆ </a></span>TJFLAG_LIMITSCANS</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">#define TJFLAG_LIMITSCANS</td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>Limit the number of progressive JPEG scans that the decompression and transform functions will process. </p> |
| <p>If a progressive JPEG image contains an unreasonably large number of scans, then this flag will cause the decompression and transform functions to return an error. The primary purpose of this is to allow security-critical applications to guard against an exploit of the progressive JPEG format described in <a href="https://libjpeg-turbo.org/pmwiki/uploads/About/TwoIssueswiththeJPEGStandard.pdf" target="_blank">this report</a>. </p> |
| |
| </div> |
| </div> |
| <a id="ga8808d403c68b62aaa58a4c1e58e98963"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#ga8808d403c68b62aaa58a4c1e58e98963">◆ </a></span>TJFLAG_NOREALLOC</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">#define TJFLAG_NOREALLOC</td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <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 destination buffer is invalid or too small, rather than attempt to allocate or reallocate that buffer. </p> |
| |
| </div> |
| </div> |
| <a id="ga43b426750b46190a25d34a67ef76df1b"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#ga43b426750b46190a25d34a67ef76df1b">◆ </a></span>TJFLAG_PROGRESSIVE</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">#define TJFLAG_PROGRESSIVE</td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>Use progressive entropy coding in JPEG images generated by the compression and transform functions. </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> |
| <a id="ga519cfa4ef6c18d9e5b455fdf59306a3a"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#ga519cfa4ef6c18d9e5b455fdf59306a3a">◆ </a></span>TJFLAG_STOPONWARNING</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">#define TJFLAG_STOPONWARNING</td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <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> |
| |
| </div> |
| </div> |
| <a id="ga0aba955473315e405295d978f0c16511"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#ga0aba955473315e405295d978f0c16511">◆ </a></span>TJPAD</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">#define TJPAD</td> |
| <td>(</td> |
| <td class="paramtype"> </td> |
| <td class="paramname">width</td><td>)</td> |
| <td></td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>Pad the given width to the nearest multiple of 4. </p> |
| |
| </div> |
| </div> |
| <a id="ga84878bb65404204743aa18cac02781df"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#ga84878bb65404204743aa18cac02781df">◆ </a></span>TJSCALED</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">#define TJSCALED</td> |
| <td>(</td> |
| <td class="paramtype"> </td> |
| <td class="paramname">dimension, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype"> </td> |
| <td class="paramname">scalingFactor </td> |
| </tr> |
| <tr> |
| <td></td> |
| <td>)</td> |
| <td></td><td></td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>Compute the scaled value of <code>dimension</code> using the given scaling factor. </p> |
| <p>This macro performs the integer equivalent of <code>ceil(dimension * scalingFactor)</code>. </p> |
| |
| </div> |
| </div> |
| <a id="ga153b468cfb905d0de61706c838986fe8"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#ga153b468cfb905d0de61706c838986fe8">◆ </a></span>TJXOPT_COPYNONE</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">#define TJXOPT_COPYNONE</td> |
| </tr> |
| </table> |
| </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 destination image. </p> |
| |
| </div> |
| </div> |
| <a id="ga9c771a757fc1294add611906b89ab2d2"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#ga9c771a757fc1294add611906b89ab2d2">◆ </a></span>TJXOPT_CROP</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">#define TJXOPT_CROP</td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>This option will enable lossless cropping. </p> |
| <p>See <a class="el" href="group___turbo_j_p_e_g.html#ga9cb8abf4cc91881e04a0329b2270be25" title="Losslessly transform a JPEG image into another JPEG image.">tjTransform()</a> for more information. </p> |
| |
| </div> |
| </div> |
| <a id="ga3acee7b48ade1b99e5588736007c2589"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#ga3acee7b48ade1b99e5588736007c2589">◆ </a></span>TJXOPT_GRAY</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">#define TJXOPT_GRAY</td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>This option will discard the color data in the source image and produce a grayscale destination image. </p> |
| |
| </div> |
| </div> |
| <a id="gafbf992bbf6e006705886333703ffab31"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#gafbf992bbf6e006705886333703ffab31">◆ </a></span>TJXOPT_NOOUTPUT</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">#define TJXOPT_NOOUTPUT</td> |
| </tr> |
| </table> |
| </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. </p> |
| <p>(This can be used in conjunction with a custom filter to capture the transformed DCT coefficients without transcoding them.) </p> |
| |
| </div> |
| </div> |
| <a id="ga50e03cb5ed115330e212417429600b00"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#ga50e03cb5ed115330e212417429600b00">◆ </a></span>TJXOPT_PERFECT</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">#define TJXOPT_PERFECT</td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>This option will cause <a class="el" href="group___turbo_j_p_e_g.html#ga9cb8abf4cc91881e04a0329b2270be25" title="Losslessly transform a JPEG image into another JPEG image.">tjTransform()</a> to return an error if the transform is not perfect. </p> |
| <p>Lossless transforms operate on MCU blocks, whose size depends on the level of chrominance subsampling used (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> and <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>.) If the image's width or height is not evenly divisible by the MCU block size, then there will be partial MCU blocks on the right and/or bottom edges. It is not possible to move these partial MCU blocks to the top or left of the image, so any transform that would require that is "imperfect." If this option is not specified, then any partial MCU blocks that cannot be transformed will be left in place, which will create odd-looking strips on the right or bottom edge of the image. </p> |
| |
| </div> |
| </div> |
| <a id="gad2371c80674584ecc1a7d75e564cf026"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#gad2371c80674584ecc1a7d75e564cf026">◆ </a></span>TJXOPT_PROGRESSIVE</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">#define TJXOPT_PROGRESSIVE</td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <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 decompression performance considerably. </p> |
| |
| </div> |
| </div> |
| <a id="ga319826b7eb1583c0595bbe7b95428709"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#ga319826b7eb1583c0595bbe7b95428709">◆ </a></span>TJXOPT_TRIM</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">#define TJXOPT_TRIM</td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>This option will cause <a class="el" href="group___turbo_j_p_e_g.html#ga9cb8abf4cc91881e04a0329b2270be25" title="Losslessly transform a JPEG image into another JPEG image.">tjTransform()</a> to discard any partial MCU blocks that cannot be transformed. </p> |
| |
| </div> |
| </div> |
| <h2 class="groupheader">Typedef Documentation</h2> |
| <a id="ga758d2634ecb4949de7815cba621f5763"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#ga758d2634ecb4949de7815cba621f5763">◆ </a></span>tjhandle</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">typedef void* <a class="el" href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a></td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>TurboJPEG instance handle. </p> |
| |
| </div> |
| </div> |
| <a id="ga504805ec0161f1b505397ca0118bf8fd"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#ga504805ec0161f1b505397ca0118bf8fd">◆ </a></span>tjtransform</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">typedef struct <a class="el" href="structtjtransform.html">tjtransform</a> <a class="el" href="structtjtransform.html">tjtransform</a></td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>Lossless transform. </p> |
| |
| </div> |
| </div> |
| <h2 class="groupheader">Enumeration Type Documentation</h2> |
| <a id="ga4f83ad3368e0e29d1957be0efa7c3720"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#ga4f83ad3368e0e29d1957be0efa7c3720">◆ </a></span>TJCS</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">enum <a class="el" href="group___turbo_j_p_e_g.html#ga4f83ad3368e0e29d1957be0efa7c3720">TJCS</a></td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>JPEG colorspaces. </p> |
| <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> |
| <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> |
| <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 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> |
| <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 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> |
| <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 packed-pixel images with the CMYK pixel format. </p> |
| </td></tr> |
| <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 packed-pixel images with the CMYK pixel format. </p> |
| </td></tr> |
| </table> |
| |
| </div> |
| </div> |
| <a id="gafbc17cfa57d0d5d11fea35ac025950fe"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#gafbc17cfa57d0d5d11fea35ac025950fe">◆ </a></span>TJERR</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">enum <a class="el" href="group___turbo_j_p_e_g.html#gafbc17cfa57d0d5d11fea35ac025950fe">TJERR</a></td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>Error codes. </p> |
| <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 destination image may still be corrupt. </p> |
| </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> |
| </td></tr> |
| </table> |
| |
| </div> |
| </div> |
| <a id="gac916144e26c3817ac514e64ae5d12e2a"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#gac916144e26c3817ac514e64ae5d12e2a">◆ </a></span>TJPF</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">enum <a class="el" href="group___turbo_j_p_e_g.html#gac916144e26c3817ac514e64ae5d12e2a">TJPF</a></td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>Pixel formats. </p> |
| <table class="fieldtable"> |
| <tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="ggac916144e26c3817ac514e64ae5d12e2aa7ce93230bff449518ce387c17e6ed37c"></a>TJPF_RGB </td><td class="fielddoc"><p>RGB pixel format. </p> |
| <p>The red, green, and blue components in the image are stored in 3-byte pixels in the order R, G, B from lowest to highest byte address within each pixel. </p> |
| </td></tr> |
| <tr><td class="fieldname"><a id="ggac916144e26c3817ac514e64ae5d12e2aab10624437fb8ef495a0b153e65749839"></a>TJPF_BGR </td><td class="fielddoc"><p>BGR pixel format. </p> |
| <p>The red, green, and blue components in the image are stored in 3-byte pixels in the order B, G, R from lowest to highest byte address within each pixel. </p> |
| </td></tr> |
| <tr><td class="fieldname"><a id="ggac916144e26c3817ac514e64ae5d12e2aa83973bebb7e2dc6fa8bae89ff3f42e01"></a>TJPF_RGBX </td><td class="fielddoc"><p>RGBX pixel format. </p> |
| <p>The red, green, and blue components in the image are stored in 4-byte pixels in the order R, G, B from lowest to highest byte address within each pixel. The X component is ignored when compressing and undefined when decompressing. </p> |
| </td></tr> |
| <tr><td class="fieldname"><a id="ggac916144e26c3817ac514e64ae5d12e2aa2a1fbf569ca79897eae886e3376ca4c8"></a>TJPF_BGRX </td><td class="fielddoc"><p>BGRX pixel format. </p> |
| <p>The red, green, and blue components in the image are stored in 4-byte pixels in the order B, G, R from lowest to highest byte address within each pixel. The X component is ignored when compressing and undefined when decompressing. </p> |
| </td></tr> |
| <tr><td class="fieldname"><a id="ggac916144e26c3817ac514e64ae5d12e2aaf6603b27147de47e212e75dac027b2af"></a>TJPF_XBGR </td><td class="fielddoc"><p>XBGR pixel format. </p> |
| <p>The red, green, and blue components in the image are stored in 4-byte pixels in the order R, G, B from highest to lowest byte address within each pixel. The X component is ignored when compressing and undefined when decompressing. </p> |
| </td></tr> |
| <tr><td class="fieldname"><a id="ggac916144e26c3817ac514e64ae5d12e2aadae996905efcfa3b42a0bb3bea7f9d84"></a>TJPF_XRGB </td><td class="fielddoc"><p>XRGB pixel format. </p> |
| <p>The red, green, and blue components in the image are stored in 4-byte pixels in the order B, G, R from highest to lowest byte address within each pixel. The X component is ignored when compressing and undefined when decompressing. </p> |
| </td></tr> |
| <tr><td class="fieldname"><a id="ggac916144e26c3817ac514e64ae5d12e2aa5431b54b015337705f13118073711a1a"></a>TJPF_GRAY </td><td class="fielddoc"><p>Grayscale pixel format. </p> |
| <p>Each 1-byte pixel represents a luminance (brightness) level from 0 to 255. </p> |
| </td></tr> |
| <tr><td class="fieldname"><a id="ggac916144e26c3817ac514e64ae5d12e2aa88d2e88fab67f6503cf972e14851cc12"></a>TJPF_RGBA </td><td class="fielddoc"><p>RGBA pixel format. </p> |
| <p>This is the same as <a class="el" href="group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa83973bebb7e2dc6fa8bae89ff3f42e01">TJPF_RGBX</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> |
| <tr><td class="fieldname"><a id="ggac916144e26c3817ac514e64ae5d12e2aac037ff1845cf9b74bb81a3659c2b9fb4"></a>TJPF_BGRA </td><td class="fielddoc"><p>BGRA pixel format. </p> |
| <p>This is the same as <a class="el" href="group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa2a1fbf569ca79897eae886e3376ca4c8">TJPF_BGRX</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> |
| <tr><td class="fieldname"><a id="ggac916144e26c3817ac514e64ae5d12e2aa1ba1a7f1631dbeaa49a0a85fc4a40081"></a>TJPF_ABGR </td><td class="fielddoc"><p>ABGR pixel format. </p> |
| <p>This is the same as <a class="el" href="group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aaf6603b27147de47e212e75dac027b2af">TJPF_XBGR</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> |
| <tr><td class="fieldname"><a id="ggac916144e26c3817ac514e64ae5d12e2aae8f846ed9d9de99b6e1dfe448848765c"></a>TJPF_ARGB </td><td class="fielddoc"><p>ARGB pixel format. </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> |
| <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 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> |
| <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 a packed-pixel image from disk into memory.">tjLoadImage()</a>. </p> |
| </td></tr> |
| </table> |
| |
| </div> |
| </div> |
| <a id="ga1d047060ea80bb9820d540bb928e9074"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#ga1d047060ea80bb9820d540bb928e9074">◆ </a></span>TJSAMP</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">enum <a class="el" href="group___turbo_j_p_e_g.html#ga1d047060ea80bb9820d540bb928e9074">TJSAMP</a></td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <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> |
| <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> |
| <p>The JPEG or YUV image will contain one chrominance component for every pixel in the source image. </p> |
| </td></tr> |
| <tr><td class="fieldname"><a id="gga1d047060ea80bb9820d540bb928e9074a136130902cc578f11f32429b59368404"></a>TJSAMP_422 </td><td class="fielddoc"><p>4:2:2 chrominance subsampling. </p> |
| <p>The JPEG or YUV image will contain one chrominance component for every 2x1 block of pixels in the source image. </p> |
| </td></tr> |
| <tr><td class="fieldname"><a id="gga1d047060ea80bb9820d540bb928e9074a63085dbf683cfe39e513cdb6343e3737"></a>TJSAMP_420 </td><td class="fielddoc"><p>4:2:0 chrominance subsampling. </p> |
| <p>The JPEG or YUV image will contain one chrominance component for every 2x2 block of pixels in the source image. </p> |
| </td></tr> |
| <tr><td class="fieldname"><a id="gga1d047060ea80bb9820d540bb928e9074a3f1c9504842ddc7a48d0f690754b6248"></a>TJSAMP_GRAY </td><td class="fielddoc"><p>Grayscale. </p> |
| <p>The JPEG or YUV image will contain no chrominance components. </p> |
| </td></tr> |
| <tr><td class="fieldname"><a id="gga1d047060ea80bb9820d540bb928e9074accf740e6f3aa6ba20ba922cad13cb974"></a>TJSAMP_440 </td><td class="fielddoc"><p>4:4:0 chrominance subsampling. </p> |
| <p>The JPEG or YUV image will contain one chrominance component for every 1x2 block of pixels in the source image.</p> |
| <dl class="section note"><dt>Note</dt><dd>4:4:0 subsampling is not fully accelerated in libjpeg-turbo. </dd></dl> |
| </td></tr> |
| <tr><td class="fieldname"><a id="gga1d047060ea80bb9820d540bb928e9074a28ec62575e5ea295c3fde3001dc628e2"></a>TJSAMP_411 </td><td class="fielddoc"><p>4:1:1 chrominance subsampling. </p> |
| <p>The JPEG or YUV image will contain one chrominance component for every 4x1 block of pixels in the source image. JPEG images compressed with 4:1:1 subsampling will be almost exactly the same size as those compressed with 4:2:0 subsampling, and in the aggregate, both subsampling methods produce approximately the same perceptual quality. However, 4:1:1 is better able to reproduce sharp horizontal features.</p> |
| <dl class="section note"><dt>Note</dt><dd>4:1:1 subsampling is not fully accelerated in libjpeg-turbo. </dd></dl> |
| </td></tr> |
| </table> |
| |
| </div> |
| </div> |
| <a id="ga2de531af4e7e6c4f124908376b354866"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#ga2de531af4e7e6c4f124908376b354866">◆ </a></span>TJXOP</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">enum <a class="el" href="group___turbo_j_p_e_g.html#ga2de531af4e7e6c4f124908376b354866">TJXOP</a></td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>Transform operations for <a class="el" href="group___turbo_j_p_e_g.html#ga9cb8abf4cc91881e04a0329b2270be25" title="Losslessly transform a JPEG image into another JPEG image.">tjTransform()</a> </p> |
| <table class="fieldtable"> |
| <tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="gga2de531af4e7e6c4f124908376b354866aad88c0366cd3f7d0eac9d7a3fa1c2c27"></a>TJXOP_NONE </td><td class="fielddoc"><p>Do not transform the position of the image pixels. </p> |
| </td></tr> |
| <tr><td class="fieldname"><a id="gga2de531af4e7e6c4f124908376b354866aa0df69776caa30f0fa28e26332d311ce"></a>TJXOP_HFLIP </td><td class="fielddoc"><p>Flip (mirror) image horizontally. </p> |
| <p>This transform is imperfect if there are any partial MCU blocks on the right edge (see <a class="el" href="group___turbo_j_p_e_g.html#ga50e03cb5ed115330e212417429600b00" title="This option will cause tjTransform() to return an error if the transform is not perfect.">TJXOPT_PERFECT</a>.) </p> |
| </td></tr> |
| <tr><td class="fieldname"><a id="gga2de531af4e7e6c4f124908376b354866a324eddfbec53b7e691f61e56929d0d5d"></a>TJXOP_VFLIP </td><td class="fielddoc"><p>Flip (mirror) image vertically. </p> |
| <p>This transform is imperfect if there are any partial MCU blocks on the bottom edge (see <a class="el" href="group___turbo_j_p_e_g.html#ga50e03cb5ed115330e212417429600b00" title="This option will cause tjTransform() to return an error if the transform is not perfect.">TJXOPT_PERFECT</a>.) </p> |
| </td></tr> |
| <tr><td class="fieldname"><a id="gga2de531af4e7e6c4f124908376b354866a31060aed199f886afdd417f80499c32d"></a>TJXOP_TRANSPOSE </td><td class="fielddoc"><p>Transpose image (flip/mirror along upper left to lower right axis.) This transform is always perfect. </p> |
| </td></tr> |
| <tr><td class="fieldname"><a id="gga2de531af4e7e6c4f124908376b354866af3b14d488aea6ece9e5b3df73a74d6a4"></a>TJXOP_TRANSVERSE </td><td class="fielddoc"><p>Transverse transpose image (flip/mirror along upper right to lower left axis.) This transform is imperfect if there are any partial MCU blocks in the image (see <a class="el" href="group___turbo_j_p_e_g.html#ga50e03cb5ed115330e212417429600b00" title="This option will cause tjTransform() to return an error if the transform is not perfect.">TJXOPT_PERFECT</a>.) </p> |
| </td></tr> |
| <tr><td class="fieldname"><a id="gga2de531af4e7e6c4f124908376b354866a43b2bbb23bc4bd548422d43fbe9af128"></a>TJXOP_ROT90 </td><td class="fielddoc"><p>Rotate image clockwise by 90 degrees. </p> |
| <p>This transform is imperfect if there are any partial MCU blocks on the bottom edge (see <a class="el" href="group___turbo_j_p_e_g.html#ga50e03cb5ed115330e212417429600b00" title="This option will cause tjTransform() to return an error if the transform is not perfect.">TJXOPT_PERFECT</a>.) </p> |
| </td></tr> |
| <tr><td class="fieldname"><a id="gga2de531af4e7e6c4f124908376b354866a140952eb8dd0300accfcc22726d69692"></a>TJXOP_ROT180 </td><td class="fielddoc"><p>Rotate image 180 degrees. </p> |
| <p>This transform is imperfect if there are any partial MCU blocks in the image (see <a class="el" href="group___turbo_j_p_e_g.html#ga50e03cb5ed115330e212417429600b00" title="This option will cause tjTransform() to return an error if the transform is not perfect.">TJXOPT_PERFECT</a>.) </p> |
| </td></tr> |
| <tr><td class="fieldname"><a id="gga2de531af4e7e6c4f124908376b354866a3064ee5dfb7f032df332818587567a08"></a>TJXOP_ROT270 </td><td class="fielddoc"><p>Rotate image counter-clockwise by 90 degrees. </p> |
| <p>This transform is imperfect if there are any partial MCU blocks on the right edge (see <a class="el" href="group___turbo_j_p_e_g.html#ga50e03cb5ed115330e212417429600b00" title="This option will cause tjTransform() to return an error if the transform is not perfect.">TJXOPT_PERFECT</a>.) </p> |
| </td></tr> |
| </table> |
| |
| </div> |
| </div> |
| <h2 class="groupheader">Function Documentation</h2> |
| <a id="gaec627dd4c5f30b7a775a7aea3bec5d83"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#gaec627dd4c5f30b7a775a7aea3bec5d83">◆ </a></span>tjAlloc()</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">DLLEXPORT unsigned char* tjAlloc </td> |
| <td>(</td> |
| <td class="paramtype">int </td> |
| <td class="paramname"><em>bytes</em></td><td>)</td> |
| <td></td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <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 JPEG buffer (re)allocation.">TJFLAG_NOREALLOC</a>.)</p> |
| <dl class="params"><dt>Parameters</dt><dd> |
| <table class="params"> |
| <tr><td class="paramname">bytes</td><td>the number of bytes to allocate</td></tr> |
| </table> |
| </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 a byte buffer previously allocated by TurboJPEG.">tjFree()</a> </dd></dl> |
| |
| </div> |
| </div> |
| <a id="ga67ac12fee79073242cb216e07c9f1f90"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#ga67ac12fee79073242cb216e07c9f1f90">◆ </a></span>tjBufSize()</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">DLLEXPORT unsigned long tjBufSize </td> |
| <td>(</td> |
| <td class="paramtype">int </td> |
| <td class="paramname"><em>width</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">int </td> |
| <td class="paramname"><em>height</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">int </td> |
| <td class="paramname"><em>jpegSubsamp</em> </td> |
| </tr> |
| <tr> |
| <td></td> |
| <td>)</td> |
| <td></td><td></td> |
| </tr> |
| </table> |
| </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 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> |
| <table class="params"> |
| <tr><td class="paramname">width</td><td>width (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">jpegSubsamp</td><td>the level of chrominance subsampling to be used when generating the JPEG image (see <a class="el" href="group___turbo_j_p_e_g.html#ga1d047060ea80bb9820d540bb928e9074">Chrominance subsampling options</a>.)</td></tr> |
| </table> |
| </dd> |
| </dl> |
| <dl class="section return"><dt>Returns</dt><dd>the maximum size of the buffer (in bytes) required to hold the image, or -1 if the arguments are out of bounds. </dd></dl> |
| |
| </div> |
| </div> |
| <a id="ga5e5aac9e8bcf17049279301e2466474c"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#ga5e5aac9e8bcf17049279301e2466474c">◆ </a></span>tjBufSizeYUV2()</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">DLLEXPORT unsigned long tjBufSizeYUV2 </td> |
| <td>(</td> |
| <td class="paramtype">int </td> |
| <td class="paramname"><em>width</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">int </td> |
| <td class="paramname"><em>align</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">int </td> |
| <td class="paramname"><em>height</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">int </td> |
| <td class="paramname"><em>subsamp</em> </td> |
| </tr> |
| <tr> |
| <td></td> |
| <td>)</td> |
| <td></td><td></td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>The size of the buffer (in bytes) required to hold a unified planar YUV image with the given parameters. </p> |
| <dl class="params"><dt>Parameters</dt><dd> |
| <table class="params"> |
| <tr><td class="paramname">width</td><td>width (in pixels) of the image</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">subsamp</td><td>level of chrominance subsampling in the image (see <a class="el" href="group___turbo_j_p_e_g.html#ga1d047060ea80bb9820d540bb928e9074">Chrominance subsampling options</a>.)</td></tr> |
| </table> |
| </dd> |
| </dl> |
| <dl class="section return"><dt>Returns</dt><dd>the size of the buffer (in bytes) required to hold the image, or -1 if the arguments are out of bounds. </dd></dl> |
| |
| </div> |
| </div> |
| <a id="gafbdce0112fd78fd38efae841443a9bcf"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#gafbdce0112fd78fd38efae841443a9bcf">◆ </a></span>tjCompress2()</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">DLLEXPORT int tjCompress2 </td> |
| <td>(</td> |
| <td class="paramtype"><a class="el" href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> </td> |
| <td class="paramname"><em>handle</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">const unsigned char * </td> |
| <td class="paramname"><em>srcBuf</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">int </td> |
| <td class="paramname"><em>width</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">int </td> |
| <td class="paramname"><em>pitch</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">int </td> |
| <td class="paramname"><em>height</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">int </td> |
| <td class="paramname"><em>pixelFormat</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">unsigned char ** </td> |
| <td class="paramname"><em>jpegBuf</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">unsigned long * </td> |
| <td class="paramname"><em>jpegSize</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">int </td> |
| <td class="paramname"><em>jpegSubsamp</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">int </td> |
| <td class="paramname"><em>jpegQual</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">int </td> |
| <td class="paramname"><em>flags</em> </td> |
| </tr> |
| <tr> |
| <td></td> |
| <td>)</td> |
| <td></td><td></td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>Compress a packed-pixel RGB, grayscale, or CMYK image into a JPEG image. </p> |
| <dl class="params"><dt>Parameters</dt><dd> |
| <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">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">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">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 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 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>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> |
| 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 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">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> |
| </table> |
| </dd> |
| </dl> |
| <dl class="section return"><dt>Returns</dt><dd>0 if successful, or -1 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> and <a class="el" href="group___turbo_j_p_e_g.html#ga414feeffbf860ebd31c745df203de410" title="Returns a code indicating the severity of the last error.">tjGetErrorCode()</a>.) </dd></dl> |
| |
| </div> |
| </div> |
| <a id="gab40f5096a72fd7e5bda9d6b58fa37e2e"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#gab40f5096a72fd7e5bda9d6b58fa37e2e">◆ </a></span>tjCompressFromYUV()</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">DLLEXPORT int tjCompressFromYUV </td> |
| <td>(</td> |
| <td class="paramtype"><a class="el" href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> </td> |
| <td class="paramname"><em>handle</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">const unsigned char * </td> |
| <td class="paramname"><em>srcBuf</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">int </td> |
| <td class="paramname"><em>width</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">int </td> |
| <td class="paramname"><em>align</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">int </td> |
| <td class="paramname"><em>height</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">int </td> |
| <td class="paramname"><em>subsamp</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">unsigned char ** </td> |
| <td class="paramname"><em>jpegBuf</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">unsigned long * </td> |
| <td class="paramname"><em>jpegSize</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">int </td> |
| <td class="paramname"><em>jpegQual</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">int </td> |
| <td class="paramname"><em>flags</em> </td> |
| </tr> |
| <tr> |
| <td></td> |
| <td>)</td> |
| <td></td><td></td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>Compress a unified planar YUV image into a JPEG image. </p> |
| <dl class="params"><dt>Parameters</dt><dd> |
| <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">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.</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.</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 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 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>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> |
| 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 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">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> |
| </dd> |
| </dl> |
| <dl class="section return"><dt>Returns</dt><dd>0 if successful, or -1 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> and <a class="el" href="group___turbo_j_p_e_g.html#ga414feeffbf860ebd31c745df203de410" title="Returns a code indicating the severity of the last error.">tjGetErrorCode()</a>.) </dd></dl> |
| |
| </div> |
| </div> |
| <a id="ga29ec5dfbd2d84b8724e951d6fa0d5d9e"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#ga29ec5dfbd2d84b8724e951d6fa0d5d9e">◆ </a></span>tjCompressFromYUVPlanes()</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">DLLEXPORT int tjCompressFromYUVPlanes </td> |
| <td>(</td> |
| <td class="paramtype"><a class="el" href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> </td> |
| <td class="paramname"><em>handle</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">const unsigned char ** </td> |
| <td class="paramname"><em>srcPlanes</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">int </td> |
| <td class="paramname"><em>width</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">const int * </td> |
| <td class="paramname"><em>strides</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">int </td> |
| <td class="paramname"><em>height</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">int </td> |
| <td class="paramname"><em>subsamp</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">unsigned char ** </td> |
| <td class="paramname"><em>jpegBuf</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">unsigned long * </td> |
| <td class="paramname"><em>jpegSize</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">int </td> |
| <td class="paramname"><em>jpegQual</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">int </td> |
| <td class="paramname"><em>flags</em> </td> |
| </tr> |
| <tr> |
| <td></td> |
| <td>)</td> |
| <td></td><td></td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>Compress a set of Y, U (Cb), and V (Cr) image planes into a JPEG image. </p> |
| <dl class="params"><dt>Parameters</dt><dd> |
| <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">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.</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.</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 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 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>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> |
| 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 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">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> |
| </dd> |
| </dl> |
| <dl class="section return"><dt>Returns</dt><dd>0 if successful, or -1 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> and <a class="el" href="group___turbo_j_p_e_g.html#ga414feeffbf860ebd31c745df203de410" title="Returns a code indicating the severity of the last error.">tjGetErrorCode()</a>.) </dd></dl> |
| |
| </div> |
| </div> |
| <a id="ga97c2cedc1e2bade15a84164c94e503c1"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#ga97c2cedc1e2bade15a84164c94e503c1">◆ </a></span>tjDecodeYUV()</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">DLLEXPORT int tjDecodeYUV </td> |
| <td>(</td> |
| <td class="paramtype"><a class="el" href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> </td> |
| <td class="paramname"><em>handle</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">const unsigned char * </td> |
| <td class="paramname"><em>srcBuf</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">int </td> |
| <td class="paramname"><em>align</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">int </td> |
| <td class="paramname"><em>subsamp</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">unsigned char * </td> |
| <td class="paramname"><em>dstBuf</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">int </td> |
| <td class="paramname"><em>width</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">int </td> |
| <td class="paramname"><em>pitch</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">int </td> |
| <td class="paramname"><em>height</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">int </td> |
| <td class="paramname"><em>pixelFormat</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">int </td> |
| <td class="paramname"><em>flags</em> </td> |
| </tr> |
| <tr> |
| <td></td> |
| <td>)</td> |
| <td></td><td></td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>Decode a unified planar YUV image into a packed-pixel RGB or grayscale image. </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> |
| <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">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">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">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">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">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> |
| </table> |
| </dd> |
| </dl> |
| <dl class="section return"><dt>Returns</dt><dd>0 if successful, or -1 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> and <a class="el" href="group___turbo_j_p_e_g.html#ga414feeffbf860ebd31c745df203de410" title="Returns a code indicating the severity of the last error.">tjGetErrorCode()</a>.) </dd></dl> |
| |
| </div> |
| </div> |
| <a id="ga10e837c07fa9d25770565b237d3898d9"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#ga10e837c07fa9d25770565b237d3898d9">◆ </a></span>tjDecodeYUVPlanes()</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">DLLEXPORT int tjDecodeYUVPlanes </td> |
| <td>(</td> |
| <td class="paramtype"><a class="el" href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> </td> |
| <td class="paramname"><em>handle</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">const unsigned char ** </td> |
| <td class="paramname"><em>srcPlanes</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">const int * </td> |
| <td class="paramname"><em>strides</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">int </td> |
| <td class="paramname"><em>subsamp</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">unsigned char * </td> |
| <td class="paramname"><em>dstBuf</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">int </td> |
| <td class="paramname"><em>width</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">int </td> |
| <td class="paramname"><em>pitch</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">int </td> |
| <td class="paramname"><em>height</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">int </td> |
| <td class="paramname"><em>pixelFormat</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">int </td> |
| <td class="paramname"><em>flags</em> </td> |
| </tr> |
| <tr> |
| <td></td> |
| <td>)</td> |
| <td></td><td></td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <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 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> |
| <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">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 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">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">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">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> |
| </table> |
| </dd> |
| </dl> |
| <dl class="section return"><dt>Returns</dt><dd>0 if successful, or -1 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> and <a class="el" href="group___turbo_j_p_e_g.html#ga414feeffbf860ebd31c745df203de410" title="Returns a code indicating the severity of the last error.">tjGetErrorCode()</a>.) </dd></dl> |
| |
| </div> |
| </div> |
| <a id="gae9eccef8b682a48f43a9117c231ed013"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#gae9eccef8b682a48f43a9117c231ed013">◆ </a></span>tjDecompress2()</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">DLLEXPORT int tjDecompress2 </td> |
| <td>(</td> |
| <td class="paramtype"><a class="el" href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> </td> |
| <td class="paramname"><em>handle</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">const unsigned char * </td> |
| <td class="paramname"><em>jpegBuf</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">unsigned long </td> |
| <td class="paramname"><em>jpegSize</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">unsigned char * </td> |
| <td class="paramname"><em>dstBuf</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">int </td> |
| <td class="paramname"><em>width</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">int </td> |
| <td class="paramname"><em>pitch</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">int </td> |
| <td class="paramname"><em>height</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">int </td> |
| <td class="paramname"><em>pixelFormat</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">int </td> |
| <td class="paramname"><em>flags</em> </td> |
| </tr> |
| <tr> |
| <td></td> |
| <td>)</td> |
| <td></td><td></td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>Decompress a JPEG image into a packed-pixel RGB, grayscale, or CMYK image. </p> |
| <dl class="params"><dt>Parameters</dt><dd> |
| <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">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">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">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">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> |
| </table> |
| </dd> |
| </dl> |
| <dl class="section return"><dt>Returns</dt><dd>0 if successful, or -1 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> and <a class="el" href="group___turbo_j_p_e_g.html#ga414feeffbf860ebd31c745df203de410" title="Returns a code indicating the severity of the last error.">tjGetErrorCode()</a>.) </dd></dl> |
| |
| </div> |
| </div> |
| <a id="ga0595681096bba7199cc6f3533cb25f77"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#ga0595681096bba7199cc6f3533cb25f77">◆ </a></span>tjDecompressHeader3()</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">DLLEXPORT int tjDecompressHeader3 </td> |
| <td>(</td> |
| <td class="paramtype"><a class="el" href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> </td> |
| <td class="paramname"><em>handle</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">const unsigned char * </td> |
| <td class="paramname"><em>jpegBuf</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">unsigned long </td> |
| <td class="paramname"><em>jpegSize</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">int * </td> |
| <td class="paramname"><em>width</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">int * </td> |
| <td class="paramname"><em>height</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">int * </td> |
| <td class="paramname"><em>jpegSubsamp</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">int * </td> |
| <td class="paramname"><em>jpegColorspace</em> </td> |
| </tr> |
| <tr> |
| <td></td> |
| <td>)</td> |
| <td></td><td></td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>Retrieve information about a JPEG image without decompressing it, or prime the decompressor with quantization and Huffman tables. </p> |
| <dl class="params"><dt>Parameters</dt><dd> |
| <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">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">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">jpegSubsamp</td><td>pointer to an integer variable that will receive the level of chrominance subsampling used when the JPEG image was compressed (see <a class="el" href="group___turbo_j_p_e_g.html#ga1d047060ea80bb9820d540bb928e9074">Chrominance subsampling options</a>.) If <code>jpegBuf</code> points to a tables-only datastream, then <code>jpegSubsamp</code> is ignored.</td></tr> |
| <tr><td class="paramname">jpegColorspace</td><td>pointer to an integer variable that will receive one of the JPEG colorspace constants, indicating the colorspace of the JPEG image (see <a class="el" href="group___turbo_j_p_e_g.html#ga4f83ad3368e0e29d1957be0efa7c3720">JPEG colorspaces</a>.) If <code>jpegBuf</code> points to a tables-only datastream, then <code>jpegColorspace</code> is ignored.</td></tr> |
| </table> |
| </dd> |
| </dl> |
| <dl class="section return"><dt>Returns</dt><dd>0 if successful, or -1 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> and <a class="el" href="group___turbo_j_p_e_g.html#ga414feeffbf860ebd31c745df203de410" title="Returns a code indicating the severity of the last error.">tjGetErrorCode()</a>.) </dd></dl> |
| |
| </div> |
| </div> |
| <a id="ga5a3093e325598c17a9f004323af6fafa"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#ga5a3093e325598c17a9f004323af6fafa">◆ </a></span>tjDecompressToYUV2()</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">DLLEXPORT int tjDecompressToYUV2 </td> |
| <td>(</td> |
| <td class="paramtype"><a class="el" href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> </td> |
| <td class="paramname"><em>handle</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">const unsigned char * </td> |
| <td class="paramname"><em>jpegBuf</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">unsigned long </td> |
| <td class="paramname"><em>jpegSize</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">unsigned char * </td> |
| <td class="paramname"><em>dstBuf</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">int </td> |
| <td class="paramname"><em>width</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">int </td> |
| <td class="paramname"><em>align</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">int </td> |
| <td class="paramname"><em>height</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">int </td> |
| <td class="paramname"><em>flags</em> </td> |
| </tr> |
| <tr> |
| <td></td> |
| <td>)</td> |
| <td></td><td></td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <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 a packed-pixel image.</p> |
| <dl class="params"><dt>Parameters</dt><dd> |
| <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">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">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.</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.</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> |
| </dd> |
| </dl> |
| <dl class="section return"><dt>Returns</dt><dd>0 if successful, or -1 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> and <a class="el" href="group___turbo_j_p_e_g.html#ga414feeffbf860ebd31c745df203de410" title="Returns a code indicating the severity of the last error.">tjGetErrorCode()</a>.) </dd></dl> |
| |
| </div> |
| </div> |
| <a id="gaa59f901a5258ada5bd0185ad59368540"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#gaa59f901a5258ada5bd0185ad59368540">◆ </a></span>tjDecompressToYUVPlanes()</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">DLLEXPORT int tjDecompressToYUVPlanes </td> |
| <td>(</td> |
| <td class="paramtype"><a class="el" href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> </td> |
| <td class="paramname"><em>handle</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">const unsigned char * </td> |
| <td class="paramname"><em>jpegBuf</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">unsigned long </td> |
| <td class="paramname"><em>jpegSize</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">unsigned char ** </td> |
| <td class="paramname"><em>dstPlanes</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">int </td> |
| <td class="paramname"><em>width</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">int * </td> |
| <td class="paramname"><em>strides</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">int </td> |
| <td class="paramname"><em>height</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">int </td> |
| <td class="paramname"><em>flags</em> </td> |
| </tr> |
| <tr> |
| <td></td> |
| <td>)</td> |
| <td></td><td></td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <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 a packed-pixel image.</p> |
| <dl class="params"><dt>Parameters</dt><dd> |
| <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">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">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.</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.</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> |
| </dd> |
| </dl> |
| <dl class="section return"><dt>Returns</dt><dd>0 if successful, or -1 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> and <a class="el" href="group___turbo_j_p_e_g.html#ga414feeffbf860ebd31c745df203de410" title="Returns a code indicating the severity of the last error.">tjGetErrorCode()</a>.) </dd></dl> |
| |
| </div> |
| </div> |
| <a id="ga75f355fa27225ba1a4ee392c852394d2"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#ga75f355fa27225ba1a4ee392c852394d2">◆ </a></span>tjDestroy()</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">DLLEXPORT int tjDestroy </td> |
| <td>(</td> |
| <td class="paramtype"><a class="el" href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> </td> |
| <td class="paramname"><em>handle</em></td><td>)</td> |
| <td></td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>Destroy a TurboJPEG compressor, decompressor, or transformer instance. </p> |
| <dl class="params"><dt>Parameters</dt><dd> |
| <table class="params"> |
| <tr><td class="paramname">handle</td><td>a handle to a TurboJPEG compressor, decompressor or
|