Tried the following (pseudo code, but you get the idea):
Gdiplus::Bitmap* image = Bitmap::FromStream(aPNGStream);
image->LockBits(...)
result bitmapData->Scan0, looked like it was intialized to green 0x00
0x00 0xff 0x00. (argb)
Then tried something like :
using namespace Gdiplus;
HBITMAP bm = NULL;
Color bgc;
Bitmap* image = Bitmap::FromStream(aPNGStream);
image->GetHBITMAP(bgc, &bm);
DIBSECTION dibSec;
memset(&dibSec, 0, sizeof(DIBSECTION));
GetObject(bm, sizeof(DIBSECTION), &dibSec);
and got same result.
is there any way to convert a Gdiplus::Bitmap to a DIB ?
LockBits() will get you the DIB format bits, then you just add
a BITMAPINFO and you'll have a DIB.
Thanks,
- John
Microsoft Developer Support
This posting is provided "AS IS" with no warranties, and confers no rights.
Visit http://www.microsoft.com/security for current information on security.