How can i create from two images a new image wich inside there will be the two images side by side?
<p>I tried this code:</p>

<pre><code>private void CreateAnimatedGif(string FileName1 , string FileName2)
        {
            Bitmap file1 = new Bitmap(FileName1);
            Bitmap file2 = new Bitmap(FileName2);
            Bitmap bitmap = new Bitmap(file1.Width + file2.Width, Math.Max(file1.Height, file2.Height));
            using (Graphics g = Graphics.FromImage(bitmap))
            {
                g.DrawImage(file1, 0, 0);
                g.DrawImage(file2, file1.Width, 0);
            }
            bitmap.Save(@"d:\test.gif", System.Drawing.Imaging.ImageFormat.Gif);
        }
</code></pre>

<p>In general it's working. But the result is not good enough.</p>

<ol>
<li><p>The first image since the code try to make it in same size in the heght I see some black space on the bottom.</p></li>
<li><p>The second image is bigger then the first one. The second image is on the right. So I need that it will make the left image the first one to be the same size/resolution of the second one.</p></li>
</ol>

<p>How can I fix this code for that ?</p>

<p>This is an example of the new image result after combined the two. And why it's not good as I wanted:</p>

<p><img src="http://i.stack.imgur.com/7IqC7.gif" alt="enter image description here"></p>
