怎么将Bit地图中的数据提取到Byte[]中

如何将Bitmap中的数据提取到Byte[]中
RT
网上很多例子都说使用GetDIBits,可是很多参数我都是浪费的。

难道为了提取Byte,还要自己创建DC什么的吗?

反之Byte[]转Bitmap就很容易了。。


------解决方案--------------------
pBmp->LockBits(
        &rect,
        Gdiplus::ImageLockModeRead 
------解决方案--------------------
 Gdiplus::ImageLockModeWrite,
        pBmp->GetPixelFormat(),
        bmpData);

 这里最后一个是out型的,需要传入pointer
即   &bmpData