Need help with bitmap
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums
Results 1 to 2 of 2

Thread: Need help with bitmap

  1. #1
    Join Date
    Oct 2003

    Unhappy 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 [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,


  2. #2
    Join Date
    Aug 2001
    Sydney, Australia
    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

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

This is a survey!

HTML5 Development Center