ImageEn, unit ietwain

TIETwainParams.PixelType

TIETwainParams.PixelType


Declaration

property PixelType: TIEIntegerList;


Description

Specifies the type of pixel data that a scanner is capable of acquiring.

Valid values are:
Value Description
Twain_PixelType_BW (0) Black & white (1 bit)
Twain_PixelType_Grayscale(1) Gray scale (8 bit)
Twain_PixelType_FullRGB (2) Full RGB (24 bit)
Twain_PixelType_Palette (3) Palette (ImageEn can't support this)
Twain_PixelType_CMY (4) CMY (ImageEn can't support this)
Twain_PixelType_CMYK (5) CMYK (ImageEn can't support this)
Twain_PixelType_YUV (6) YUV (ImageEn can't support this)
Twain_PixelType_YUVK (7) YUVK (ImageEn can't support this)
Twain_PixelType_CIEXYZ (8) CIEXYZ (ImageEn can't support this)

Above values can be assigned to PixelType.CurrentValue property. To see which values your scanner supports, consult the PixelType.Items[] array.
You can also limit scanner user interface allowed values by removing some PixelTtype.Items[] items.

Twain Property: ICAP_PIXELTYPE

Note: Use IsCapabilitySupported to determine if this capability is supported by the current scanner


Example

// Acquires a black/white (1bit) image
ImageEnView1.IO.TwainParams.PixelType.CurrentValue:= Twain_PixelType_BW;
ImageEnView1.IO.TwainParams.VisibleDialog := False;
ImageEnView1.IO.Acquire();

// Acquires a gray scale (8bit) image
ImageEnView1.IO.TwainParams.PixelType.CurrentValue := Twain_PixelType_Grayscale;
ImageEnView1.IO.TwainParams.VisibleDialog := False;
ImageEnView1.IO.Acquire();

// Acquires a full RGB (24bit) image
ImageEnView1.IO.TwainParams.PixelType.CurrentValue := Twain_PixelType_FullRGB;
ImageEnView1.IO.TwainParams.VisibleDialog := False;
ImageEnView1.IO.Acquire();

// Show standard scanner user interface, but allow only black/white image acquisition
ImageEnView1.IO.TwainParams.PixelType.Clear();
ImageEnView1.IO.TwainParams.PixelType.Add(Twain_PixelType_BW);
ImageEnView1.IO.Acquire();