且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

选择在Windows窗体的面板中加载的图像

更新时间:2023-12-06 17:07:04

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

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

允许用户有机会实际选择要合并的图像包括创建一个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