How to acquire 48-bit color images from TWAIN scanner?
In This Topic
16-bit gray images and 48-bit color images can be acquired from TWAIN device only in Memory transfer mode.
Here is an example that demonstrates how to acquire 48-bit color images from TWAIN device:
/// <summary>
/// Acquire 48-bpp color images.
/// </summary>
public void Acquire48BppColorImages(Vintasoft.Twain.Device device)
{
// use the Memory transfer mode
device.TransferMode = Vintasoft.Twain.TransferMode.Memory;
// disable UI
device.ShowUI = false;
// open the device
device.Open();
// specify that color images must be acquired
device.PixelType = Vintasoft.Twain.PixelType.RGB;
// specify the bit depth for acquired images (16 - for Epson scanners, 48 - for Canon scanners)
device.BitDepth = 16;
// acquire images asynchronously
device.Acquire();
}
''' <summary>
''' Acquire 48-bpp color images.
''' </summary>
Public Sub Acquire48BppColorImages(device As Vintasoft.Twain.Device)
' use the Memory transfer mode
device.TransferMode = Vintasoft.Twain.TransferMode.Memory
' disable UI
device.ShowUI = False
' open the device
device.Open()
' specify that color images must be acquired
device.PixelType = Vintasoft.Twain.PixelType.RGB
' specify the bit depth for acquired images (16 - for Epson scanners, 48 - for Canon scanners)
device.BitDepth = 16
' acquire images asynchronously
device.Acquire()
End Sub
Here is an example that demonstrates how to acquire 16-bit gray images from TWAIN device:
/// <summary>
/// Acquire 16-bpp gray images.
/// </summary>
public void Acquire16BppGrayImages(Vintasoft.Twain.Device device)
{
// use the Memory transfer mode
device.TransferMode = Vintasoft.Twain.TransferMode.Memory;
// disable UI
device.ShowUI = false;
// open the device
device.Open();
// specify that gray images must be acquired
device.PixelType = Vintasoft.Twain.PixelType.Gray;
// specify the bit depth for acquired images (16 - for Epson scanners, 48 - for Canon scanners)
device.BitDepth = 16;
// acquire images asynchronously
device.Acquire();
}
''' <summary>
''' Acquire 16-bpp gray images.
''' </summary>
Public Sub Acquire16BppGrayImages(device As Vintasoft.Twain.Device)
' use the Memory transfer mode
device.TransferMode = Vintasoft.Twain.TransferMode.Memory
' disable UI
device.ShowUI = False
' open the device
device.Open()
' specify that gray images must be acquired
device.PixelType = Vintasoft.Twain.PixelType.Gray
' specify the bit depth for acquired images (16 - for Epson scanners, 48 - for Canon scanners)
device.BitDepth = 16
' acquire images asynchronously
device.Acquire()
End Sub