Fixed but with getNumberFromBits.
Completely reworked putBitsIntoImage function and created new putBitsIntoRGB function.
Got rid of compiler warnings.