October 12th, 2003, 08:02 PM
Need help with bitmap
Thnaks for taking time to read my message.
Ok here is my problem, i have an application in which i have a control (OCX from quickcam SDK) that saves a DIBitmap to a memory location. The bitmap is always a fixed resolution (320*240) and 24bit RGB. I need to access the invidual pixel data to convert the values to greyscale and store them in a  elements standard array for some statistical processing.
Firstly am i to assume that there is no BITMAPFILEHEADER? and if not how will i determine where the offset of the pixel data starts?
Is it possible to use a pointer somehow to access the data and how would i do this. Id prefer to do it this way than use some type of classes.
Anyway, Thanks in advance,
October 12th, 2003, 08:45 PM
Firstly, what your asking goes a little beyond the scope of a quick answer because theres a few different ways to access DIB bits.
First find where exactly the bitmap data is stored and look at the data type. Most of the time they are LPVOID's, which means you need to know how big it is to use that, and I see you already have that info.
Start off with that and then making the image greyscale is very easy compared to that.
Microsoft LVP - Least Valuable Professional
Please rate this post... Pleeeeeeaaassee!!!
Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.