Here is some code for a bitmap along with a main to test it. This has two functions.

Here is the code. Do whatever you want with it.