|
|
|
|
@@ -22,7 +22,7 @@
|
|
|
|
|
<tbody>
|
|
|
|
|
<tr id="projectrow">
|
|
|
|
|
<td id="projectalign">
|
|
|
|
|
<div id="projectname">TurboJPEG<span id="projectnumber"> 3.0.1</span>
|
|
|
|
|
<div id="projectname">TurboJPEG<span id="projectnumber"> 3.0.2</span>
|
|
|
|
|
</div>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
@@ -278,13 +278,13 @@ Functions</h2></td></tr>
|
|
|
|
|
<tr class="memdesc:ga34af9ba3183bdf0ec7c8f47bb9a4c84f"><td class="mdescLeft"> </td><td class="mdescRight">Get the value of a parameter. <br /></td></tr>
|
|
|
|
|
<tr class="separator:ga34af9ba3183bdf0ec7c8f47bb9a4c84f"><td class="memSeparator" colspan="2"> </td></tr>
|
|
|
|
|
<tr class="memitem:ga2cc418a2dab709ad7f30f5b25905f138" id="r_ga2cc418a2dab709ad7f30f5b25905f138"><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#ga2cc418a2dab709ad7f30f5b25905f138">tj3Compress8</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, size_t *jpegSize)</td></tr>
|
|
|
|
|
<tr class="memdesc:ga2cc418a2dab709ad7f30f5b25905f138"><td class="mdescLeft"> </td><td class="mdescRight">Compress an 8-bit-per-sample packed-pixel RGB, grayscale, or CMYK image into an 8-bit-per-sample JPEG image. <br /></td></tr>
|
|
|
|
|
<tr class="memdesc:ga2cc418a2dab709ad7f30f5b25905f138"><td class="mdescLeft"> </td><td class="mdescRight">Compress a packed-pixel RGB, grayscale, or CMYK image with 2 to 8 bits of data precision per sample into a JPEG image with the same data precision. <br /></td></tr>
|
|
|
|
|
<tr class="separator:ga2cc418a2dab709ad7f30f5b25905f138"><td class="memSeparator" colspan="2"> </td></tr>
|
|
|
|
|
<tr class="memitem:ga9a1968c384ec7abb6122830253ebf570" id="r_ga9a1968c384ec7abb6122830253ebf570"><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#ga9a1968c384ec7abb6122830253ebf570">tj3Compress12</a> (<a class="el" href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> handle, const short *srcBuf, int width, int pitch, int height, int pixelFormat, unsigned char **jpegBuf, size_t *jpegSize)</td></tr>
|
|
|
|
|
<tr class="memdesc:ga9a1968c384ec7abb6122830253ebf570"><td class="mdescLeft"> </td><td class="mdescRight">Compress a 12-bit-per-sample packed-pixel RGB, grayscale, or CMYK image into a 12-bit-per-sample JPEG image. <br /></td></tr>
|
|
|
|
|
<tr class="memdesc:ga9a1968c384ec7abb6122830253ebf570"><td class="mdescLeft"> </td><td class="mdescRight">Compress a packed-pixel RGB, grayscale, or CMYK image with 9 to 12 bits of data precision per sample into a JPEG image with the same data precision. <br /></td></tr>
|
|
|
|
|
<tr class="separator:ga9a1968c384ec7abb6122830253ebf570"><td class="memSeparator" colspan="2"> </td></tr>
|
|
|
|
|
<tr class="memitem:ga77901b71d0471784f318ada31ff4e7bd" id="r_ga77901b71d0471784f318ada31ff4e7bd"><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#ga77901b71d0471784f318ada31ff4e7bd">tj3Compress16</a> (<a class="el" href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> handle, const unsigned short *srcBuf, int width, int pitch, int height, int pixelFormat, unsigned char **jpegBuf, size_t *jpegSize)</td></tr>
|
|
|
|
|
<tr class="memdesc:ga77901b71d0471784f318ada31ff4e7bd"><td class="mdescLeft"> </td><td class="mdescRight">Compress a 16-bit-per-sample packed-pixel RGB, grayscale, or CMYK image into a 16-bit-per-sample lossless JPEG image. <br /></td></tr>
|
|
|
|
|
<tr class="memdesc:ga77901b71d0471784f318ada31ff4e7bd"><td class="mdescLeft"> </td><td class="mdescRight">Compress a packed-pixel RGB, grayscale, or CMYK image with 13 to 16 bits of data precision per sample into a lossless JPEG image with the same data precision. <br /></td></tr>
|
|
|
|
|
<tr class="separator:ga77901b71d0471784f318ada31ff4e7bd"><td class="memSeparator" colspan="2"> </td></tr>
|
|
|
|
|
<tr class="memitem:ga041c870d9c669eb3f385c78f4346c43f" id="r_ga041c870d9c669eb3f385c78f4346c43f"><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#ga041c870d9c669eb3f385c78f4346c43f">tj3CompressFromYUV8</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, unsigned char **jpegBuf, size_t *jpegSize)</td></tr>
|
|
|
|
|
<tr class="memdesc:ga041c870d9c669eb3f385c78f4346c43f"><td class="mdescLeft"> </td><td class="mdescRight">Compress an 8-bit-per-sample unified planar YUV image into an 8-bit-per-sample JPEG image. <br /></td></tr>
|
|
|
|
|
@@ -326,13 +326,13 @@ Functions</h2></td></tr>
|
|
|
|
|
<tr class="memdesc:gaa49c7bd4c9431667a043cfc93388ba1c"><td class="mdescLeft"> </td><td class="mdescRight">Set the cropping region for partially decompressing a lossy JPEG image into a packed-pixel image. <br /></td></tr>
|
|
|
|
|
<tr class="separator:gaa49c7bd4c9431667a043cfc93388ba1c"><td class="memSeparator" colspan="2"> </td></tr>
|
|
|
|
|
<tr class="memitem:ga1169c7c1a26ec18c9e6122cb8ae64013" id="r_ga1169c7c1a26ec18c9e6122cb8ae64013"><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#ga1169c7c1a26ec18c9e6122cb8ae64013">tj3Decompress8</a> (<a class="el" href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> handle, const unsigned char *jpegBuf, size_t jpegSize, unsigned char *dstBuf, int pitch, int pixelFormat)</td></tr>
|
|
|
|
|
<tr class="memdesc:ga1169c7c1a26ec18c9e6122cb8ae64013"><td class="mdescLeft"> </td><td class="mdescRight">Decompress an 8-bit-per-sample JPEG image into an 8-bit-per-sample packed-pixel RGB, grayscale, or CMYK image. <br /></td></tr>
|
|
|
|
|
<tr class="memdesc:ga1169c7c1a26ec18c9e6122cb8ae64013"><td class="mdescLeft"> </td><td class="mdescRight">Decompress a JPEG image with 2 to 8 bits of data precision per sample into a packed-pixel RGB, grayscale, or CMYK image with the same data precision. <br /></td></tr>
|
|
|
|
|
<tr class="separator:ga1169c7c1a26ec18c9e6122cb8ae64013"><td class="memSeparator" colspan="2"> </td></tr>
|
|
|
|
|
<tr class="memitem:ga39b848f01781ad74a5b3941c012b6199" id="r_ga39b848f01781ad74a5b3941c012b6199"><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#ga39b848f01781ad74a5b3941c012b6199">tj3Decompress12</a> (<a class="el" href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> handle, const unsigned char *jpegBuf, size_t jpegSize, short *dstBuf, int pitch, int pixelFormat)</td></tr>
|
|
|
|
|
<tr class="memdesc:ga39b848f01781ad74a5b3941c012b6199"><td class="mdescLeft"> </td><td class="mdescRight">Decompress a 12-bit-per-sample JPEG image into a 12-bit-per-sample packed-pixel RGB, grayscale, or CMYK image. <br /></td></tr>
|
|
|
|
|
<tr class="memdesc:ga39b848f01781ad74a5b3941c012b6199"><td class="mdescLeft"> </td><td class="mdescRight">Decompress a JPEG image with 9 to 12 bits of data precision per sample into a packed-pixel RGB, grayscale, or CMYK image with the same data precision. <br /></td></tr>
|
|
|
|
|
<tr class="separator:ga39b848f01781ad74a5b3941c012b6199"><td class="memSeparator" colspan="2"> </td></tr>
|
|
|
|
|
<tr class="memitem:gaa074e63f9beb0b3ff42b833a4049df6e" id="r_gaa074e63f9beb0b3ff42b833a4049df6e"><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#gaa074e63f9beb0b3ff42b833a4049df6e">tj3Decompress16</a> (<a class="el" href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> handle, const unsigned char *jpegBuf, size_t jpegSize, unsigned short *dstBuf, int pitch, int pixelFormat)</td></tr>
|
|
|
|
|
<tr class="memdesc:gaa074e63f9beb0b3ff42b833a4049df6e"><td class="mdescLeft"> </td><td class="mdescRight">Decompress a 16-bit-per-sample lossless JPEG image into a 16-bit-per-sample packed-pixel RGB, grayscale, or CMYK image. <br /></td></tr>
|
|
|
|
|
<tr class="memdesc:gaa074e63f9beb0b3ff42b833a4049df6e"><td class="mdescLeft"> </td><td class="mdescRight">Decompress a lossless JPEG image with 13 to 16 bits of data precision per sample into a packed-pixel RGB, grayscale, or CMYK image with the same data precision. <br /></td></tr>
|
|
|
|
|
<tr class="separator:gaa074e63f9beb0b3ff42b833a4049df6e"><td class="memSeparator" colspan="2"> </td></tr>
|
|
|
|
|
<tr class="memitem:ga1e6bf6a19fec3f9fa7534348879d8320" id="r_ga1e6bf6a19fec3f9fa7534348879d8320"><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#ga1e6bf6a19fec3f9fa7534348879d8320">tj3DecompressToYUV8</a> (<a class="el" href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> handle, const unsigned char *jpegBuf, size_t jpegSize, unsigned char *dstBuf, int align)</td></tr>
|
|
|
|
|
<tr class="memdesc:ga1e6bf6a19fec3f9fa7534348879d8320"><td class="mdescLeft"> </td><td class="mdescRight">Decompress an 8-bit-per-sample JPEG image into an 8-bit-per-sample unified planar YUV image. <br /></td></tr>
|
|
|
|
|
@@ -356,22 +356,22 @@ Functions</h2></td></tr>
|
|
|
|
|
<tr class="memdesc:ga1a2c96d8b47530b6e6050ba6f10b7c57"><td class="mdescLeft"> </td><td class="mdescRight">Allocate a byte buffer for use with TurboJPEG. <br /></td></tr>
|
|
|
|
|
<tr class="separator:ga1a2c96d8b47530b6e6050ba6f10b7c57"><td class="memSeparator" colspan="2"> </td></tr>
|
|
|
|
|
<tr class="memitem:ga884023536e70985616126a073f662001" id="r_ga884023536e70985616126a073f662001"><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#ga884023536e70985616126a073f662001">tj3LoadImage8</a> (<a class="el" href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> handle, const char *filename, int *width, int align, int *height, int *pixelFormat)</td></tr>
|
|
|
|
|
<tr class="memdesc:ga884023536e70985616126a073f662001"><td class="mdescLeft"> </td><td class="mdescRight">Load an 8-bit-per-sample packed-pixel image from disk into memory. <br /></td></tr>
|
|
|
|
|
<tr class="memdesc:ga884023536e70985616126a073f662001"><td class="mdescLeft"> </td><td class="mdescRight">Load a packed-pixel image with 2 to 8 bits of data precision per sample from disk into memory. <br /></td></tr>
|
|
|
|
|
<tr class="separator:ga884023536e70985616126a073f662001"><td class="memSeparator" colspan="2"> </td></tr>
|
|
|
|
|
<tr class="memitem:gaa1d3772cfdb53afa21aae3c606238d44" id="r_gaa1d3772cfdb53afa21aae3c606238d44"><td class="memItemLeft" align="right" valign="top">DLLEXPORT short * </td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#gaa1d3772cfdb53afa21aae3c606238d44">tj3LoadImage12</a> (<a class="el" href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> handle, const char *filename, int *width, int align, int *height, int *pixelFormat)</td></tr>
|
|
|
|
|
<tr class="memdesc:gaa1d3772cfdb53afa21aae3c606238d44"><td class="mdescLeft"> </td><td class="mdescRight">Load a 12-bit-per-sample packed-pixel image from disk into memory. <br /></td></tr>
|
|
|
|
|
<tr class="memdesc:gaa1d3772cfdb53afa21aae3c606238d44"><td class="mdescLeft"> </td><td class="mdescRight">Load a packed-pixel image with 9 to 12 bits of data precision per sample from disk into memory. <br /></td></tr>
|
|
|
|
|
<tr class="separator:gaa1d3772cfdb53afa21aae3c606238d44"><td class="memSeparator" colspan="2"> </td></tr>
|
|
|
|
|
<tr class="memitem:gace4240b665dc47742cbb3b76b03dfd69" id="r_gace4240b665dc47742cbb3b76b03dfd69"><td class="memItemLeft" align="right" valign="top">DLLEXPORT unsigned short * </td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#gace4240b665dc47742cbb3b76b03dfd69">tj3LoadImage16</a> (<a class="el" href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> handle, const char *filename, int *width, int align, int *height, int *pixelFormat)</td></tr>
|
|
|
|
|
<tr class="memdesc:gace4240b665dc47742cbb3b76b03dfd69"><td class="mdescLeft"> </td><td class="mdescRight">Load a 16-bit-per-sample packed-pixel image from disk into memory. <br /></td></tr>
|
|
|
|
|
<tr class="memdesc:gace4240b665dc47742cbb3b76b03dfd69"><td class="mdescLeft"> </td><td class="mdescRight">Load a packed-pixel image with 13 to 16 bits of data precision per sample from disk into memory. <br /></td></tr>
|
|
|
|
|
<tr class="separator:gace4240b665dc47742cbb3b76b03dfd69"><td class="memSeparator" colspan="2"> </td></tr>
|
|
|
|
|
<tr class="memitem:gaa4ec838988e469cc15618e4690cc8722" id="r_gaa4ec838988e469cc15618e4690cc8722"><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#gaa4ec838988e469cc15618e4690cc8722">tj3SaveImage8</a> (<a class="el" href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> handle, const char *filename, const unsigned char *buffer, int width, int pitch, int height, int pixelFormat)</td></tr>
|
|
|
|
|
<tr class="memdesc:gaa4ec838988e469cc15618e4690cc8722"><td class="mdescLeft"> </td><td class="mdescRight">Save an 8-bit-per-sample packed-pixel image from memory to disk. <br /></td></tr>
|
|
|
|
|
<tr class="memdesc:gaa4ec838988e469cc15618e4690cc8722"><td class="mdescLeft"> </td><td class="mdescRight">Save a packed-pixel image with 2 to 8 bits of data precision per sample from memory to disk. <br /></td></tr>
|
|
|
|
|
<tr class="separator:gaa4ec838988e469cc15618e4690cc8722"><td class="memSeparator" colspan="2"> </td></tr>
|
|
|
|
|
<tr class="memitem:ga7c64b5106d04267a46aad85f9714ad90" id="r_ga7c64b5106d04267a46aad85f9714ad90"><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#ga7c64b5106d04267a46aad85f9714ad90">tj3SaveImage12</a> (<a class="el" href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> handle, const char *filename, const short *buffer, int width, int pitch, int height, int pixelFormat)</td></tr>
|
|
|
|
|
<tr class="memdesc:ga7c64b5106d04267a46aad85f9714ad90"><td class="mdescLeft"> </td><td class="mdescRight">Save a 12-bit-per-sample packed-pixel image from memory to disk. <br /></td></tr>
|
|
|
|
|
<tr class="memdesc:ga7c64b5106d04267a46aad85f9714ad90"><td class="mdescLeft"> </td><td class="mdescRight">Save a packed-pixel image with 9 to 12 bits of data precision per sample from memory to disk. <br /></td></tr>
|
|
|
|
|
<tr class="separator:ga7c64b5106d04267a46aad85f9714ad90"><td class="memSeparator" colspan="2"> </td></tr>
|
|
|
|
|
<tr class="memitem:ga0fd87851f4266aca24bf4594dd0c0e71" id="r_ga0fd87851f4266aca24bf4594dd0c0e71"><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#ga0fd87851f4266aca24bf4594dd0c0e71">tj3SaveImage16</a> (<a class="el" href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> handle, const char *filename, const unsigned short *buffer, int width, int pitch, int height, int pixelFormat)</td></tr>
|
|
|
|
|
<tr class="memdesc:ga0fd87851f4266aca24bf4594dd0c0e71"><td class="mdescLeft"> </td><td class="mdescRight">Save a 16-bit-per-sample packed-pixel image from memory to disk. <br /></td></tr>
|
|
|
|
|
<tr class="memdesc:ga0fd87851f4266aca24bf4594dd0c0e71"><td class="mdescLeft"> </td><td class="mdescRight">Save a packed-pixel image with 13 to 16 bits of data precision per sample from memory to disk. <br /></td></tr>
|
|
|
|
|
<tr class="separator:ga0fd87851f4266aca24bf4594dd0c0e71"><td class="memSeparator" colspan="2"> </td></tr>
|
|
|
|
|
<tr class="memitem:gaddb84fb6c81769e9faa0f5a63b296606" id="r_gaddb84fb6c81769e9faa0f5a63b296606"><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#gaddb84fb6c81769e9faa0f5a63b296606">tj3Free</a> (void *buffer)</td></tr>
|
|
|
|
|
<tr class="memdesc:gaddb84fb6c81769e9faa0f5a63b296606"><td class="mdescLeft"> </td><td class="mdescRight">Free a byte buffer previously allocated by TurboJPEG. <br /></td></tr>
|
|
|
|
|
@@ -861,12 +861,13 @@ scalingFactor)</code>. </p>
|
|
|
|
|
</td></tr>
|
|
|
|
|
<tr><td class="fieldname"><a id="ggaa0f6be63ba78278299c9f5c12031fe82a8f76673be73f2b659440a9572a65a95f" name="ggaa0f6be63ba78278299c9f5c12031fe82a8f76673be73f2b659440a9572a65a95f"></a>TJPARAM_JPEGHEIGHT </td><td class="fielddoc"><p>JPEG height (in pixels) [decompression only, read-only]. </p>
|
|
|
|
|
</td></tr>
|
|
|
|
|
<tr><td class="fieldname"><a id="ggaa0f6be63ba78278299c9f5c12031fe82a781db82741934e8cd008d308597c59d8" name="ggaa0f6be63ba78278299c9f5c12031fe82a781db82741934e8cd008d308597c59d8"></a>TJPARAM_PRECISION </td><td class="fielddoc"><p>JPEG data precision (bits per sample) [decompression only, read-only]. </p>
|
|
|
|
|
<p>The JPEG image uses the specified number of bits per sample.</p>
|
|
|
|
|
<tr><td class="fieldname"><a id="ggaa0f6be63ba78278299c9f5c12031fe82a781db82741934e8cd008d308597c59d8" name="ggaa0f6be63ba78278299c9f5c12031fe82a781db82741934e8cd008d308597c59d8"></a>TJPARAM_PRECISION </td><td class="fielddoc"><p>Data precision (bits per sample) </p>
|
|
|
|
|
<p>The JPEG image uses (decompression) or will use (lossless compression) the specified number of bits per sample. This parameter also specifies the target data precision when loading a PBMPLUS file with <a class="el" href="group___turbo_j_p_e_g.html#ga884023536e70985616126a073f662001" title="Load a packed-pixel image with 2 to 8 bits of data precision per sample from disk into memory.">tj3LoadImage8()</a>, <a class="el" href="group___turbo_j_p_e_g.html#gaa1d3772cfdb53afa21aae3c606238d44" title="Load a packed-pixel image with 9 to 12 bits of data precision per sample from disk into memory.">tj3LoadImage12()</a>, or <a class="el" href="group___turbo_j_p_e_g.html#gace4240b665dc47742cbb3b76b03dfd69" title="Load a packed-pixel image with 13 to 16 bits of data precision per sample from disk into memory.">tj3LoadImage16()</a> and the source data precision when saving a PBMPLUS file with <a class="el" href="group___turbo_j_p_e_g.html#gaa4ec838988e469cc15618e4690cc8722" title="Save a packed-pixel image with 2 to 8 bits of data precision per sample from memory to disk.">tj3SaveImage8()</a>, <a class="el" href="group___turbo_j_p_e_g.html#ga7c64b5106d04267a46aad85f9714ad90" title="Save a packed-pixel image with 9 to 12 bits of data precision per sample from memory to disk.">tj3SaveImage12()</a>, or <a class="el" href="group___turbo_j_p_e_g.html#ga0fd87851f4266aca24bf4594dd0c0e71" title="Save a packed-pixel image with 13 to 16 bits of data precision per sample from memory to disk.">tj3SaveImage16()</a>.</p>
|
|
|
|
|
<p>The data precision is the number of bits in the maximum sample value, which may not be the same as the width of the data type used to store the sample.</p>
|
|
|
|
|
<p><b>Value</b></p><ul>
|
|
|
|
|
<li><code>8</code>, <code>12</code>, or <code>16</code></li>
|
|
|
|
|
<li><code>8</code> or <code>12</code> for lossy JPEG images; <code>2</code> to <code>16</code> for lossless JPEG and PBMPLUS images</li>
|
|
|
|
|
</ul>
|
|
|
|
|
<p>12-bit data precision implies <a class="el" href="group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82a8f0af9afc0b36443751f9ee82b760aa6" title="Optimized baseline entropy coding [lossy compression only].">TJPARAM_OPTIMIZE</a> unless <a class="el" href="group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82a1c756757384308145602c040524aebf7" title="Arithmetic entropy coding.">TJPARAM_ARITHMETIC</a> is set. </p>
|
|
|
|
|
<p>12-bit JPEG data precision implies <a class="el" href="group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82a8f0af9afc0b36443751f9ee82b760aa6" title="Optimized baseline entropy coding [lossy compression only].">TJPARAM_OPTIMIZE</a> unless <a class="el" href="group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82a1c756757384308145602c040524aebf7" title="Arithmetic entropy coding.">TJPARAM_ARITHMETIC</a> is set. </p>
|
|
|
|
|
</td></tr>
|
|
|
|
|
<tr><td class="fieldname"><a id="ggaa0f6be63ba78278299c9f5c12031fe82a46a10d46309514907d0c39fcd86c324c" name="ggaa0f6be63ba78278299c9f5c12031fe82a46a10d46309514907d0c39fcd86c324c"></a>TJPARAM_COLORSPACE </td><td class="fielddoc"><p>JPEG colorspace. </p>
|
|
|
|
|
<p>The JPEG image uses (decompression) or will use (lossy compression) the specified colorspace.</p>
|
|
|
|
|
@@ -969,7 +970,7 @@ scalingFactor)</code>. </p>
|
|
|
|
|
<li><code>0</code> through <em><b>precision</b></em> <em>- 1</em>, where <em><b>precision</b></em> is the JPEG data precision in bits <em>[default for compression: <code>0</code>]</em></li>
|
|
|
|
|
</ul>
|
|
|
|
|
<p>A point transform value of <code>0</code> is necessary in order to generate a fully lossless JPEG image. (A non-zero point transform value right-shifts the input samples by the specified number of bits, which is effectively a form of lossy color quantization.)</p>
|
|
|
|
|
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82a249f35f0770792b19f995e603bb17c6f" title="Lossless JPEG.">TJPARAM_LOSSLESS</a>, <a class="el" href="group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82a781db82741934e8cd008d308597c59d8" title="JPEG data precision (bits per sample) [decompression only, read-only].">TJPARAM_PRECISION</a> </dd></dl>
|
|
|
|
|
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82a249f35f0770792b19f995e603bb17c6f" title="Lossless JPEG.">TJPARAM_LOSSLESS</a>, <a class="el" href="group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82a781db82741934e8cd008d308597c59d8" title="Data precision (bits per sample)">TJPARAM_PRECISION</a> </dd></dl>
|
|
|
|
|
</td></tr>
|
|
|
|
|
<tr><td class="fieldname"><a id="ggaa0f6be63ba78278299c9f5c12031fe82a343c72883b7160f23f3ef46fc548a0ec" name="ggaa0f6be63ba78278299c9f5c12031fe82a343c72883b7160f23f3ef46fc548a0ec"></a>TJPARAM_RESTARTBLOCKS </td><td class="fielddoc"><p>JPEG restart marker interval in MCU blocks (lossy) or samples (lossless) [compression only]. </p>
|
|
|
|
|
<p>The nature of entropy coding is such that a corrupt JPEG image cannot be decompressed beyond the point of corruption unless it contains restart markers. A restart marker stops and restarts the entropy coding algorithm so that, if a JPEG image is corrupted, decompression can resume at the next marker. Thus, adding more restart markers improves the fault tolerance of the JPEG image, but adding too many restart markers can adversely affect the compression ratio and performance.</p>
|
|
|
|
|
@@ -989,14 +990,14 @@ scalingFactor)</code>. </p>
|
|
|
|
|
<p><b>Value</b></p><ul>
|
|
|
|
|
<li>The JPEG image has (decompression) or will have (compression) the specified horizontal pixel density <em>[default for compression: <code>1</code>]</em>.</li>
|
|
|
|
|
</ul>
|
|
|
|
|
<p>This value is stored in or read from the JPEG header. It does not affect the contents of the JPEG image. Note that this parameter is set by <a class="el" href="group___turbo_j_p_e_g.html#ga884023536e70985616126a073f662001" title="Load an 8-bit-per-sample packed-pixel image from disk into memory.">tj3LoadImage8()</a> when loading a Windows BMP file that contains pixel density information, and the value of this parameter is stored to a Windows BMP file by <a class="el" href="group___turbo_j_p_e_g.html#gaa4ec838988e469cc15618e4690cc8722" title="Save an 8-bit-per-sample packed-pixel image from memory to disk.">tj3SaveImage8()</a> if the value of <a class="el" href="group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82a4c045981bd8a303521a401dbbe1df208" title="JPEG pixel density units.">TJPARAM_DENSITYUNITS</a> is <code>2</code>.</p>
|
|
|
|
|
<p>This value is stored in or read from the JPEG header. It does not affect the contents of the JPEG image. Note that this parameter is set by <a class="el" href="group___turbo_j_p_e_g.html#ga884023536e70985616126a073f662001" title="Load a packed-pixel image with 2 to 8 bits of data precision per sample from disk into memory.">tj3LoadImage8()</a> when loading a Windows BMP file that contains pixel density information, and the value of this parameter is stored to a Windows BMP file by <a class="el" href="group___turbo_j_p_e_g.html#gaa4ec838988e469cc15618e4690cc8722" title="Save a packed-pixel image with 2 to 8 bits of data precision per sample from memory to disk.">tj3SaveImage8()</a> if the value of <a class="el" href="group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82a4c045981bd8a303521a401dbbe1df208" title="JPEG pixel density units.">TJPARAM_DENSITYUNITS</a> is <code>2</code>.</p>
|
|
|
|
|
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82a4c045981bd8a303521a401dbbe1df208" title="JPEG pixel density units.">TJPARAM_DENSITYUNITS</a> </dd></dl>
|
|
|
|
|
</td></tr>
|
|
|
|
|
<tr><td class="fieldname"><a id="ggaa0f6be63ba78278299c9f5c12031fe82abda48f2df7eb9b88e2b7621efb017eba" name="ggaa0f6be63ba78278299c9f5c12031fe82abda48f2df7eb9b88e2b7621efb017eba"></a>TJPARAM_YDENSITY </td><td class="fielddoc"><p>JPEG vertical pixel density. </p>
|
|
|
|
|
<p><b>Value</b></p><ul>
|
|
|
|
|
<li>The JPEG image has (decompression) or will have (compression) the specified vertical pixel density <em>[default for compression: <code>1</code>]</em>.</li>
|
|
|
|
|
</ul>
|
|
|
|
|
<p>This value is stored in or read from the JPEG header. It does not affect the contents of the JPEG image. Note that this parameter is set by <a class="el" href="group___turbo_j_p_e_g.html#ga884023536e70985616126a073f662001" title="Load an 8-bit-per-sample packed-pixel image from disk into memory.">tj3LoadImage8()</a> when loading a Windows BMP file that contains pixel density information, and the value of this parameter is stored to a Windows BMP file by <a class="el" href="group___turbo_j_p_e_g.html#gaa4ec838988e469cc15618e4690cc8722" title="Save an 8-bit-per-sample packed-pixel image from memory to disk.">tj3SaveImage8()</a> if the value of <a class="el" href="group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82a4c045981bd8a303521a401dbbe1df208" title="JPEG pixel density units.">TJPARAM_DENSITYUNITS</a> is <code>2</code>.</p>
|
|
|
|
|
<p>This value is stored in or read from the JPEG header. It does not affect the contents of the JPEG image. Note that this parameter is set by <a class="el" href="group___turbo_j_p_e_g.html#ga884023536e70985616126a073f662001" title="Load a packed-pixel image with 2 to 8 bits of data precision per sample from disk into memory.">tj3LoadImage8()</a> when loading a Windows BMP file that contains pixel density information, and the value of this parameter is stored to a Windows BMP file by <a class="el" href="group___turbo_j_p_e_g.html#gaa4ec838988e469cc15618e4690cc8722" title="Save a packed-pixel image with 2 to 8 bits of data precision per sample from memory to disk.">tj3SaveImage8()</a> if the value of <a class="el" href="group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82a4c045981bd8a303521a401dbbe1df208" title="JPEG pixel density units.">TJPARAM_DENSITYUNITS</a> is <code>2</code>.</p>
|
|
|
|
|
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82a4c045981bd8a303521a401dbbe1df208" title="JPEG pixel density units.">TJPARAM_DENSITYUNITS</a> </dd></dl>
|
|
|
|
|
</td></tr>
|
|
|
|
|
<tr><td class="fieldname"><a id="ggaa0f6be63ba78278299c9f5c12031fe82a4c045981bd8a303521a401dbbe1df208" name="ggaa0f6be63ba78278299c9f5c12031fe82a4c045981bd8a303521a401dbbe1df208"></a>TJPARAM_DENSITYUNITS </td><td class="fielddoc"><p>JPEG pixel density units. </p>
|
|
|
|
|
@@ -1005,7 +1006,7 @@ scalingFactor)</code>. </p>
|
|
|
|
|
<li><code>1</code> The pixel density of the JPEG image is expressed (decompression) or will be expressed (compression) in units of pixels/inch.</li>
|
|
|
|
|
<li><code>2</code> The pixel density of the JPEG image is expressed (decompression) or will be expressed (compression) in units of pixels/cm.</li>
|
|
|
|
|
</ul>
|
|
|
|
|
<p>This value is stored in or read from the JPEG header. It does not affect the contents of the JPEG image. Note that this parameter is set by <a class="el" href="group___turbo_j_p_e_g.html#ga884023536e70985616126a073f662001" title="Load an 8-bit-per-sample packed-pixel image from disk into memory.">tj3LoadImage8()</a> when loading a Windows BMP file that contains pixel density information, and the value of this parameter is stored to a Windows BMP file by <a class="el" href="group___turbo_j_p_e_g.html#gaa4ec838988e469cc15618e4690cc8722" title="Save an 8-bit-per-sample packed-pixel image from memory to disk.">tj3SaveImage8()</a> if the value is <code>2</code>.</p>
|
|
|
|
|
<p>This value is stored in or read from the JPEG header. It does not affect the contents of the JPEG image. Note that this parameter is set by <a class="el" href="group___turbo_j_p_e_g.html#ga884023536e70985616126a073f662001" title="Load a packed-pixel image with 2 to 8 bits of data precision per sample from disk into memory.">tj3LoadImage8()</a> when loading a Windows BMP file that contains pixel density information, and the value of this parameter is stored to a Windows BMP file by <a class="el" href="group___turbo_j_p_e_g.html#gaa4ec838988e469cc15618e4690cc8722" title="Save a packed-pixel image with 2 to 8 bits of data precision per sample from memory to disk.">tj3SaveImage8()</a> if the value is <code>2</code>.</p>
|
|
|
|
|
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82a4de5c9d7cab5be806143a43c3b0e0877" title="JPEG horizontal pixel density.">TJPARAM_XDENSITY</a>, <a class="el" href="group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82abda48f2df7eb9b88e2b7621efb017eba" title="JPEG vertical pixel density.">TJPARAM_YDENSITY</a> </dd></dl>
|
|
|
|
|
</td></tr>
|
|
|
|
|
<tr><td class="fieldname"><a id="ggaa0f6be63ba78278299c9f5c12031fe82a0de0a8281da45d1fc984edc8918f7dd2" name="ggaa0f6be63ba78278299c9f5c12031fe82a0de0a8281da45d1fc984edc8918f7dd2"></a>TJPARAM_MAXMEMORY </td><td class="fielddoc"><p>Memory limit for intermediate buffers. </p>
|
|
|
|
|
@@ -1056,7 +1057,7 @@ scalingFactor)</code>. </p>
|
|
|
|
|
<p>The red, green, and blue components in the image are stored in 4-sample pixels in the order B, G, R from highest to lowest memory 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" name="ggac916144e26c3817ac514e64ae5d12e2aa5431b54b015337705f13118073711a1a"></a>TJPF_GRAY </td><td class="fielddoc"><p>Grayscale pixel format. </p>
|
|
|
|
|
<p>Each 1-sample pixel represents a luminance (brightness) level from 0 to the maximum sample value (255 for 8-bit samples, 4095 for 12-bit samples, and 65535 for 16-bit samples.) </p>
|
|
|
|
|
<p>Each 1-sample pixel represents a luminance (brightness) level from 0 to the maximum sample value (which is, for instance, 255 for 8-bit samples or 4095 for 12-bit samples or 65535 for 16-bit samples.) </p>
|
|
|
|
|
</td></tr>
|
|
|
|
|
<tr><td class="fieldname"><a id="ggac916144e26c3817ac514e64ae5d12e2aa88d2e88fab67f6503cf972e14851cc12" name="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 equal to the maximum sample value, which can be interpreted as an opaque alpha channel. </p>
|
|
|
|
|
@@ -1074,7 +1075,7 @@ scalingFactor)</code>. </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" name="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#ga884023536e70985616126a073f662001" title="Load an 8-bit-per-sample packed-pixel image from disk into memory.">tj3LoadImage8()</a>, <a class="el" href="group___turbo_j_p_e_g.html#gaa1d3772cfdb53afa21aae3c606238d44" title="Load a 12-bit-per-sample packed-pixel image from disk into memory.">tj3LoadImage12()</a>, and <a class="el" href="group___turbo_j_p_e_g.html#gace4240b665dc47742cbb3b76b03dfd69" title="Load a 16-bit-per-sample packed-pixel image from disk into memory.">tj3LoadImage16()</a>. </p>
|
|
|
|
|
<p>Currently this is only used by <a class="el" href="group___turbo_j_p_e_g.html#ga884023536e70985616126a073f662001" title="Load a packed-pixel image with 2 to 8 bits of data precision per sample from disk into memory.">tj3LoadImage8()</a>, <a class="el" href="group___turbo_j_p_e_g.html#gaa1d3772cfdb53afa21aae3c606238d44" title="Load a packed-pixel image with 9 to 12 bits of data precision per sample from disk into memory.">tj3LoadImage12()</a>, and <a class="el" href="group___turbo_j_p_e_g.html#gace4240b665dc47742cbb3b76b03dfd69" title="Load a packed-pixel image with 13 to 16 bits of data precision per sample from disk into memory.">tj3LoadImage16()</a>. </p>
|
|
|
|
|
</td></tr>
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
@@ -1261,11 +1262,11 @@ scalingFactor)</code>. </p>
|
|
|
|
|
</table>
|
|
|
|
|
</div><div class="memdoc">
|
|
|
|
|
|
|
|
|
|
<p>Compress a 12-bit-per-sample packed-pixel RGB, grayscale, or CMYK image into a 12-bit-per-sample JPEG image. </p>
|
|
|
|
|
<p>Compress a packed-pixel RGB, grayscale, or CMYK image with 9 to 12 bits of data precision per sample into a JPEG image with the same data precision. </p>
|
|
|
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
|
|
|
<table class="params">
|
|
|
|
|
<tr><td class="paramname">handle</td><td>handle to a TurboJPEG instance that has been initialized for compression</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. This buffer should normally be <code>pitch * height</code> samples in size. However, you can also use this parameter to compress from a specific region of a larger buffer.</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. This buffer should normally be <code>pitch * height</code> samples in size. However, you can also use this parameter to compress from a specific region of a larger buffer. The data precision of the source image (from 9 to 12 bits per sample) can be specified using <a class="el" href="group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82a781db82741934e8cd008d308597c59d8" title="Data precision (bits per sample)">TJPARAM_PRECISION</a> and defaults to 12 if <a class="el" href="group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82a781db82741934e8cd008d308597c59d8" title="Data precision (bits per sample)">TJPARAM_PRECISION</a> is unset or out of range.</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>samples 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 samples) for a given pixel format.">tjPixelSize</a>[pixelFormat]</code>, if the image is unpadded. (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 samples) for a given pixel format.">tjPixelSize</a>[pixelFormat]</code>.) However, you can also use this parameter to specify the row alignment/padding of the source image, to skip rows, or to compress from a specific region of a larger buffer.</td></tr>
|
|
|
|
|
<tr><td class="paramname">height</td><td>height (in pixels) of the source image</td></tr>
|
|
|
|
|
@@ -1280,7 +1281,7 @@ If you choose option 1, then <code>*jpegSize</code> should be set to the size of
|
|
|
|
|
</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#ga5a23ad0776c5333cda0d7c6d826e9d29" title="Returns a descriptive error message explaining why the last command failed.">tj3GetErrorStr()</a> and <a class="el" href="group___turbo_j_p_e_g.html#gab8c8279f1415fe425ff30dbbc56013bd" title="Returns a code indicating the severity of the last error.">tj3GetErrorCode()</a>.) </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#ga5a23ad0776c5333cda0d7c6d826e9d29" title="Returns a descriptive error message explaining why the last command failed.">tj3GetErrorStr()</a> and <a class="el" href="group___turbo_j_p_e_g.html#gab8c8279f1415fe425ff30dbbc56013bd" title="Returns a code indicating the severity of the last error.">tj3GetErrorCode()</a>.) </dd></dl>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
@@ -1346,11 +1347,11 @@ If you choose option 1, then <code>*jpegSize</code> should be set to the size of
|
|
|
|
|
</table>
|
|
|
|
|
</div><div class="memdoc">
|
|
|
|
|
|
|
|
|
|
<p>Compress a 16-bit-per-sample packed-pixel RGB, grayscale, or CMYK image into a 16-bit-per-sample lossless JPEG image. </p>
|
|
|
|
|
<p>Compress a packed-pixel RGB, grayscale, or CMYK image with 13 to 16 bits of data precision per sample into a lossless JPEG image with the same data precision. </p>
|
|
|
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
|
|
|
<table class="params">
|
|
|
|
|
<tr><td class="paramname">handle</td><td>handle to a TurboJPEG instance that has been initialized for compression</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. This buffer should normally be <code>pitch * height</code> samples in size. However, you can also use this parameter to compress from a specific region of a larger buffer.</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. This buffer should normally be <code>pitch * height</code> samples in size. However, you can also use this parameter to compress from a specific region of a larger buffer. The data precision of the source image (from 13 to 16 bits per sample) can be specified using <a class="el" href="group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82a781db82741934e8cd008d308597c59d8" title="Data precision (bits per sample)">TJPARAM_PRECISION</a> and defaults to 16 if <a class="el" href="group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82a781db82741934e8cd008d308597c59d8" title="Data precision (bits per sample)">TJPARAM_PRECISION</a> is unset or out of range.</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>samples 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 samples) for a given pixel format.">tjPixelSize</a>[pixelFormat]</code>, if the image is unpadded. (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 samples) for a given pixel format.">tjPixelSize</a>[pixelFormat]</code>.) However, you can also use this parameter to specify the row alignment/padding of the source image, to skip rows, or to compress from a specific region of a larger buffer.</td></tr>
|
|
|
|
|
<tr><td class="paramname">height</td><td>height (in pixels) of the source image</td></tr>
|
|
|
|
|
@@ -1365,7 +1366,7 @@ If you choose option 1, then <code>*jpegSize</code> should be set to the size of
|
|
|
|
|
</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#ga5a23ad0776c5333cda0d7c6d826e9d29" title="Returns a descriptive error message explaining why the last command failed.">tj3GetErrorStr()</a> and <a class="el" href="group___turbo_j_p_e_g.html#gab8c8279f1415fe425ff30dbbc56013bd" title="Returns a code indicating the severity of the last error.">tj3GetErrorCode()</a>.) </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#ga5a23ad0776c5333cda0d7c6d826e9d29" title="Returns a descriptive error message explaining why the last command failed.">tj3GetErrorStr()</a> and <a class="el" href="group___turbo_j_p_e_g.html#gab8c8279f1415fe425ff30dbbc56013bd" title="Returns a code indicating the severity of the last error.">tj3GetErrorCode()</a>.) </dd></dl>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
@@ -1431,11 +1432,11 @@ If you choose option 1, then <code>*jpegSize</code> should be set to the size of
|
|
|
|
|
</table>
|
|
|
|
|
</div><div class="memdoc">
|
|
|
|
|
|
|
|
|
|
<p>Compress an 8-bit-per-sample packed-pixel RGB, grayscale, or CMYK image into an 8-bit-per-sample JPEG image. </p>
|
|
|
|
|
<p>Compress a packed-pixel RGB, grayscale, or CMYK image with 2 to 8 bits of data precision per sample into a JPEG image with the same data precision. </p>
|
|
|
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
|
|
|
<table class="params">
|
|
|
|
|
<tr><td class="paramname">handle</td><td>handle to a TurboJPEG instance that has been initialized for compression</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. This buffer should normally be <code>pitch * height</code> samples in size. However, you can also use this parameter to compress from a specific region of a larger buffer.</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. This buffer should normally be <code>pitch * height</code> samples in size. However, you can also use this parameter to compress from a specific region of a larger buffer. The data precision of the source image (from 2 to 8 bits per sample) can be specified using <a class="el" href="group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82a781db82741934e8cd008d308597c59d8" title="Data precision (bits per sample)">TJPARAM_PRECISION</a> and defaults to 8 if <a class="el" href="group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82a781db82741934e8cd008d308597c59d8" title="Data precision (bits per sample)">TJPARAM_PRECISION</a> is unset or out of range.</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>samples 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 samples) for a given pixel format.">tjPixelSize</a>[pixelFormat]</code>, if the image is unpadded. (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 samples) for a given pixel format.">tjPixelSize</a>[pixelFormat]</code>.) However, you can also use this parameter to specify the row alignment/padding of the source image, to skip rows, or to compress from a specific region of a larger buffer.</td></tr>
|
|
|
|
|
<tr><td class="paramname">height</td><td>height (in pixels) of the source image</td></tr>
|
|
|
|
|
@@ -1822,7 +1823,7 @@ If you choose option 1, then <code>*jpegSize</code> should be set to the size of
|
|
|
|
|
</table>
|
|
|
|
|
</div><div class="memdoc">
|
|
|
|
|
|
|
|
|
|
<p>Decompress a 12-bit-per-sample JPEG image into a 12-bit-per-sample packed-pixel RGB, grayscale, or CMYK image. </p>
|
|
|
|
|
<p>Decompress a JPEG image with 9 to 12 bits of data precision per sample into a packed-pixel RGB, grayscale, or CMYK image with the same data precision. </p>
|
|
|
|
|
<p>The <a class="el" href="group___turbo_j_p_e_g.html#gaa0f6be63ba78278299c9f5c12031fe82">parameters</a> that describe the JPEG image will be set when this function returns.</p>
|
|
|
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
|
|
|
<table class="params">
|
|
|
|
|
@@ -1889,7 +1890,7 @@ If you choose option 1, then <code>*jpegSize</code> should be set to the size of
|
|
|
|
|
</table>
|
|
|
|
|
</div><div class="memdoc">
|
|
|
|
|
|
|
|
|
|
<p>Decompress a 16-bit-per-sample lossless JPEG image into a 16-bit-per-sample packed-pixel RGB, grayscale, or CMYK image. </p>
|
|
|
|
|
<p>Decompress a lossless JPEG image with 13 to 16 bits of data precision per sample into a packed-pixel RGB, grayscale, or CMYK image with the same data precision. </p>
|
|
|
|
|
<p>The <a class="el" href="group___turbo_j_p_e_g.html#gaa0f6be63ba78278299c9f5c12031fe82">parameters</a> that describe the JPEG image will be set when this function returns.</p>
|
|
|
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
|
|
|
<table class="params">
|
|
|
|
|
@@ -1956,7 +1957,7 @@ If you choose option 1, then <code>*jpegSize</code> should be set to the size of
|
|
|
|
|
</table>
|
|
|
|
|
</div><div class="memdoc">
|
|
|
|
|
|
|
|
|
|
<p>Decompress an 8-bit-per-sample JPEG image into an 8-bit-per-sample packed-pixel RGB, grayscale, or CMYK image. </p>
|
|
|
|
|
<p>Decompress a JPEG image with 2 to 8 bits of data precision per sample into a packed-pixel RGB, grayscale, or CMYK image with the same data precision. </p>
|
|
|
|
|
<p>The <a class="el" href="group___turbo_j_p_e_g.html#gaa0f6be63ba78278299c9f5c12031fe82">parameters</a> that describe the JPEG image will be set when this function returns.</p>
|
|
|
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
|
|
|
<table class="params">
|
|
|
|
|
@@ -2598,17 +2599,17 @@ If you choose option 1, then <code>*jpegSize</code> should be set to the size of
|
|
|
|
|
</table>
|
|
|
|
|
</div><div class="memdoc">
|
|
|
|
|
|
|
|
|
|
<p>Load a 12-bit-per-sample packed-pixel image from disk into memory. </p>
|
|
|
|
|
<p>Load a packed-pixel image with 9 to 12 bits of data precision per sample from disk into memory. </p>
|
|
|
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
|
|
|
<table class="params">
|
|
|
|
|
<tr><td class="paramname">handle</td><td>handle to a TurboJPEG instance</td></tr>
|
|
|
|
|
<tr><td class="paramname">filename</td><td>name of a file containing a packed-pixel image in Windows BMP or PBMPLUS (PPM/PGM) format. Windows BMP files require 8-bit-per-sample data precision. If the data precision of the PBMPLUS file does not match the target data precision, then upconverting or downconverting will be performed.</td></tr>
|
|
|
|
|
<tr><td class="paramname">filename</td><td>name of a file containing a packed-pixel image in PBMPLUS (PPM/PGM) format. The target data precision (from 9 to 12 bits per sample) can be specified using <a class="el" href="group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82a781db82741934e8cd008d308597c59d8" title="Data precision (bits per sample)">TJPARAM_PRECISION</a> and defaults to 12 if <a class="el" href="group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82a781db82741934e8cd008d308597c59d8" title="Data precision (bits per sample)">TJPARAM_PRECISION</a> is unset or out of range. If the data precision of the PBMPLUS file does not match the target data precision, then upconverting or downconverting will be performed.</td></tr>
|
|
|
|
|
<tr><td class="paramname">width</td><td>pointer to an integer variable that will receive the width (in pixels) of the packed-pixel image</td></tr>
|
|
|
|
|
<tr><td class="paramname">align</td><td>row alignment (in samples) of the packed-pixel buffer to be returned (must be a power of 2.) Setting this parameter to n will cause all rows in the buffer to be padded to the nearest multiple of n samples (1 = unpadded.)</td></tr>
|
|
|
|
|
<tr><td class="paramname">height</td><td>pointer to an integer variable that will receive the height (in pixels) of the packed-pixel image</td></tr>
|
|
|
|
|
<tr><td class="paramname">pixelFormat</td><td>pointer to an integer variable that specifies or will receive the pixel format of the packed-pixel buffer. The behavior of this function will vary depending on the value of <code>*pixelFormat</code> passed to the function:<ul>
|
|
|
|
|
<li><a class="el" href="group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa84c1a6cead7952998e2fb895844a21ed">TJPF_UNKNOWN</a> : The packed-pixel buffer returned by this function will use the most optimal pixel format for the file type, and <code>*pixelFormat</code> will contain the ID of that pixel format upon successful return from this function.</li>
|
|
|
|
|
<li><a class="el" href="group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa5431b54b015337705f13118073711a1a">TJPF_GRAY</a> : Only PGM files and 8-bit-per-pixel BMP files with a grayscale colormap can be loaded.</li>
|
|
|
|
|
<li><a class="el" href="group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa5431b54b015337705f13118073711a1a">TJPF_GRAY</a> : Only PGM files can be loaded.</li>
|
|
|
|
|
<li><a class="el" href="group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa7f5100ec44c91994e243f1cf55553f8b">TJPF_CMYK</a> : The RGB or grayscale pixels stored in the file will be converted using a quick & dirty algorithm that is suitable only for testing purposes. (Proper conversion between CMYK and other formats requires a color management system.)</li>
|
|
|
|
|
<li>Other <a class="el" href="group___turbo_j_p_e_g.html#gac916144e26c3817ac514e64ae5d12e2a">pixel formats</a> : The packed-pixel buffer will use the specified pixel format, and pixel format conversion will be performed if necessary.</li>
|
|
|
|
|
</ul>
|
|
|
|
|
@@ -2616,7 +2617,7 @@ If you choose option 1, then <code>*jpegSize</code> should be set to the size of
|
|
|
|
|
</table>
|
|
|
|
|
</dd>
|
|
|
|
|
</dl>
|
|
|
|
|
<dl class="section return"><dt>Returns</dt><dd>a pointer to a newly-allocated buffer containing the packed-pixel image, converted to the chosen pixel format and with the chosen row alignment, or NULL if an error occurred (see <a class="el" href="group___turbo_j_p_e_g.html#ga5a23ad0776c5333cda0d7c6d826e9d29" title="Returns a descriptive error message explaining why the last command failed.">tj3GetErrorStr()</a>.) This buffer should be freed using <a class="el" href="group___turbo_j_p_e_g.html#gaddb84fb6c81769e9faa0f5a63b296606" title="Free a byte buffer previously allocated by TurboJPEG.">tj3Free()</a>. </dd></dl>
|
|
|
|
|
<dl class="section return"><dt>Returns</dt><dd>a pointer to a newly-allocated buffer containing the packed-pixel image, converted to the chosen pixel format and with the chosen row alignment, or NULL if an error occurred (see <a class="el" href="group___turbo_j_p_e_g.html#ga5a23ad0776c5333cda0d7c6d826e9d29" title="Returns a descriptive error message explaining why the last command failed.">tj3GetErrorStr()</a>.) This buffer should be freed using <a class="el" href="group___turbo_j_p_e_g.html#gaddb84fb6c81769e9faa0f5a63b296606" title="Free a byte buffer previously allocated by TurboJPEG.">tj3Free()</a>. </dd></dl>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
@@ -2670,17 +2671,17 @@ If you choose option 1, then <code>*jpegSize</code> should be set to the size of
|
|
|
|
|
</table>
|
|
|
|
|
</div><div class="memdoc">
|
|
|
|
|
|
|
|
|
|
<p>Load a 16-bit-per-sample packed-pixel image from disk into memory. </p>
|
|
|
|
|
<p>Load a packed-pixel image with 13 to 16 bits of data precision per sample from disk into memory. </p>
|
|
|
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
|
|
|
<table class="params">
|
|
|
|
|
<tr><td class="paramname">handle</td><td>handle to a TurboJPEG instance</td></tr>
|
|
|
|
|
<tr><td class="paramname">filename</td><td>name of a file containing a packed-pixel image in Windows BMP or PBMPLUS (PPM/PGM) format. Windows BMP files require 8-bit-per-sample data precision. If the data precision of the PBMPLUS file does not match the target data precision, then upconverting or downconverting will be performed.</td></tr>
|
|
|
|
|
<tr><td class="paramname">filename</td><td>name of a file containing a packed-pixel image in PBMPLUS (PPM/PGM) format. The target data precision (from 13 to 16 bits per sample) can be specified using <a class="el" href="group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82a781db82741934e8cd008d308597c59d8" title="Data precision (bits per sample)">TJPARAM_PRECISION</a> and defaults to 16 if <a class="el" href="group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82a781db82741934e8cd008d308597c59d8" title="Data precision (bits per sample)">TJPARAM_PRECISION</a> is unset or out of range. If the data precision of the PBMPLUS file does not match the target data precision, then upconverting or downconverting will be performed.</td></tr>
|
|
|
|
|
<tr><td class="paramname">width</td><td>pointer to an integer variable that will receive the width (in pixels) of the packed-pixel image</td></tr>
|
|
|
|
|
<tr><td class="paramname">align</td><td>row alignment (in samples) of the packed-pixel buffer to be returned (must be a power of 2.) Setting this parameter to n will cause all rows in the buffer to be padded to the nearest multiple of n samples (1 = unpadded.)</td></tr>
|
|
|
|
|
<tr><td class="paramname">height</td><td>pointer to an integer variable that will receive the height (in pixels) of the packed-pixel image</td></tr>
|
|
|
|
|
<tr><td class="paramname">pixelFormat</td><td>pointer to an integer variable that specifies or will receive the pixel format of the packed-pixel buffer. The behavior of this function will vary depending on the value of <code>*pixelFormat</code> passed to the function:<ul>
|
|
|
|
|
<li><a class="el" href="group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa84c1a6cead7952998e2fb895844a21ed">TJPF_UNKNOWN</a> : The packed-pixel buffer returned by this function will use the most optimal pixel format for the file type, and <code>*pixelFormat</code> will contain the ID of that pixel format upon successful return from this function.</li>
|
|
|
|
|
<li><a class="el" href="group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa5431b54b015337705f13118073711a1a">TJPF_GRAY</a> : Only PGM files and 8-bit-per-pixel BMP files with a grayscale colormap can be loaded.</li>
|
|
|
|
|
<li><a class="el" href="group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa5431b54b015337705f13118073711a1a">TJPF_GRAY</a> : Only PGM files can be loaded.</li>
|
|
|
|
|
<li><a class="el" href="group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa7f5100ec44c91994e243f1cf55553f8b">TJPF_CMYK</a> : The RGB or grayscale pixels stored in the file will be converted using a quick & dirty algorithm that is suitable only for testing purposes. (Proper conversion between CMYK and other formats requires a color management system.)</li>
|
|
|
|
|
<li>Other <a class="el" href="group___turbo_j_p_e_g.html#gac916144e26c3817ac514e64ae5d12e2a">pixel formats</a> : The packed-pixel buffer will use the specified pixel format, and pixel format conversion will be performed if necessary.</li>
|
|
|
|
|
</ul>
|
|
|
|
|
@@ -2688,7 +2689,7 @@ If you choose option 1, then <code>*jpegSize</code> should be set to the size of
|
|
|
|
|
</table>
|
|
|
|
|
</dd>
|
|
|
|
|
</dl>
|
|
|
|
|
<dl class="section return"><dt>Returns</dt><dd>a pointer to a newly-allocated buffer containing the packed-pixel image, converted to the chosen pixel format and with the chosen row alignment, or NULL if an error occurred (see <a class="el" href="group___turbo_j_p_e_g.html#ga5a23ad0776c5333cda0d7c6d826e9d29" title="Returns a descriptive error message explaining why the last command failed.">tj3GetErrorStr()</a>.) This buffer should be freed using <a class="el" href="group___turbo_j_p_e_g.html#gaddb84fb6c81769e9faa0f5a63b296606" title="Free a byte buffer previously allocated by TurboJPEG.">tj3Free()</a>. </dd></dl>
|
|
|
|
|
<dl class="section return"><dt>Returns</dt><dd>a pointer to a newly-allocated buffer containing the packed-pixel image, converted to the chosen pixel format and with the chosen row alignment, or NULL if an error occurred (see <a class="el" href="group___turbo_j_p_e_g.html#ga5a23ad0776c5333cda0d7c6d826e9d29" title="Returns a descriptive error message explaining why the last command failed.">tj3GetErrorStr()</a>.) This buffer should be freed using <a class="el" href="group___turbo_j_p_e_g.html#gaddb84fb6c81769e9faa0f5a63b296606" title="Free a byte buffer previously allocated by TurboJPEG.">tj3Free()</a>. </dd></dl>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
@@ -2742,11 +2743,11 @@ If you choose option 1, then <code>*jpegSize</code> should be set to the size of
|
|
|
|
|
</table>
|
|
|
|
|
</div><div class="memdoc">
|
|
|
|
|
|
|
|
|
|
<p>Load an 8-bit-per-sample packed-pixel image from disk into memory. </p>
|
|
|
|
|
<p>Load a packed-pixel image with 2 to 8 bits of data precision per sample from disk into memory. </p>
|
|
|
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
|
|
|
<table class="params">
|
|
|
|
|
<tr><td class="paramname">handle</td><td>handle to a TurboJPEG instance</td></tr>
|
|
|
|
|
<tr><td class="paramname">filename</td><td>name of a file containing a packed-pixel image in Windows BMP or PBMPLUS (PPM/PGM) format. Windows BMP files require 8-bit-per-sample data precision. If the data precision of the PBMPLUS file does not match the target data precision, then upconverting or downconverting will be performed.</td></tr>
|
|
|
|
|
<tr><td class="paramname">filename</td><td>name of a file containing a packed-pixel image in Windows BMP or PBMPLUS (PPM/PGM) format. Windows BMP files require 8-bit-per-sample data precision. When loading a PBMPLUS file, the target data precision (from 2 to 8 bits per sample) can be specified using <a class="el" href="group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82a781db82741934e8cd008d308597c59d8" title="Data precision (bits per sample)">TJPARAM_PRECISION</a> and defaults to 8 if <a class="el" href="group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82a781db82741934e8cd008d308597c59d8" title="Data precision (bits per sample)">TJPARAM_PRECISION</a> is unset or out of range. If the data precision of the PBMPLUS file does not match the target data precision, then upconverting or downconverting will be performed.</td></tr>
|
|
|
|
|
<tr><td class="paramname">width</td><td>pointer to an integer variable that will receive the width (in pixels) of the packed-pixel image</td></tr>
|
|
|
|
|
<tr><td class="paramname">align</td><td>row alignment (in samples) of the packed-pixel buffer to be returned (must be a power of 2.) Setting this parameter to n will cause all rows in the buffer to be padded to the nearest multiple of n samples (1 = unpadded.)</td></tr>
|
|
|
|
|
<tr><td class="paramname">height</td><td>pointer to an integer variable that will receive the height (in pixels) of the packed-pixel image</td></tr>
|
|
|
|
|
@@ -2820,20 +2821,20 @@ If you choose option 1, then <code>*jpegSize</code> should be set to the size of
|
|
|
|
|
</table>
|
|
|
|
|
</div><div class="memdoc">
|
|
|
|
|
|
|
|
|
|
<p>Save a 12-bit-per-sample packed-pixel image from memory to disk. </p>
|
|
|
|
|
<p>Save a packed-pixel image with 9 to 12 bits of data precision per sample from memory to disk. </p>
|
|
|
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
|
|
|
<table class="params">
|
|
|
|
|
<tr><td class="paramname">handle</td><td>handle to a TurboJPEG instance</td></tr>
|
|
|
|
|
<tr><td class="paramname">filename</td><td>name of a file to which to save the packed-pixel image. The image will be stored in Windows BMP or PBMPLUS (PPM/PGM) format, depending on the file extension. Windows BMP files require 8-bit-per-sample data precision.</td></tr>
|
|
|
|
|
<tr><td class="paramname">filename</td><td>name of a file to which to save the packed-pixel image, which will be stored in PBMPLUS (PPM/PGM) format. The source data precision (from 9 to 12 bits per sample) can be specified using <a class="el" href="group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82a781db82741934e8cd008d308597c59d8" title="Data precision (bits per sample)">TJPARAM_PRECISION</a> and defaults to 12 if <a class="el" href="group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82a781db82741934e8cd008d308597c59d8" title="Data precision (bits per sample)">TJPARAM_PRECISION</a> is unset or out of range.</td></tr>
|
|
|
|
|
<tr><td class="paramname">buffer</td><td>pointer to a buffer containing a packed-pixel RGB, grayscale, or CMYK image to be saved</td></tr>
|
|
|
|
|
<tr><td class="paramname">width</td><td>width (in pixels) of the packed-pixel image</td></tr>
|
|
|
|
|
<tr><td class="paramname">pitch</td><td>samples per row in the packed-pixel image. Setting this parameter to 0 is the equivalent of setting it to <code>width * <a class="el" href="group___turbo_j_p_e_g.html#gad77cf8fe5b2bfd3cb3f53098146abb4c" title="Pixel size (in samples) for a given pixel format.">tjPixelSize</a>[pixelFormat]</code>.</td></tr>
|
|
|
|
|
<tr><td class="paramname">height</td><td>height (in pixels) of the packed-pixel image</td></tr>
|
|
|
|
|
<tr><td class="paramname">pixelFormat</td><td>pixel format of the packed-pixel image (see <a class="el" href="group___turbo_j_p_e_g.html#gac916144e26c3817ac514e64ae5d12e2a">Pixel formats</a>.) If this parameter is set to <a class="el" href="group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa5431b54b015337705f13118073711a1a">TJPF_GRAY</a>, then the image will be stored in PGM or 8-bit-per-pixel (indexed color) BMP format. Otherwise, the image will be stored in PPM or 24-bit-per-pixel BMP format. If this parameter is set to <a class="el" href="group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa7f5100ec44c91994e243f1cf55553f8b">TJPF_CMYK</a>, then the CMYK pixels will be converted to RGB using a quick & dirty algorithm that is suitable only for testing purposes. (Proper conversion between CMYK and other formats requires a color management system.)</td></tr>
|
|
|
|
|
<tr><td class="paramname">pixelFormat</td><td>pixel format of the packed-pixel image (see <a class="el" href="group___turbo_j_p_e_g.html#gac916144e26c3817ac514e64ae5d12e2a">Pixel formats</a>.) If this parameter is set to <a class="el" href="group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa5431b54b015337705f13118073711a1a">TJPF_GRAY</a>, then the image will be stored in PGM format. Otherwise, the image will be stored in PPM format. If this parameter is set to <a class="el" href="group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa7f5100ec44c91994e243f1cf55553f8b">TJPF_CMYK</a>, then the CMYK pixels will be converted to RGB using a quick & dirty algorithm that is suitable only for testing purposes. (Proper conversion between CMYK and other formats requires a color management system.)</td></tr>
|
|
|
|
|
</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#ga5a23ad0776c5333cda0d7c6d826e9d29" title="Returns a descriptive error message explaining why the last command failed.">tj3GetErrorStr()</a>.) </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#ga5a23ad0776c5333cda0d7c6d826e9d29" title="Returns a descriptive error message explaining why the last command failed.">tj3GetErrorStr()</a>.) </dd></dl>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
@@ -2893,20 +2894,20 @@ If you choose option 1, then <code>*jpegSize</code> should be set to the size of
|
|
|
|
|
</table>
|
|
|
|
|
</div><div class="memdoc">
|
|
|
|
|
|
|
|
|
|
<p>Save a 16-bit-per-sample packed-pixel image from memory to disk. </p>
|
|
|
|
|
<p>Save a packed-pixel image with 13 to 16 bits of data precision per sample from memory to disk. </p>
|
|
|
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
|
|
|
<table class="params">
|
|
|
|
|
<tr><td class="paramname">handle</td><td>handle to a TurboJPEG instance</td></tr>
|
|
|
|
|
<tr><td class="paramname">filename</td><td>name of a file to which to save the packed-pixel image. The image will be stored in Windows BMP or PBMPLUS (PPM/PGM) format, depending on the file extension. Windows BMP files require 8-bit-per-sample data precision.</td></tr>
|
|
|
|
|
<tr><td class="paramname">filename</td><td>name of a file to which to save the packed-pixel image, which will be stored in PBMPLUS (PPM/PGM) format. The source data precision (from 13 to 16 bits per sample) can be specified using <a class="el" href="group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82a781db82741934e8cd008d308597c59d8" title="Data precision (bits per sample)">TJPARAM_PRECISION</a> and defaults to 16 if <a class="el" href="group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82a781db82741934e8cd008d308597c59d8" title="Data precision (bits per sample)">TJPARAM_PRECISION</a> is unset or out of range.</td></tr>
|
|
|
|
|
<tr><td class="paramname">buffer</td><td>pointer to a buffer containing a packed-pixel RGB, grayscale, or CMYK image to be saved</td></tr>
|
|
|
|
|
<tr><td class="paramname">width</td><td>width (in pixels) of the packed-pixel image</td></tr>
|
|
|
|
|
<tr><td class="paramname">pitch</td><td>samples per row in the packed-pixel image. Setting this parameter to 0 is the equivalent of setting it to <code>width * <a class="el" href="group___turbo_j_p_e_g.html#gad77cf8fe5b2bfd3cb3f53098146abb4c" title="Pixel size (in samples) for a given pixel format.">tjPixelSize</a>[pixelFormat]</code>.</td></tr>
|
|
|
|
|
<tr><td class="paramname">height</td><td>height (in pixels) of the packed-pixel image</td></tr>
|
|
|
|
|
<tr><td class="paramname">pixelFormat</td><td>pixel format of the packed-pixel image (see <a class="el" href="group___turbo_j_p_e_g.html#gac916144e26c3817ac514e64ae5d12e2a">Pixel formats</a>.) If this parameter is set to <a class="el" href="group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa5431b54b015337705f13118073711a1a">TJPF_GRAY</a>, then the image will be stored in PGM or 8-bit-per-pixel (indexed color) BMP format. Otherwise, the image will be stored in PPM or 24-bit-per-pixel BMP format. If this parameter is set to <a class="el" href="group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa7f5100ec44c91994e243f1cf55553f8b">TJPF_CMYK</a>, then the CMYK pixels will be converted to RGB using a quick & dirty algorithm that is suitable only for testing purposes. (Proper conversion between CMYK and other formats requires a color management system.)</td></tr>
|
|
|
|
|
<tr><td class="paramname">pixelFormat</td><td>pixel format of the packed-pixel image (see <a class="el" href="group___turbo_j_p_e_g.html#gac916144e26c3817ac514e64ae5d12e2a">Pixel formats</a>.) If this parameter is set to <a class="el" href="group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa5431b54b015337705f13118073711a1a">TJPF_GRAY</a>, then the image will be stored in PGM format. Otherwise, the image will be stored in PPM format. If this parameter is set to <a class="el" href="group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa7f5100ec44c91994e243f1cf55553f8b">TJPF_CMYK</a>, then the CMYK pixels will be converted to RGB using a quick & dirty algorithm that is suitable only for testing purposes. (Proper conversion between CMYK and other formats requires a color management system.)</td></tr>
|
|
|
|
|
</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#ga5a23ad0776c5333cda0d7c6d826e9d29" title="Returns a descriptive error message explaining why the last command failed.">tj3GetErrorStr()</a>.) </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#ga5a23ad0776c5333cda0d7c6d826e9d29" title="Returns a descriptive error message explaining why the last command failed.">tj3GetErrorStr()</a>.) </dd></dl>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
@@ -2966,11 +2967,11 @@ If you choose option 1, then <code>*jpegSize</code> should be set to the size of
|
|
|
|
|
</table>
|
|
|
|
|
</div><div class="memdoc">
|
|
|
|
|
|
|
|
|
|
<p>Save an 8-bit-per-sample packed-pixel image from memory to disk. </p>
|
|
|
|
|
<p>Save a packed-pixel image with 2 to 8 bits of data precision per sample from memory to disk. </p>
|
|
|
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
|
|
|
<table class="params">
|
|
|
|
|
<tr><td class="paramname">handle</td><td>handle to a TurboJPEG instance</td></tr>
|
|
|
|
|
<tr><td class="paramname">filename</td><td>name of a file to which to save the packed-pixel image. The image will be stored in Windows BMP or PBMPLUS (PPM/PGM) format, depending on the file extension. Windows BMP files require 8-bit-per-sample data precision.</td></tr>
|
|
|
|
|
<tr><td class="paramname">filename</td><td>name of a file to which to save the packed-pixel image. The image will be stored in Windows BMP or PBMPLUS (PPM/PGM) format, depending on the file extension. Windows BMP files require 8-bit-per-sample data precision. When saving a PBMPLUS file, the source data precision (from 2 to 8 bits per sample) can be specified using <a class="el" href="group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82a781db82741934e8cd008d308597c59d8" title="Data precision (bits per sample)">TJPARAM_PRECISION</a> and defaults to 8 if <a class="el" href="group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82a781db82741934e8cd008d308597c59d8" title="Data precision (bits per sample)">TJPARAM_PRECISION</a> is unset or out of range.</td></tr>
|
|
|
|
|
<tr><td class="paramname">buffer</td><td>pointer to a buffer containing a packed-pixel RGB, grayscale, or CMYK image to be saved</td></tr>
|
|
|
|
|
<tr><td class="paramname">width</td><td>width (in pixels) of the packed-pixel image</td></tr>
|
|
|
|
|
<tr><td class="paramname">pitch</td><td>samples per row in the packed-pixel image. Setting this parameter to 0 is the equivalent of setting it to <code>width * <a class="el" href="group___turbo_j_p_e_g.html#gad77cf8fe5b2bfd3cb3f53098146abb4c" title="Pixel size (in samples) for a given pixel format.">tjPixelSize</a>[pixelFormat]</code>.</td></tr>
|
|
|
|
|
|