龙盟编程博客 | 无障碍搜索 | 云盘搜索神器
快速搜索
主页 > 软件开发 > VB开发 >

在VB6中实现Kodak控件编程(3)

时间:2009-12-30 15:42来源:未知 作者:admin 点击:
分享到:
‘旋转图象 Private Sub Rotate_Click() if imgedit1.ImageDisplayed then imgedit1.RotateRight ‘向右旋转图象 end if End Sub ‘实现剪切 Private Sub Rotate_Click() imgedit1.DrawSelectionRe

‘旋转图象

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 

   2) 另外,与ImgEdit控件绑定在一起的还有一个ImgAnnTool按钮控件,这一控件对应映像程序中的“批注”工具栏。下面这个例子可以通过“批注”工具栏操作ImgEdit控件中的图像。只需如下极简代码便OK。

Private Sub Form_Load()
  With ImgEdit1
   .FitTo 0 'BEST_FIT
   .DisplayBlankImage 1700, 2200
   .ShowAnnotationToolPalette ‘随后可使用“批注”工具栏操作当前图像文件
  End With
End Sub 

二、Kodak图像扫描控件应用举例

   1) ImgScan控件的主要属性有:

   a、FileType:图像的文件类型(该构件支持三种:TIFF,BMP,AWD);

   b、ScanTo:返回或设置被扫描图像的目的;

可取值  含义 
0 (缺省)  显示被扫描的图像. 
1  显示被扫描的图像并写入一个文件. 
2  把图像写入一个文件 
3  以模板方式把图像写入文件并显示. 
4.  以模板方式把图像写入文件 
5  传真被扫描的图像 

   注意:如果取缺省值0,必须和 Wang ImgEdit 构件配合使用。

   c、DestImageControl:Wang ImgEdit构件名;

   d、Zoom:图像的放缩比例

精彩图集

赞助商链接