Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Faster Way to change pixels than SetPixel()

I have been trying to use SetPixelV for windows to display an image directly on the screen, as I am sure you know it is unbearably slow, and too slow for what I wan't to use it for. Could anyone point me in the right direction of how to Display Directly to the Screen (not in a window) that is faster the SetPixelV? (Does not have to be platform-independent)

like image 365
user1036756 Avatar asked Mar 13 '12 22:03

user1036756


3 Answers

You can build up your image in memory and use SetDIBitsToDevice to copy it.

like image 78
Mark Ransom Avatar answered Oct 13 '22 19:10

Mark Ransom


You could call BitBlt. That's assuming you already have the whole image — it doesn't set individual pixels (unless you blit a bunch of one-pixel images, but then you'd probably be in a worse position than where you started, speed-wise).

like image 2
Rob Kennedy Avatar answered Oct 13 '22 17:10

Rob Kennedy


Maybe BitBlit is what you're looking for.

like image 1
ebutusov Avatar answered Oct 13 '22 19:10

ebutusov