Exemple #1
0
 public static System.Drawing.Image CombinImage(System.Drawing.Image imgBack, System.Drawing.Image img)
 {
     if (img.Height != 65 || img.Width != 65)
     {
         img = GetQRCode.KiResizeImage(img, 250, 250, 0);
     }
     System.Drawing.Graphics graphics = System.Drawing.Graphics.FromImage(imgBack);
     graphics.DrawImage(imgBack, 0, 0, imgBack.Width, imgBack.Height);
     graphics.DrawImage(img, imgBack.Width / 2 - img.Width / 2 + 10, imgBack.Width / 2 - img.Width / 2 + 85, 136, 136);
     System.GC.Collect();
     return(imgBack);
 }
Exemple #2
0
        public static Image CombinImage(Image imgBack, Image img)
        {
            if (img.Height != 65 || img.Width != 65)
            {
                img = GetQRCode.KiResizeImage(img, 250, 250, 0);
            }
            Graphics graphic = Graphics.FromImage(imgBack);

            graphic.DrawImage(imgBack, 0, 0, imgBack.Width, imgBack.Height);
            graphic.DrawImage(img, imgBack.Width / 2 - img.Width / 2 + 10, imgBack.Width / 2 - img.Width / 2 + 85, 136, 136);
            GC.Collect();
            return(imgBack);
        }