开发商可以用Koda图像控件来开发图像软件,但是这四个控件不可以随同软件的分发而一同发放给客户。既然这些控件随同Windows 95, 98 NT and 2000一起安装,这也就基本限定了开发出来的图像软件只能在这几个安装了Windows映像程序附件的Windows平台上使用。这样以来,用这四个控件开发出来的软件必须同对应版本的Koda图像控件一同编译。而且,终端用户在安装软件之前还必须安装对应版本的映像程序附件。
Private Sub Paste_Click() if (imgedit1.IsClipboardDataAvailable and imgedit1.ImageDisplayed ) then ‘从剪贴板粘贴图象,其参数为Imgedit的显示区域的起始坐标 imgedit1.ClipboardPaste(selleft,seltop) end if End Sub
‘镜像图像
Private Sub Flip_Click() if imgedit1.ImageDisplayed then imgedit1.Flip ‘镜像图像 end if End Sub
‘旋转图象
Private Sub Rotate_Click() if imgedit1.ImageDisplayed then imgedit1.RotateRight ‘向右旋转图象 end if End Sub
‘实现剪切
Private Sub Rotate_Click() imgedit1.DrawSelectionRect(selleft, seltop,selwidth,selheight) ‘进行图象局部选择 imgedit1.ClipboardCut(selleft,seltop, selwidth,selheight) ‘剪切所选区域 End Sub
Private Sub Form_Load() With ImgEdit1 .FitTo 0 'BEST_FIT .DisplayBlankImage 1700, 2200 .ShowAnnotationToolPalette ‘随后可使用“批注”工具栏操作当前图像文件 End With End Sub
Private Function ScanTheImage(ByVal TheImageFile As String) As Boolean
Dim ReturnValue As Long Dim TestString As String If ImgScan1.ScannerAvailable then ReturnValue = ImgScan1.OpenScanner() ImgScan1.PageOption = 2 ImgScan1.FileType = 1 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