C# WinForm 把两张图片合并成为一张,C#操作RGB值!

直接上代码
   Bitmap bmp1 = new Bitmap(Application.StartupPath + "\\A.jpg");
   Bitmap bmp2 = new Bitmap(Application.StartupPath + "\\B.jpg");
            using (Graphics g = Graphics.FromImage(bmp1))
            {
                Size size = new Size(bmp1.Width / 3, bmp1.Height / 3);
                Rectangle rect = new Rectangle(new Point(bmp1.Width - size.Width, 0), size);
                g.DrawImage(bmp2, rect, new Rectangle(0, 0, bmp2.Width, bmp2.Height), GraphicsUnit.Pixel);
                bmp1.Save(Application.StartupPath + "\\C.jpg");//保存为第三个文件
              
                this.pictureBox1.Image = bmp1;
            }

.NET C# 操作RGB值
System.Drawing.Color.FromArgb(255,0,0);

转载于:https://www.cnblogs.com/junjie94wan/archive/2012/03/19/2406166.html

你可能感兴趣的:(C# WinForm 把两张图片合并成为一张,C#操作RGB值!)