VintaSoft Twain .NET SDK v10.2
LightPath Property (Device)
Example 




Vintasoft.WpfTwain Namespace > Device Class : LightPath Property
Determines that the image was captured transmissively or reflectively.
Syntax
'Declaration
 
Public Property LightPath As LightPath
'Usage
 
Dim instance As Device
Dim value As LightPath
 
instance.LightPath = value
 
value = instance.LightPath
public LightPath LightPath {get; set;}
public: __property LightPath get_LightPath();
public: __property void set_LightPath( 
   LightPath value
);
public:
property LightPath LightPath {
   LightPath get();
   void set (    LightPath value);
}
Exceptions
ExceptionDescription
Thrown if device is in wrong state.
Thrown if device does not support capability.
Thrown if the .NET debugger is used and the function evaluation requires all threads to run.
Remarks
Call this property only when device is opened (State == DeviceState.Opened).

Supported pixel types can be received by the GetSupportedLightPaths method.
Example
This example shows how to scan negatives using a scanner.
Public Sub ScanColorImageWithLightPath(ByVal device As Device)
    device.ShowUI = False
    device.DisableAfterAcquire = True
            
    device.Open()
    device.PixelType = PixelType.RGB
    device.UnitOfMeasure = UnitOfMeasure.Inches
    device.Resolution = New Resolution(300.0F, 300.0F)
    device.LightPath = LightPath.Transmissive
            
    device.Acquire()
End Sub
public void ScanColorImageWithLightPath(Device device)
{
    device.ShowUI = false;
    device.DisableAfterAcquire = true;
            
    device.Open();
    device.PixelType = PixelType.RGB;
    device.UnitOfMeasure = UnitOfMeasure.Inches;
    device.Resolution = new Resolution(300f, 300f);
    device.LightPath = LightPath.Transmissive;
            
    device.Acquire();
}
Requirements

Target Platforms: Windows 8, Windows 7, Windows Vista, Windows XP, Windows Server 2012, Windows Server 2008, Windows Server 2003

See Also

Reference

Device Class
Device Members
GetSupportedLightPaths Method
LampState Property
LightSource Property
Open Method