title: C# Combining two Images - Scaling
body: <p>I've tried to code a tool which combines two images and saves it as one.
  So my images were like this:
  <a href="https://i.stack.imgur.com/foipJ.png" rel="nofollow noreferrer">First digit</a>
  and
  <a href="https://i.stack.imgur.com/KQV8A.png" rel="nofollow noreferrer">Second digit</a>
  You can see, I left some space on the right for digit 1 and some space on the left for digit 2. Both of the images are 1920x1080</p>
  
  <p>But when I'm combining these, I'm getting something like that:
  <a href="https://i.stack.imgur.com/WsysO.png" rel="nofollow noreferrer">Both digits</a>
  Thats my code:</p>
  
  <pre><code>    private void CombineTwo(Image source1, Image source2, string FileName1, string FileName2)
      {
          Image target = new Bitmap(1920, 1080);
          Graphics graphics = Graphics.FromImage(target);
          graphics.CompositingMode = CompositingMode.SourceOver;
          graphics.DrawImage(source1, 0, 0);
          graphics.DrawImage(source2, 0, 0);
          graphics.Save();
          string desktop = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
          string path = desktop + "\\1&amp;2\\" + FileName1[0] + FileName2[0] + ".png";
          target.Save(@path, ImageFormat.Png);
      }
  
      private void Form1_Load(object sender, EventArgs e)
      {
          for(int i1 = 0; i1 &lt;= 0; i1++)
          {
              for(int i2 = 0; i2 &lt;= 9; i2++)
              {
                  string desktop = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
                  string path1 = desktop + "\\1\\" + i1 + ".png";
                  string path2 = desktop + "\\2\\" + i2 + ".png";
                  CombineTwo(Image.FromFile(@path1), Image.FromFile(@path2), i1 + "", i2 + "");
              }
          }
      }
  </code></pre>
  
  <p>So it seems like, there is something wrong with scaling I guess, whats the problem?</p>