日期:2014-05-17  浏览次数:21194 次

【分享】车牌自编效果预览软件【京牌】
免分下载地址:http://download.csdn.net/detail/comebeer/4936092

打算买车,想自己编号码,所以写了这个,没啥技术含量,代码就不上了,丢人啊。见笑了!

其中有多个pictureBox合并图像的代码,贴出来也许有人用得到!

        private void Save_Click(object sender, EventArgs e)
        {
            SaveFileDialog s = new SaveFileDialog();
            s.Title = "保存图像";
            s.Filter = "PNG(*.png)|*.png|JPEG(*.jpg)|*.jpg|BMP(*.bmp)|*.bmp";
            if (s.ShowDialog() == DialogResult.OK)
            {
                CombinImage(pictureBox1.Image, pictureBox2.Image, pictureBox3.Image, pictureBox4.Image, pictureBox5.Image, pictureBox6.Image, pictureBox7.Image).Save(s.FileName);
            } 
        }


 public static Image CombinImage(Image sourceImg, Image destImg1, Image destImg2, Image destImg3, Image destImg4, Image destImg5, Image destImg6)
        {
            Image imgBack = new System.Drawing.Bitmap(sourceImg); 
            Image img1 = new System.Drawing.Bitmap(destImg1); 
            Image img2 = new System.Drawing.Bitmap(destImg2);
            Image img3 = new System.Drawing.Bitmap(destImg3);
            Image img4 = new System.Drawing.Bitmap(destImg4);
            Image img5 = new System.Drawing.Bitmap(destImg5);
            Image img6 = new System.Drawing.Bitmap(destImg6);
       
            Graphics g1 = Graphics.FromImage(imgBack);
            Graphics g2 = Graphics.FromImage(imgBack);
            Graphics g3 = Graphics.FromImage(imgBack);
            Graphics g4 = Graphics.FromImage(imgBack);
            Graphics g5 = Graphics.FromImage(imgBack);
            Graphics g6 = Graphics.FromImage(imgBack);

            g1.DrawImage(img1, 33, 12, 21, 41);
            g2.DrawImage(img2, 69, 12, 21, 41);