-
October 12th, 2003, 08:02 PM
#1
Need help with bitmap
HI,
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 [320][240] 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,
Donraws
-
October 12th, 2003, 08:45 PM
#2
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!!!
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
|