title: Windows Programming: ID2D1Bitmap Interface - Getting the Bitmap Data
body: <p>I've been writing my own library of functions to access some of the new Direct2D Windows libraries. In particular, I've been working on the ID2D1Bitmap interface. I wanted to write a function to return a pointer to the start of the bitmap data (for the editing of particular pixels, or custom encoding or whatever else I might wish for in the future). Unfortunately... problem ahead...</p>
  
  <p>I can't seem to find a way to get access to the raw pixel data from the ID2D1Bitmap Interface.</p>
  
  <p>Does anyone have an idea how to access this? One of my friends suggested drawing the bitmap to a surface and extracting the bitmap data from there. I don't know if this would work. It definitely seems inefficient and I wouldn't know which kind of surface to use.</p>
  
  <p>Any help is appreciated. (c++ in particular, but I assume the code won't be tooo different between languages)</p>
  
  <p>(I know I could just read in the data direct from the file, but I'm using the WIC decoders which means it could be in any number of indecipherable formats)</p>