VintaSoft Twain .NET SDK 15.5: Documentation for .NET developer
In This Topic
How to acquire black-white images from TWAIN image scanner?
In This Topic
Type of acquired images can be set using Device.PixelType property.


Here is an example that demonstrates how to acquire black-white images from TWAIN device:
/// <summary>
/// Acquire black-white images.
/// </summary>
public void AcquireBlackWhiteImage(Vintasoft.Twain.Device device)
{
    // disable UI
    device.ShowUI = false;

    // open the device
    device.Open();
    // specify that black-white images must be acquired
    device.PixelType = Vintasoft.Twain.PixelType.BW;

    // acquire images asynchronously
    device.Acquire();
}
''' <summary>
''' Acquire black-white images.
''' </summary>
Public Sub AcquireBlackWhiteImage(device As Vintasoft.Twain.Device)
    ' disable UI
    device.ShowUI = False

    ' open the device
    device.Open()
    ' specify that black-white images must be acquired
    device.PixelType = Vintasoft.Twain.PixelType.BW

    ' acquire images asynchronously
    device.Acquire()
End Sub