VintaSoft Twain .NET SDK 12.1
In This Topic
    How to acquire black-white images from TWAIN scanner?
    In This Topic
    Type of acquired images can be set via Device.PixelType property.


    Here is an example that demonstrates how to acquire black-white images from the 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(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