title: C# Copy bitmap's pixels in the alpha channel on another bitmap
body: <p>I have two bitmaps, one containing a "normal" picture and another one containing a grayscale image.</p>
  
  <p>My goal is simply to place the grayscale image in the alpha channel of first bitmap in order to use the grayscale image like a mask.</p>
  
  <p>I have seen some solutions to do this by using SetPixel but it's pretty slow and creates some weird artifacts on the final image due to errors in the memory allocation.</p>
  
  <p>So maybe a way to do this will be by browsing all the pixels form the original bitmap and assign-it the corresponding pixel from the grayscale bitmap in the alpha channel. Maybe with a LockBits pixel array?</p>
  
  <p>So my question is how to do that? I have especially difficulties to find how to assign a pixel in the alpha channel and how to get the corresponding pixel in the grayscale bitmap.</p>