VintaSoft Twain .NET SDK v10.2
How to acquire black-white images from scanner?

Type of acquired images can be set via Device.PixelType property.


Example: Here is an example that shows how to acquire black-white images from the device.

''' <summary>
''' Acquire black-white images.
''' </summary>
Public Sub AcquireBlackWhiteImage(ByVal 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
              
/// <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();
}