BitmapData bitmapData_new;
Rect rect(0, 0, pImage->width, pImage->height);
pImage->pBitmap->LockBits(&rect,
ImageLockModeWrite,
PixelFormat8bppIndexed,
&bitmapData_new);
memcpy( bitmapData_new.Scan0,pImage->data, pImage->height * bitmapData_new.Stride);
pImage->pBitmap->UnlockBits(&bitmapData_new);
上述代码实现的功能是将*data中的数据更新到pBitmap中