ImgScan1.PageType = 1
ImgScan1.CompressionType = 4
ImgScan1.CompressionInfo = 1
ImgScan1.ScanTo = 2 ‘保存为文件
ImgScan1.image = TheImageFile ‘图像将被保存
ImgScan1.ShowSetupBeforeScan = True
ImgScan1.MultiPage = True
ReturnValue = ImgScan1.StartScan()
DoEvents
ImgScan1.CloseScanner
TestString = Dir(TheImageFile)
If TestString <> "" Then
ScanTheImage = True
End If
Else
Msgbox “扫描设备尚不可用”
Exit function
End If
End Function
三、联合应用举例
本文附加了eiStream公司的Windows映像程序控件开发参考例程中的“Imaging Sample”一例(此程序在Windows 98/VB6下调试通过)。本例程对除了ImgOCR外四个自由控件的主要功能作了详细讨论。详见源
程序” Imaging Sample.rar”。
四、小结
以上四个Kodak控件主要威力在于:图像注释功能、多页图像文件的的管理能力、缩略图预览功能、图像扫描功能。对于专业版本,还有图像OCR功能。以上仅为抛砖引玉,读者可以结合Windows的HELP文件夹下的帮助文件Imgocxd.hlp等有关
资料详细研究。