PixelFlavor Property (Device)
Gets or sets the value of pixel flavor for current scan session.
Call this property only when device is opened (State == DeviceState.Opened).
This property has effect only on black-white images.
This C#/VB.NET code shows how to acquire black-white images from the device.
Public Sub ScanBlackWhiteImage(device As Vintasoft.Twain.Device)
device.ShowUI = False
device.DisableAfterAcquire = True
device.Open()
device.PixelType = Vintasoft.Twain.PixelType.BW
device.PixelFlavor = Vintasoft.Twain.PixelFlavor.Chocolate
device.UnitOfMeasure = Vintasoft.Twain.UnitOfMeasure.Inches
device.Resolution = New Vintasoft.Twain.Resolution(200F, 200F)
device.Acquire()
End Sub
public void ScanBlackWhiteImage(Vintasoft.Twain.Device device)
{
device.ShowUI = false;
device.DisableAfterAcquire = true;
device.Open();
device.PixelType = Vintasoft.Twain.PixelType.BW;
device.PixelFlavor = Vintasoft.Twain.PixelFlavor.Chocolate;
device.UnitOfMeasure = Vintasoft.Twain.UnitOfMeasure.Inches;
device.Resolution = new Vintasoft.Twain.Resolution(200f, 200f);
device.Acquire();
}
Target Platforms: .NET 9; .NET 8; .NET 7; .NET 6; .NET Framework 4.8, 4.7, 4.6, 4.5, 4.0, 3.5