My code is posted here: https://gist.github.com/themattmcguire/1ee1a683fe2e22ff1b7b4ef8cebe120b
My code correctly works on all the stock images, for all the functions (grayscale, sepia, reverse, and blur), however, the check50 is only giving me 7 out of 22 correct. I'm sure I built my code in a roundabout way, but I'm not sure why it's failing these checks since it achieves the desired function.
I'm not really sure where to start looking for issues, since the output comes out fine. Any help would be appreciated on this fellows!
These are the errors I receive when I run the code through the CS50 Check:
:) helpers.c exists
:) filter compiles
:) grayscale correctly filters single pixel with whole number average
:( grayscale correctly filters single pixel without whole number average expected "28 28 28\n", not "27 27 27\n"
:) grayscale leaves alone pixels that are already gray
:) grayscale correctly filters simple 3x3 image
:( grayscale correctly filters more complex 3x3 image expected "20 20 20\n50 5...", not "20 20 20\n50 5..."
:( grayscale correctly filters 4x4 image expected "20 20 20\n50 5...", not "20 20 20\n50 5..."
:( sepia correctly filters single pixel expected "56 50 39\n", not "55 49 38\n"
:( sepia correctly filters simple 3x3 image expected "100 89 69\n100...", not "100 88 69\n100..."
:( sepia correctly filters more complex 3x3 image expected "25 22 17\n66 5...", not "24 22 17\n65 5..."
:( sepia correctly filters 4x4 image expected "25 22 17\n66 5...", not "24 22 17\n65 5..."
:( reflect correctly filters 1x2 image expected "0 0 255\n255 0...", not "3 0 0\n0 0 255..."
:( reflect correctly filters 1x3 image expected "0 0 255\n0 255...", not "207 25 225\n0 ..."
:( reflect correctly filters image that is its own mirror image expected "255 0 0\n255 0...", not "0 255 0\n255 0..."
:( reflect correctly filters 3x3 image expected "70 80 90\n40 5...", not "110 130 140\n4..."
:( reflect correctly filters 4x4 image expected "100 110 120\n7...", not "110 130 140\n1..."
:( blur correctly filters middle pixel expected "127 140 149\n", not "126 140 149\n"
:) blur correctly filters pixel on edge
:) blur correctly filters pixel in corner
:( blur correctly filters 3x3 image expected "70 85 95\n80 9...", not "70 85 95\n80 9..."
:( blur correctly filters 4x4 image expected "70 85 95\n80 9...", not "70 85 95\n80 9..."