May 15th, 2010, 08:48 PM
Getting pixels from Windows DIB with no BITMAPFILEHEADER?
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:
mrDIBInfo gives me a structure as such:
HBITMAP mrDIB = (HBITMAP)GlobalLock(imageData); //'imageData' is a HANDLE
BITMAPINFO* mrDIBInfo = (BITMAPINFOHEADER*)mrDIB;
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.
Click Here to Expand Forum to Full Width
This a Codeguru.com survey!