求教用C#实现将2张JPG图像合并为一张图像,
合并方式为:
将2张图片合并为一张图片,第二张图片放在第一张图片的右侧(请注意不是在下方)。
PS:2张图片的大小是一样的。

解决方案 »

  1.   

    Bitmap b1 = ...;
    Bitmap b2 = ...;
    Btimap b = new Bitmap(b1.Width+b2.Width, b1.Height);
    Graphics g  = Graphics.FromImage(b);
    g.DrawImage(b1);
    g.DrawImage(b2, b1.Width, 0);大致这样
      

  2.   

    Image img1 = Image.FromFile(imgFilePath1);
    Image img2 = Image.FromFile(imgFilePath2);
    Bitmap newImg = new Bitmap(img1.Width + img2.Width, (img1.Height > img2.Height) ? img1.Height : img2.Height);
    Graphics g = Graphics.FromImage(newImg);
    g.Clear(Color.Blue);
    g.DrawImageUnscaled(img1, 0, 0);
    g.DrawImageUnscaled(img2, img1.Width, 0);newImg.Save(yourPath);
      

  3.   

    如果是水印的话,参看
    http://www.codeproject.com/csharp/water.asp
      

  4.   

    地區:北京
    年限:2年
    技術:.Net BS开发
    工資:avg>>5K + 福利,几乎不加班,工作开心,心情愉快。
    公司性質:汽车门户网站。 PS: 透露点消息,我们公司正在招.net BS开发人员,如果哪位同仁想换工作,是一个不错的机会选择,加[email protected] 说应聘即可!