title: Bitmap.GetPixel() returns bad value
body: <p>I'm having some trouble reading back pixel values from a Bitmap that I'm generating.  I first generate a bitmap named maskBitmap in my class  using this code:</p>
  
  <pre><code>    void generateMaskBitmap()
      {
          if (inputBitmap != null)
          {
              Bitmap tempBitmap = new Bitmap(inputBitmap.Width, inputBitmap.Height, System.Drawing.Imaging.PixelFormat.Format32bppArgb);
              using (Graphics g = Graphics.FromImage(tempBitmap))
              {
                  Brush brush = Brushes.Black;
                  for (int y = 0; y &lt; tempBitmap.Height; y += circleSpacing)
                  {
                      for (int x = 0; x &lt; tempBitmap.Width; x += circleSpacing)
                      {
                          g.FillEllipse(brush, x, y, circleDiameter, circleDiameter);
                      }
                  }
                  g.Flush();
              }
  
              maskBitmap = (Bitmap)tempBitmap.Clone();
          }
      }
  </code></pre>
  
  <p>I then try to apply the mask to my original image using the following code:</p>
  
  <pre><code>    void generateOutputBitmap()
      {
          if (inputBitmap != null &amp;&amp; maskBitmap != null)
          {
              Bitmap tempBitmap = new Bitmap(inputBitmap.Width, inputBitmap.Height);
              for (int y = 0; y &lt; tempBitmap.Height; y++)
              {
                  for (int x = 0; x &lt; tempBitmap.Width; x++)
                  {
                      Color tempColor = maskBitmap.GetPixel(x, y);
  
                      if (tempColor == Color.Black)
                      {
                          tempBitmap.SetPixel(x, y, inputBitmap.GetPixel(x, y));
                      }
                      else
                      {
                          tempBitmap.SetPixel(x, y, Color.White);
                      }
                  }
              }
              outputBitmap = tempBitmap;
          }
      }
  </code></pre>
  
  <p>The mask bitmap is successfully generated and visible in a picture box, however the color values for every pixel when testing "<code>tempColor</code>" show empty (A = 0, R = 0, G = 0, B = 0).  I am aware of the performance problems with getpixel/setpixel, but this is not an issue for this project.  I'm also aware that <code>"tempColor == Color.Black"</code> is not a valid test, but that is just a place holder for my comparison code.</p>