LEADTOOLS TWAIN C DLL Help > Function References > L_TwainSetJPEGCompression |
#include "lttwn.h"
L_LTTWN_API L_INT L_TwainSetJPEGCompression(hSession, pTwJpegComp, uFlag)
HTWAINSESSION hSession; |
/* handle to an existing TWAIN session */ |
pTW_JPEGCOMPRESSION pTwJpegComp; |
/* pointer to a structure */ |
L_UINT uFlag; |
/* flag */ |
Sets or restores JPEG compression options for the specified TWAIN session.
Parameter |
Description |
|
hSession |
Handle to an existing TWAIN session. This handle is obtained by calling the L_TwainInitSession function. |
|
pTwJpegComp |
Pointer to a TW_JPEGCOMPRESSION structure that references the JPEG compression options. |
|
uFlag |
Flag that indicates whether to set new or restore default JPEG compression options. Possible values are: |
|
|
Value |
Meaning |
|
LTWAIN_SET_JPEG_COMPRESSION |
[0x0001] Set new JPEG compression options |
|
LTWAIN_RESET_JPEG_COMPRESSION |
[0x0002] Restore default JPEG compression options |
Returns
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes. |
Comments
Depending upon the flag used, this function will either set JPEG compression options for the specified TWAIN session, or restore the default JPEG compression options for the specified TWAIN session. For more information about TW_JPEGCOMPRESSION, refer to the TWAIN 1.9 specification from the site "http://www.twain.org/".
This function must be called after calling the L_TwainStartCapsNeg function and before calling the L_TwainEndCapsNeg function.
Required DLLs and Libraries
LTTWN For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application. |
See Also
Functions: |
L_TwainGetJPEGCompression, L_TwainInitSession, L_TwainStartCapsNeg |
Topics: |
Example
For an example, refer to L_TwainGetJPEGCompression.