x64 Assembly and C++ Tutorial 23: C++ Adjust Brightness

We’ll be coding the C version of our Adjust Brightness algorithm. We will lock the pointers to the bitmap pixels, adjust the brightness, unlock them and display. You could adjust the brightness with GetPixel and SetPixel but it would be impossibly ’d be talking minutes I suspect. Locking and Unlocking managed memory is the most important aspect of this tutorial. If memory is not locked, Windows might reallocate the pointer mid-way through our algorithm. This would be a disaster. It’s important to
Back to Top