This event is generated after an image is scanned with the scan device.
[Visual Basic]   imagekitcontrolname_AfterScan(ByVal DibHandle As ImageKit9(A)LibCtl.LONG_PTR, ByVal OrgHandle As ImageKit9(A)LibCtl.LONG_PTR, ByVal ImageCount As Long, ByVal BitOrder As Integer)
[Visual C++]     OnAfterScanimagekitcontrolname(LONG_PTR DibHandle, LONG_PTR OrgHandle, long ImageCount, short BitOrder)
[VB.NET]   imagekitcontrolname_AfterScan(ByVal sender As System.Object, ByVal e As AxImageKit9(A)Lib.IImageKitEvents_AfterScanEvent)
[C#.NET]   imagekitcontrolname_AfterScan(object sender, AxImageKit9(A)Lib.IImageKitEvents_AfterScanEvent e)

* ImageKitKit9ALibCtl/AxImageKit9ALib refers to the ANSI version, ImageKit9LibCtl/AxImageKit9Lib refers to the Unicode version.

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)

* The second parameter in VB.NET/C#.NET is e and it contains the DibHandle and other arguments. (the first letter is lower case)

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 2 (ikScanNONUI) and the Scan.UnitMode property is 5 (ikScanPixel), 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.

Differences from ImageKit7/8

  The DibHandle and OrgHandle argument types have changed

 

The ImageKit9 ActiveX is a product created by Newtone Corporation