If you are experiencing the same problem where the unsigned char saved to be ascii characters not numbers and the images appeared to be black, you can do any of the following:
Cast them to integers.
Use to_string to convert and save them.
Add a plus sign in front of the variables to force conversion when you write to file using std fstream.
Confirmed with professor that any above approach is fine as long as the image shows.
Hope this helps.
If you are experiencing the same problem where the unsigned char saved to be ascii characters not numbers and the images appeared to be black, you can do any of the following:
Confirmed with professor that any above approach is fine as long as the image shows. Hope this helps.