Closed Tahmeem closed 1 year ago
Personally I use GIMP to open the image files, a similar image modification software should do the trick
This is my guess, I could be wrong.
the vectors store unsigned chars, so the strings of 1s and 0s stored are interpreted as characters when you write them to the file. Maybe try to do something so that these strings are interpreted as integers.
@Ming-Yeung-Alfred-Meng is correct - unsigned chars are interpreted as ASCII characters and not numbers when printed, so you need to cast them to ints. Also, GIMP is a great program for viewing ppm files.
I'm having a issue where I don't understand why the values are special characters rather than ints and so I think my ppm files are being generated with the wrong thing. write_ppm is used in the other parts so if someone could explain why its these chars instead of ints in the vectors that would be helpful. Also Im guessing we open the ppm files in an image viewer to test out the code?