Description: 在一些看图软件中,通常有对图像动态放大和缩小的功能。这是如何实现的呢?我们通过研究,在VB中实现了这种功能,具体方法如下。
进入VB,新建一工程,在窗体Form1上添加如下控件:一个图像框控件Image1,三个命令按钮Command1,Command2,Command3,其Caption性分别设置为“放大”、“缩小”、“打开”,再加入一个通用对话框控件CommonDialog1,用于选择要打开的文件。-in some flashcards software, the images are usually dynamic pan and zoom functions. This is how to achieve? Through research, in VB to achieve this function, specific methods are as follows. Enter VB, a new project, in the form Form1 add the following controls : an image frame controls Image1, three orders Command1 button, Command2. Command3, Caption, respectively set to "enlarge", "Go", "Open" the inclusion of a common dialog control CommonDialog1 for choice to open the document. Platform: |
Size: 1082 |
Author:金鹏 |
Hits:
Description: 在一些看图软件中,通常有对图像动态放大和缩小的功能。这是如何实现的呢?我们通过研究,在VB中实现了这种功能,具体方法如下。
进入VB,新建一工程,在窗体Form1上添加如下控件:一个图像框控件Image1,三个命令按钮Command1,Command2,Command3,其Caption性分别设置为“放大”、“缩小”、“打开”,再加入一个通用对话框控件CommonDialog1,用于选择要打开的文件。-in some flashcards software, the images are usually dynamic pan and zoom functions. This is how to achieve? Through research, in VB to achieve this function, specific methods are as follows. Enter VB, a new project, in the form Form1 add the following controls : an image frame controls Image1, three orders Command1 button, Command2. Command3, Caption, respectively set to "enlarge", "Go", "Open" the inclusion of a common dialog control CommonDialog1 for choice to open the document. Platform: |
Size: 1024 |
Author:金鹏 |
Hits:
Description: VC用树视图加载磁盘、MRU历史图像文件(支持所有格式图像)支持放大缩小。代码用到了树控件、对话框、多状态栏、浮动工具条-VC disk loaded with TreeView, MRU history of image files (supports all image formats) Support for Zoom. Code used in the tree control, dialog box, multi-state bar, floating toolbar Platform: |
Size: 216064 |
Author:刘QM |
Hits:
Description: 利用VTK实现图像的放大缩小,基于对话框编写的,有助于学习VTK的朋友-Using VTK to achieve the image to zoom in, based on the dialog box, prepared to help a friend learn VTK Platform: |
Size: 5143552 |
Author:尹梓名 |
Hits:
Description: 基于MFC对话框的图片浏览器,可使用滚轮对图片进行缩放,使用鼠标对图片进行拖拽,能关联主要图片格式-MFC dialog-based image browser, you can use the scroll wheel to zoom the picture, use the mouse to drag and drop the picture,and it can be associated with the main image formats Platform: |
Size: 1552384 |
Author:邹浩 |
Hits:
Description: 最近刚学GDI+,就想找个应用练练手,于是基于GDI+封装了此类,接口已经独立出来,使用十分方便,在MFC上直接使用(在VS2010 x64上编译,32位也可以),类的特定如下:
1.基于GDI+封装的类,文档和对话框可直接使用;
2.类初始化时可选择图片是否充满控件,充满的话,图片会适应控件的宽度进行缩放,但会保存原有的长宽比不变;
3.变换前后的坐标关系已经封装好,可直接调用;
4.缩放前后采样最临近点差值(windows图片查看器和PS都是采样这种差值方式,可能是因为效率比较高),具体差值方式可更改,参考一下GDI+就可以,如果想对图像像素进行操作,可使用GDI+的Bitmap类,可对图像像素点进行操作-Recently learning GDI+, want to find a application practice, so based on GDI+ package such interface has been independent, and the use is very convenient, in the MFC used directly (in VS2010 x64 compiler, 32 bits), specific classes are as follows:
1 class based on the GDI+ package, the document and dialog box can be used directly
2 class initialization can choose whether the picture is full of controls, full of words, the picture will adapt to the control of the width of the zoom, but will preserve the original length and width ratio unchanged
3 coordinates of the transformation before and after the relationship has been packaged, can be called directly
. scaling before and after sampling the approaching spreads values (Windows picture viewer and PS are the difference between sampling, probably because the efficiency is high. In detail, the difference can be changed, refer to the GDI+ can be, if you want to operate on the image pixels, using GDI bitmap class, can operate on the Platform: |
Size: 2255872 |
Author:于福翔 |
Hits: