title: How to stretch a Bitmap to fill a PictureBox
body: <p>I need to stretch various sized bitmaps to fill a PictureBox.
  <code>PictureBoxSizeMode.StretchImage</code> sort of does what I need but can't think of a way to properly add text or lines to the image using this method. The image below is a 5x5 pixel Bitmap stretched to a 380x150 PictureBox.</p>
  
  <p><img src="https://i.stack.imgur.com/eSN5U.jpg" alt="using pictureBox.SizeMode = PictureBoxSizeMode.StretchImage"></p>
  
  <pre><code>pictureBox.SizeMode = PictureBoxSizeMode.StretchImage;
  pictureBox.Image = bmp;
  </code></pre>
  
  <p>I tried adapting <a href="https://stackoverflow.com/questions/1082884/how-do-you-resize-a-bitmap-under-net-cf-2-0/1082890#1082890">this example</a> and <a href="https://stackoverflow.com/questions/1096553/stretch-bitmap-without-anti-aliasing/1096627#1096627">this example</a> this way</p>
  
  <pre><code>using (var bmp2 = new Bitmap(pictureBox.Width, pictureBox.Height))
  using (var g = Graphics.FromImage(bmp2))
  {
      g.InterpolationMode = InterpolationMode.NearestNeighbor;
      g.DrawImage(bmp, new Rectangle(Point.Empty, bmp2.Size));
      pictureBox.Image = bmp2;
  }
  </code></pre>
  
  <p>but get this</p>
  
  <p><img src="https://i.stack.imgur.com/OuUhZ.jpg" alt="using g.DrawImage(bmp, new Rectangle(Point.Empty, bmp2.Size))"></p>
  
  <p>What am I missing?</p>