title: save image buffer as bitmap image
body: <p>I have a image buffer stored as a linear array[640*480] of unsigned integer type, and I want to save this array as a bitmap image which can be viewed. I have captured an image from my camera and retrieved its image buffer from a GigE cable using in c++ code. So please tell me how to write an integer array of RGB values to Bitmap in C++ along with the header files required. I have stream buffer as                                                    </p>
  
  <pre><code>if (Result.Succeeded())
              {
                  // Grabbing was successful, process image
                  cout &lt;&lt; "Image #" &lt;&lt; n &lt;&lt; " acquired!" &lt;&lt; endl;
                  cout &lt;&lt; "Size: " &lt;&lt; Result.GetSizeX() &lt;&lt; " x "
                  &lt;&lt; Result.GetSizeY() &lt;&lt; endl;
  
                  // Get the pointer to the image buffer
              const unsigned int *pImageBuffer = (int *) Result.Buffer();
  </code></pre>
  
  <p>the pImagebuffer is the image Buffer and please ignore the Functions as they belong to a custom compiler. I just want to convert the RGB values to bitmap image <strong>and then save it</strong>
  also the pImageBuffer is giving me the R=G=B as photo is mono chrome.</p>