VintaSoft Twain .NET SDK v10.2
How to acquire 48-bit color images from scanner?

16-bit gray images and 48-bit color images can be acquired from the device only in Memory transfer mode.


Example: Here is an example that shows how to acquire 48-bit color images from the device.

''' <summary>
''' Acquire 48-bpp color images.
''' </summary>
Public Sub Acquire48BppColorImages(ByVal 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
              
/// <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();
}
                


Example: Here is an example that shows how to acquire 16-bit gray images from the device.
''' <summary>
''' Acquire 16-bpp gray images.
''' </summary>
Public Sub Acquire16BppGrayImages(ByVal 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
              
/// <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();
}