Check50 is failing my code and I am out of options to troubleshoot this. Any help from the community is greatly appreciated.
I have compared different resizing factors for small.bmp
and smiley.bmp
between my code and the staff. There is not a single difference using diff and peek:
-rw-------. 1 jharvard students 3661 Sep 5 22:43 resize.c
-rw-------. 1 jharvard students 174 Sep 5 23:02 small-by2-staff.bmp
-rw-------. 1 jharvard students 174 Sep 5 23:02 small-by2-stud.bmp
-rw-------. 1 jharvard students 306 Sep 5 23:02 small-by3-staff.bmp
-rw-------. 1 jharvard students 306 Sep 5 23:03 small-by3-stud.bmp
-rw-------. 1 jharvard students 822 Sep 5 23:04 smiley-by2-staff.bmp
-rw-------. 1 jharvard students 822 Sep 5 23:03 smiley-by2-stud.bmp
-rw-------. 1 jharvard students 1782 Sep 5 23:04 smiley-by3-staff.bmp
-rw-------. 1 jharvard students 1782 Sep 5 23:05 smiley-by3-stud.bmp
jharvard@appliance (~/Dropbox/pset5/bmp): diff small-by2-staff.bmp small-by2-stud.bmp
jharvard@appliance (~/Dropbox/pset5/bmp): diff small-by3-staff.bmp small-by3-stud.bmp
jharvard@appliance (~/Dropbox/pset5/bmp): diff smiley-by2-staff.bmp smiley-by2-stud.bmp
jharvard@appliance (~/Dropbox/pset5/bmp): diff smiley-by3-staff.bmp smiley-by3-stud.bmp
check50 fails here:
:) resize.c and bmp.h exist
:) resize.c compiles
:) doesn't resize 1x1-pixel BMP when n is 1
:) resizes 1x1-pixel BMP to 2x2 correctly when n is 2
:) resizes 1x1-pixel BMP to 3x3 correctly when n is 3
:) resizes 1x1-pixel BMP to 4x4 correctly when n is 4
:) resizes 1x1-pixel BMP to 5x5 correctly when n is 5
:( resizes 2x2-pixel BMP to 4x4 correctly when n is 2 <------- Failure
https://sandbox.cs50.net/checks/9be673944671478f97cfcdeb563389e7