Sign in to follow this  
drarem

getpixel alternative?

Recommended Posts

drarem    100
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
drarem    100
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
pauljan    137
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this