• Advertisement
Sign in to follow this  

getpixel alternative?

This topic is 4588 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

via a dibsection, how do I load a bitmap in, copy it to a dib section, then read the buffer in a similar way to doing the getpixel method?

Share this post


Link to post
Share on other sites
Advertisement
I've loaded the bitmap.
I've created a dib section.
I've bitblt'd the bitmap to the dib section.

I try to read the pointer from the createdibsection function call, eg:

invoke CreateDIBSection, bDc, edx, DIB_RGB_COLORS, addr pBb, 0, 0

Same API as used in VB as in C/C++, nothing new here. When I go to read from
pBb, it gives me an error. Maybe because I don't have memory allocated to it.

How do I read the values from the bitmap I copied into the dibsection? I could use GetPixel but I understand that is slow.

Share this post


Link to post
Share on other sites
Not exactly what you are asking for (it is too hot to actually look something up right now, sorry), but I usually use GetDIBits for these things.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement