Hi I know this has been asked many times as I've already checked with many similar threads. I have checked for many more hours on my code but still can't figure out what is wrong. Can anyone take a look at my code please? Thanks!
[mod: code hidden behind edit flag - per academic honesty rules]
I've put a lot of thought into the unit of bfSize & biSizeImage, and I think I've got it correct, including the unit & padding:
jharvard@appliance (~/Dropbox/CS50/pset4/bmp): ./resize 1 ./blue/1x1rev.bmp ./student/1-1235.bmpjharvard@appliance (~/Dropbox/CS50/pset4/bmp): ~cs50/pset4/peek ./blue/1x1rev.bmp ./student/1-1235.bmp offset type name argv argv 0 WORD bfType 4d42 4d42 2 DWORD bfSize 0000003a 0000003a 6 WORD bfReserved1 0000 0000 8 WORD bfReserved2 0000 0000 10 DWORD bfOffBits 00000036 00000036 14 DWORD biSize 00000028 00000028 18 LONG biWidth 00000001 00000001 22 LONG biHeight ffffffff ffffffff 26 WORD biPlanes 0001 0001 28 WORD biBitCount 0018 0018 30 DWORD biCompression 00000000 00000000 34 DWORD biSizeImage 00000004 00000004 38 LONG biXPelsPerMeter 00000000 00000000 42 LONG biYPelsPerMeter 00000000 00000000 46 DWORD biClrUsed 00000000 00000000 50 DWORD biClrImportant 00000000 00000000
But still I can't pass most of the check50 :(
jharvard@appliance (~/Dropbox/CS50/pset4/bmp): check50 2014.fall.pset4.resize bmp.h resize.c :) 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 https://sandbox.cs50.net/checks/5ece9f7acbb14451b0d59b4f247f63ec