title: Adding a frame to an Image (Bitmap) and Saving it - Error in Border
body: <p>I am trying to open an image, add a border to it and save the image in C#.</p>
  
  <p>I got a code, I guess it was an answer from stack overflow. Here it is:</p>
  
  <pre><code>    public Bitmap AddBorder(Bitmap image, Color color, int size)
      {
          Bitmap result = new Bitmap(image.Width + size * 2, image.Height + size * 2);
          Graphics g = Graphics.FromImage(result);
          g.Clear(color);
          int x = (result.Width - image.Width) / 2;
          int y = (result.Height - image.Height) / 2;
          g.DrawImage(image, new Point(x, y));
          g.Dispose();
          return result;
      }
  </code></pre>
  
  <p>I save the image using:<code>resultimage.save(fileName);</code></p>
  
  <p>I tested it with an image 5MP in size. And saved the image to the disk. But there is an error.</p>
  
  <p>The result has a border in left side of it and on top of it. The image seems to be zoomed. For example the saved image would miss parts of it (from right size and bottom).</p>
  
  <p>Am I doing any thing wrong?</p>
  
  <p>Thanks in advance.</p>