So i am having difficulty understanding why check50 fails here.
I have tested my image result by looking at its properties and it is re-sized correctly and looks the same as the image file I chose to re-size (only its obviously bigger).
Yet i fail every step of the check 50:
:) 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
I don't know why this would fail. I can only guess its when setting up the info and file headers.
Removed non-relevant code to highlight the code that was wrong.
This is what I have for my code, is there any mistakes I have made?
// set header size
bi_new.biSizeImage = (bi_new.biWidth * sizeof(RGBTRIPLE)) + (newPadding * abs(bi_new.biHeight));
bf_new.bfSize = bf.bfSize - bi.biSizeImage + bi_new.biSizeImage;