Working on resize (more version) problem set from Week 4.
Having reviewed other solutions, and using debug50, peek, and diff, I'm having trouble identifying what in my code is leading to this error.
When I run
./resize f infile outfile, where, for example values are
./resize 4 smiley.bmp test.bmp, the outfile, or in this case test.bmp is corrupted. I try to open it and get an error
invalid or unsuported file.
Trying to run debug50 just returns 1; peek returns error
Could not recognize test.bmp, and diff returns
binary files smiley.bmp and test.bmp differ.
Code is here: https://www.pastiebin.com/5903c9a7aa684