This event is generated after an image is scanned with the scan device.

[C++Builder]   imagekitcontrolnameAfterScan(TObject *sender, NativeUInt DibHandle, NativeUInt OrgHandle, int ImageCount, short BitOrder)
[Delphi]   imagekitcontrolnameAfterScan(Sender: TObject; DibHandle, OrgHande: THandle; ImageCount: Integer; BitOrder: Smallint)

Parameters

Name Explanation
DibHandle The image handle of the scanned image data. This is the image handle of image data that can be processed by Windows
OrgHandle The image handle of the scanned image data. This is the image handle of image data that cannot be processed by Windows (i.e. 12, 14, 16 bit grayscale; 36, 42, 48 bit color; or when compression is used.)
ImageCount The number of images scanned
BitOrder This parameter refers to whether the bits in each byte of the scanned image start from the left or start from the right. 0: Start from the right (LSB), 1: Start from the left (MSB)

Explanation

This event is generated after an image is scanned with the scan device. The scanned image data (DibHandle and OrgHandle) is freed after this event fires so if you want to use this image data in any way, you must make a copy of the scanned image in the memory or save it in an image file.

(1) When using native transfer or when using memory transfer without compression:

If the scanned image is 1, 4, 8, or 24 bits, then the image will be set in the DibHandle and 0 will be set in the OrgHandle. If the scanned image is 12, 14, 16 bit grayscale, or 36, 42, or 48 bit color then the original image data will be set in the OrgHandle and the image data set in the DibHandle will be 8 bit grayscale or 24 bit color. If the image data is not supported by DibHandle, then it will be set to 0.

(2) When using memory transfer with compression:

The scanned image data will be set into the OrgHandle and 0 will be set into the DibHandle

(3) When using file transfer:

0 will be set in both the DibHandle and the OrgHandle

Furthermore, when the Scan.UiMode property is vikScanNONUI and the Scan.UnitMode property is vikScanPixel, depending on the datasource, the Scan.XResolution and Scan.YResolution values are set to 1

To cancel the scan, set the Scan.Cancel property to True within this event.

 

The ImageKit10 VCL is a product created by Newtone Corporation