I have a bitmap stocked as a unsigned char array, containing only 1 and 0; like this:
0 0 0 0 1 1 1 1
0 0 1 1 0 0 1 1
I wish to stock this in a compact way, so I wrote a function to convert this into hexadecimals. I'll stock this like:
0f33
My question now: with which function can I convert these characters back into my bitmap? when I have a pointer to the character "f", how can I convert that into the integer value 15? (I know a switch case would do the trick, but probably there is a better way?)