如何将一张图片放在另一张上 [英] how to put one image on another

查看:160
本文介绍了如何将一张图片放在另一张上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在一个picturebox1中有一个image1,在另一个picturebox2中有另一个image2,我想将来自picturebox2的image2放在picturebox1中的image1上. 我正在使用C#语言.

请任何人在这方面帮助我.如果提供的代码,我将非常感激.

i am having an image1 in a picturebox1 and another image2 on another picturebox2, i want to put image2 from picturebox2 on image1 in picturebox1.
i am using c# language.

plz any one help me in this regard.if code provided i will be greatly thankful

推荐答案

那将取决于您所说的放置图像"的含义.在图像上".
如果您的意思是在另一张图像的一部分上绘制图像,破坏其下方的内容",那么您要做的就是:
That''s going to depend on what you mean by "put an image on an image".
If you mean "draw an image on part of another image, destroying what is underneath" then all you need to do is:
using (Graphic g = Graphics.FromImage(myTargetPictureBox.Image))
   {
   g.DrawImage(mySourcePictureBox.Image, new Point(100,100));
   }


这篇关于如何将一张图片放在另一张上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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