VintaSoft Twain .NET SDK 15.0: Documentation for .NET developer
In This Topic
    How to acquire image with different X and Y resolutions from TWAIN device?
    In This Topic
    Here is an example that demonstrates how to acquire images with different X and Y resolutions from TWAIN device:
    /// <summary>
    /// Acquire black-white images.
    /// </summary>
    public void AcquireImageWithDifferentResolutions(Vintasoft.Twain.Device device)
    {
        // disable UI
        device.ShowUI = false;
    
        // open the device
        device.Open();
        // specify that color images must be acquired
        device.PixelType = Vintasoft.Twain.PixelType.RGB;
        // set the inches as unit of measure
        device.UnitOfMeasure = Vintasoft.Twain.UnitOfMeasure.Inches;
        // set the desired resolution of acquired images
        device.Resolution = new Vintasoft.Twain.Resolution(200f, 400f);
    
        // acquire images asynchronously
        device.Acquire();
    }
    
    ''' <summary>
    ''' Acquire black-white images.
    ''' </summary>
    Public Sub AcquireImageWithDifferentResolutions(device As Vintasoft.Twain.Device)
            ' disable UI
            device.ShowUI = False
    
            ' open the device
            device.Open()
            ' specify that color images must be acquired
            device.PixelType = Vintasoft.Twain.PixelType.RGB
            ' set the inches as unit of measure
            device.UnitOfMeasure = Vintasoft.Twain.UnitOfMeasure.Inches
            ' set the desired resolution of acquired images
            device.Resolution = New Vintasoft.Twain.Resolution(200F, 400F)
    
            ' acquire images asynchronously
            device.Acquire()
    End Sub