title: create bitmap with filestream
body: <p>I need to create a bitmap with a filestream. So far I have this Code:</p>
  
  <pre><code> using (FileStream bmp = File.Create(@"C:\test.bmp"))
          {
              BinaryWriter writer = new BinaryWriter(bmp);
              int i = 0;
  
            //  writer.Write((char*)&amp;fileheader, sizeof(fileheader));
            //  writer.Write((char*)&amp;infoheader, sizeof(infoheader));
  
              for (int rows = 0; rows &lt; 160; rows++)
              {
                  for (int cols = 0; cols &lt; 112; cols++)
                  {
                      writer.Write(CamData[i]);
                      i++;
                  }
              }
  
              bmp.Close();
          }
  </code></pre>
  
  <p>but I still need the header Informations for the bitmap. My Problem is, that I dont know how to implement they in C#. I know the resolution (320 x 240 ) and my pixeldata are 16 bit grayscale values given in a ushort array.</p>
  
  <p>thanks</p>