I found this code that works fine with pf24bit. How change to work with pf32bit (or any other PixelFormat)?
Edit:
For example if you get a screenshot, this code doesn’t apply effect in full bitmap width. To bitmap height it's ok.
I found this code that works fine with pf24bit. How change to work with pf32bit (or any other PixelFormat)?
Edit:
For example if you get a screenshot, this code doesn’t apply effect in full bitmap width. To bitmap height it's ok.
Copyright © 2021 Jogjafile Inc.

This is straightforward.
A 24-bpp image has format BGR and a 32-bpp image has format BGRA, where the alpha component is typically not used for anything. To blacken the bitmap, we simply ignore the A component.
So, 24 bits per pixel:
32 bits per pixel:
This is a direct translation.
But both versions can be written more elegantly: