title: Save an RGB24 sample to bitmap
body: <p>I'm using Windows Media Foundation to do some messing around with my webcam. I've been able to successfully retrieve a data sample from the webcam and identify that the format is RGB24. Now I'd like to save a single frame as a bitmap. A small snippet of the code I'm using to read a sample from the webcam is below.</p>
  
  <pre><code>IMFSample *pSample = NULL;
  
  hr = pReader-&gt;ReadSample(
     MF_SOURCE_READER_ANY_STREAM,    // Stream index.
     0,                              // Flags.
     &amp;streamIndex,                   // Receives the actual stream index. 
     &amp;flags,                         // Receives status flags.
     &amp;llTimeStamp,                   // Receives the time stamp.
     &amp;pSample                        // Receives the sample or NULL.
   );
  </code></pre>
  
  <p>So once I've got pSample populated with an IMFSample how can I save it as a bitmap?</p>