Finished the bit masking
Though now I wonder if it should be an XOR instead of just overwriting the bits. That way you need the exact original, XOR with the verion that has the stego data hidden in order to extract it. As written now, you don't need the original image you can just pull the 8 bits per 32-bit pixel out and reconstruct the stego data (though it could still be encrypted). Maybe I'll make both functions and provide a command line switch as to whether the original image is required to decode the stego data.
Removed the extraneous data modification in main
I'd unintentionally left in a loop to modify the data before writing it out. removed that in favor of using the text file merge function which seems to be working. Next up is to create an XOR version of the merge, which will require the original image to properly extract the stego data.