DTWAIN_SetLightPath

Top  Previous  Next

The DTWAIN_SetLightPath enables transmissive or reflective acquisitions.

 

DTWAIN_BOOL DTWAIN_SetLightPath (

DTWAIN_SOURCE

Source,

LONG

LightPath );

 

Parameters

Source

An open TWAIN Source.

 

LightPath

The light path to use.

 

 

Return Values

The return value is TRUE if successful.  Otherwise FALSE is returned.

 

Comments

The DTWAIN_SetLightPath function sets the Source light path to either reflective or transmissive.  The LightPath parameter determines whether to use reflective or transmissive.  For reflective, LightPath must be DTWAIN_LP_REFLECTIVE.  For transmissive, LightPath must be DTWAIN_LP_TRANSMISSIVE.

 

Transmissive scanning is required if scanning films or transparencies.  Reflective scanning is used for normal (paper) scanning.  By turning on transmissive scanning, scanners equipped with a transparency adapter can be utilized.

 

To determine if the device supports setting the light path, call DTWAIN_IsLightPathSupported.  To get the current light path, call DTWAIN_GetLightPath.

 

Example

To turn on the transparency adapter for many scanners, the following example demonstrates setting the light path to use the transparency adapter:

 

void ScanTransparency( )

{

   /* ... */

   DTWAIN_SOURCE Source;

   Source = DTWAIN_SelectSource( );

   if ( DTWAIN_IsLightPathSupported( Source ) )

   {

        /* Turn on transparency adapter */

        DTWAIN_SetLightPath( Source, DTWAIN_LP_TRANSMISSIVE );

  }

  /* ... */

}

 

To turn off the transparency adatper a call to DTWAIN_SetLightPath with the LightPath as DTWAIN_LP_REFLECTIVE must be done.

 

TWAIN State Transitions

The Source must be in State 4. or higher

 

Prerequisite Function Call(s)

DTWAIN_SysInitialize

DTWAIN Source Selection Function

 

 

See Also

Films and Transparencies