I am having some errors with my code in check50. All of my code is on this gist.
- Grayscale -
expected "28 28 28\n", not "27 27 27\n"
inwithout whole number average
. I am using this
int average = round((image[y][x].rgbtBlue + image[y][x].rgbtGreen + image[y][x].rgbtRed) / 3);
which should be rounding. After this I just assign the values.
- Blur - It gives me a wrong value, but I can't identify the bug.
:( blur correctly filters middle pixel
expected "127 140 149\n", not "128 140 149\n"
- I don't know the error in these:
:( 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..."
:( sepia correctly filters more complex 3x3 image
expected "25 22 17\n66 5...", not "25 22 17\n66 5..."
:( sepia correctly filters 4x4 image
expected "25 22 17\n66 5...", not "25 22 17\n66 5..."
:( 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..."