当前位置:编程学习 > C#/ASP.NET >>

C#图片拼接

--------------------编程问答-------------------- GDI把所有图片绘制在一张图片上 --------------------编程问答--------------------
引用 1 楼 good_jobs 的回复:
GDI把所有图片绘制在一张图片上
 能具体针对写下代码吗? --------------------编程问答-------------------- --------------------编程问答-------------------- 用C++ GDI更容易 --------------------编程问答-------------------- 我也做这样类似的,目前还没实现,顶一下 --------------------编程问答-------------------- 类似美图部分? --------------------编程问答--------------------
            Bitmap Img = new Bitmap(400, 400);      //创建一张空白图片
            Graphics g = Graphics.FromImage(Img);   //从空白图片创建一个Graphics
            g.DrawImage(Image1, new Point(0, 0));   //把图片指定坐标位置并画到空白图片上面
            g.DrawImage(Image2, new Point(0, 0));   //坐标自己算
            g.DrawImage(Image3, new Point(0, 0));   //坐标自己算
            g.DrawImage(Image4, new Point(0, 0));   //坐标自己算
            this.BackgroundImage = Img;             //显示大图
--------------------编程问答-------------------- 又是一道标准的初中数学题啊 --------------------编程问答--------------------

Graphics g = Graphics.FromImage(backgroundImage);
for (int i = 0; i < 9; i++){
    g.DrawImage(smallImages[i], i % 3 * (Grid.Width+间隔), i / 3 * (Grid.Height+间隔), Grid.Width, Grid.Height);
}
backgroundImage.Save("");
--------------------编程问答-------------------- 半年前的帖子应该不用回帖的
补充:.NET技术 ,  C#
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,