c#中的图像连接 [英] image concatenation in c#

查看:83
本文介绍了c#中的图像连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我没有太多的运气寻找以下

挑战的指导。

我有一个.NET应用程序,我想采取多个thumnail

图像,并将它们组合成一个平面图像。

有人能给我一个如何拍摄两个图像的例子,imgA和

imgB并创建imgC,这将是imgA和imgB的一个图像由

side或imgA在imgB之上。如果imgA和imgB都是10像素x 10

像素,imgC的并排版本将是10像素x 20像素。

提前感谢。


Jon

Hi,
I haven''t had much luck searching for guidance on the following
challenge.
I have a .NET app in which I would like to take multiple thumnail
images and combine them into one flat image.
Could someone give me an example of how to take two images, imgA and
imgB and create imgC which would be one image of imgA and imgB side by
side or imgA on top of imgB. If both imgA and imgB are 10pixels x 10
pixels, the side by side version of imgC would be 10pixels x 20 pixels.
Thanks in advance.

Jon

推荐答案

首先,创建一个10X20像素大小的图像,然后获取

从它上面绘制图形。然后你在一半上绘制第一张图像,

,第二张图像在另一半上。有关详细信息,请参阅System.Drawing命名空间:

http://msdn.microsoft.com/library/en...asp?frame=true


- -

HTH,


Kevin Spencer

微软MVP

专业Numbskull


提问意见的人是明智的。

与事实争吵的人是个傻瓜。


" byrd48" <通过***** @ rocketmail.com>在消息中写道

news:11 ********************* @ g10g2000cwb.googlegro ups.com ...
First, you create an image that is 10X20 pixels in size, and get the
Graphics from it to draw on it. Then you draw the first image on one half,
and the second on the other. For details, see the System.Drawing namespace:

http://msdn.microsoft.com/library/en...asp?frame=true

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

The man who questions opinions is wise.
The man who quarrels with facts is a fool.

"byrd48" <by*****@rocketmail.com> wrote in message
news:11*********************@g10g2000cwb.googlegro ups.com...

我没有太多的运气在寻找以下
挑战的指导。
我有一个.NET应用程序,我想要多个thumnail 有人能给我一个如何拍摄两个图像的例子,imgA和
imgB并创建imgC,这将是imgA和imgB的一个图像在imgB之上的侧面或imgA。如果imgA和imgB都是10像素x 10
像素,imgC的并排版本将是10像素x 20像素。
提前谢谢。

Jon
Hi,
I haven''t had much luck searching for guidance on the following
challenge.
I have a .NET app in which I would like to take multiple thumnail
images and combine them into one flat image.
Could someone give me an example of how to take two images, imgA and
imgB and create imgC which would be one image of imgA and imgB side by
side or imgA on top of imgB. If both imgA and imgB are 10pixels x 10
pixels, the side by side version of imgC would be 10pixels x 20 pixels.
Thanks in advance.

Jon



谢谢,

你能指点我一个代码示例吗?我现在环顾了一天

并没有找到解决方案。我已经看过在图像上叠加

水印的例子,但是没有拍摄两张图像并且将它们粘在一起

再拍一次。


再次感谢。


Jon

Thanks,
Could you point me to a code example? I''ve looked around for a day now
and haven''t found the solution. I''ve seen examples of overlaying
watermarks on images, but not taking two images and "gluing them
together" to make one.

thanks again.

Jon


我不知道在哪里可以找到代码示例。这很简单。让's $

假设您有2张图片,每张图片大小为10X10像素。你想把

" imageA"在左边,和imageB在右边。您创建一个20X10图像,

从中获取图形,并以原始大小绘制每个图像。唯一的

差异是您绘制imageA在位置(0,0)和imageB处在

位置(10,0)。


-

HTH,


Kevin Spencer

Microsoft MVP

专业Numbskull


提出意见的人是明智的。

与事实争吵的人是个傻瓜。


" byrd48" <通过***** @ rocketmail.com>在消息中写道

news:11 ********************** @ j55g2000cwa.googlegr oups.com ...
I don''t know where to find a code sample. It''s pretty straightforward. Let''s
say you have 2 images, each is 10X10 pixels in size. You want to put
"imageA" on the left, and "imageB" on the right. You create a 20X10 image,
get the Graphics from it, and draw each image at its original size. The only
difference is that you draw "imageA" at location (0,0) and "imageB" at
location (10,0).

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

The man who questions opinions is wise.
The man who quarrels with facts is a fool.

"byrd48" <by*****@rocketmail.com> wrote in message
news:11**********************@j55g2000cwa.googlegr oups.com...
谢谢,
你能指点我一个代码示例吗?我现在环顾了一天
并没有找到解决方案。我已经看到了在图像上叠加水印的例子,但是没有拍摄两张图像并且将它们粘在一起。再做一次。

Jon
Thanks,
Could you point me to a code example? I''ve looked around for a day now
and haven''t found the solution. I''ve seen examples of overlaying
watermarks on images, but not taking two images and "gluing them
together" to make one.

thanks again.

Jon



这篇关于c#中的图像连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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