VintaSoft Twain .NET SDK v10.2
How to acquire image with different X and Y resolutions?

Example: Here is an example that shows how to acquire images from the device with different X and Y resolutions.

''' <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
              
/// <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(); 
}
                

See Also

About VintaSoft Twain .NET SDK

API changes history