i made a program that uses the colors of pixels from the screen but getpixel is slow so is there a better way to find the color of pixels. i don't care if i get the fu开发者_JS百科ll screen or one pixel at a time but the main thing is speed.
This depends entirely on what you need to do. If you only need one pixel, then use GetPixel--it may be slow, but who cares when you only need one? If you are trying to capture a whole region of the screen, though, then there are screen capture APIs you can use. Once you have the screen capture, you can pick out whatever pixels you want.
BitBlt is pretty fast. It also allows you to specify a region to be copied, so you don't have to copy pixels you don't want.
精彩评论