Original Post
Hello, I am trying to write a program that takes a screen capture of a video game and analyzes the contents. To do this, the bitmap of the capture is saved into a GDI CBitmap. The problem I'm having is in extracting the pixel data from the CBitmap. It seems that since the bitmap is not device independent, I can not wrap attach the bitmap to a CImage in order to use CImage::GetPixel method. I am very stumped on this problem, the only way around it, is that I use CImage::Save method to save the screenshot into a .bmp file, then load the .bmp file. When the bitmap is saved, it's saved as a device independent bitmap, so when it's reloaded I am able to use CImage::GetPixel. It works, but it's really slow and it's probably a very terrible method to use. If anyone who is familiar with device dependent bitmaps and knows how I can extract individual pixels at exact coordinates from a CBitmap object, I'd appreciate all the help and info you can share.