LTwain::SetImageUnit
#include "ltwrappr.h"
L_INT LTwain::SetImageUnit (nUnit)
L_INT nUnit; |
/* image unit */ |
Sets the image unit value used to transfer images from the current TWAIN source.
Parameter |
Description |
nUnit |
Specifies the unit value to set. For more information on possible values, refer to www.twain.org/download.htm and click on TWAIN Specification (Version 1.9). |
Returns
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes. |
Comments
This function internally sets the image unit capability ICAP_UNITS. For more information on this capability, refer to www.twain.org/download.htm and click on TWAIN Specification (Version 1.9).
To obtain the current image unit value, call the LTwain::GetImageUnit 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
Example
void TestImageOptions(LTwain * plTwain)
{
L_INT nRet = SUCCESS;
L_INT nUnit;
nRet = plTwain->GetImageUnit (&nUnit);
if (nRet == SUCCESS)
{
if (nUnit == TWUN_INCHES)
plTwain->SetImageUnit(TWUN_INCHES);
}
L_INT nBPP;
nRet = plTwain->GetImageBitsPerPixel (&nBPP);
if (nRet == SUCCESS)
{
if (nBPP == 24)
plTwain->SetImageBitsPerPixel (24);
}
}