getpixel alternative?
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?
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.
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.
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement