Re: How to read rectangular part of screen, pixel-by-pixel?
- Posted by TheresNoTime Jun 23, 2013
- 1471 views
jimcbrown said...
GetDC is the correct function to do this.
You can BitBlt from the value returned by GetDC to a screen buffer created by CreateCompatibleDC - color.exw does this. You should be able to read the values from there.
I think there are too many intermediate transformations. Is it possible to copy the data from the Device Context directly to the sequence? I assume that this will turn out a one-dimensional array, where the pixels are following each other. May be, with some trash data (BMP header?). I would arrange it.