Cycle through the bitmap negating each pixel

The algorithm for negating a pixel is straightforward and totally reversible.

To negate a pixel:

To reverse the process and restore the pixel to its normal value: