-
May 15th, 2010, 08:48 PM
#1
Getting pixels from Windows DIB with no BITMAPFILEHEADER?
Hi,
I am new to Windows programming, but have been given a handle to a Windows DIB and am not sure how to use it. Basically, I just want to retrieve a char* holding the pixel data for an image such that the origin is the top left corner and scanlines are stored.
Apparently, no BITMAPFILEHEADER is present and the data starts with BITMAPINFO:
Code:
HBITMAP mrDIB = (HBITMAP)GlobalLock(imageData); //'imageData' is a HANDLE
BITMAPINFO* mrDIBInfo = (BITMAPINFOHEADER*)mrDIB;
mrDIBInfo gives me a structure as such:
How can I get the start of the bitmap header data so I can assign its address to a char*?
Thank you in advance and sorry if I am unclear as this is really new to me.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|