选择在Windows窗体的面板中加载的图像 [英] select images thats loaded within a panel in windows forms

查看:97
本文介绍了选择在Windows窗体的面板中加载的图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是C#的初学者.我已经使用c#在.net中创建了一个.tif拆分和合并应用程序.我遇到的问题是,我需要选择一些在窗体的面板控件中加载的图像,以便可以合并所选的图像.任何帮助将不胜感激.
提前致谢. :confused:

Hi, I''m a beginner coder in c#. I have created a .tif splitting and merging application in .net using c#. The problem I have is that I need to select a number of images that are loaded in the panel control of the form so that the selected images can be merged. Any help would be appreciated.
Thanks in advance. :confused:

推荐答案

您是要允许用户选择合并的图像还是从已知文件列表中以编程方式进行操作?

将图像合并为一个图像并不难(假设它们是正方形的).只需创建所需(组合)大小的空白位图,然后将图像以所需/适当的坐标将图像涂抹到该基础图像上即可.

允许用户有机会实际选择要合并的图像包括创建一个ListView控件,该控件使用显示缩略图的显示模式.当用户双击它时,它会在适当的坐标处变白到基本位图上.
Do you mean allow the user to select the images that are merged, or doing it programatically from a known list of files?

Merging the images into a single one shouldn''t be that hard (assuming they''re square). Just create a blank bitmap of the desired (combined) size, and blit the images onto that base image at the desired/appropriate coordinates.

Allowing the user the chance to actually select the images that are to be merged involves creating a ListView control that uses the display mode that shows thumbnails. When the user double-clicks one, its blitted onto the base bitmap at an appropriate coordinate.


感谢快速响应...我可能对我的查询提出了一些错误.当用户从"OpenFileDialog"框中选择图像并单击加载/拆分图像"按钮时,许多拆分图像将显示在窗体的面板控件中.我想知道我是否可以使那些图像可选,以便用户可以从面板中选择其中的一些,并且当他单击合并"按钮时,它们将被合并.我拥有的合并和所有其他方法都可以正常工作,我只想选择加载到面板上的图片即可.
注意:所有加载的图像都是方形的.
谢谢.
Thanks for the quick responce...i may have put across my query abit wrong. When the user selects an image from the "OpenFileDialog" box and clicks the "load/split image" button , a number of split images are displayed in the panel control of the form. I want to know if i can make those images selectable so that the user can select a few of them from the panel and when he hits the "merge" button they are merged. The merge and all other methods i have works fine, i just want to make the pictures that are loaded onto the panel selectable.
NB: all images that are loaded are square.
Thanks .


目前正在尝试....谢谢
im trying that at the moment....thanks


这篇关于选择在Windows窗体的面板中加载的图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆