VintaSoft Twain .NET SDK 14.1: Руководство для .NET разработчика
В этом разделе
    Как получить изображение с разными разрешениями по X и Y от TWAIN сканера?
    В этом разделе
    Вот пример, который демонстрирует, как получить изображения с устройства с различными разрешениями по X и Y:
    /// <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(ByVal 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(200.0F, 400.0F)
    
        ' acquire images asynchronously
        device.Acquire()
    End Sub