So, here are the header calculations:
// read infile's BITMAPFILEHEADER in two variables BITMAPFILEHEADER bf;
// bfOutput = the resized file's heade
BITMAPFILEHEADER bfOutput;
fread(&bf, sizeof(BITMAPFILEHEADER), 1, inptr);
// setting the cursor to the beginning of inputr, to read the same stuff
fseek(inptr, 0, SEEK_SET);
fread(&bfOutput, sizeof(BITMAPFILEHEADER), 1, inptr);
// read infile's BITMAPINFOHEADER
BITMAPINFOHEADER bi;
// same as above
BITMAPINFOHEADER biOutput;
fread(&bi, sizeof(BITMAPINFOHEADER), 1, inptr);
// setting the cursor after the fileheader
fseek(inptr, sizeof(BITMAPFILEHEADER), SEEK_SET);
fread(&biOutput, sizeof(BITMAPINFOHEADER), 1, inptr);
biOutput.biWidth = biOutput.biWidth * size;
biOutput.biHeight = biOutput.biHeight * size;
// determining the paddign for the large bmp
int paddingOutput = (4 - (biOutput.biWidth * sizeof(RGBTRIPLE)) % 4) % 4;
//updating the file and image size info
biOutput.biSizeImage = (biOutput.biWidth * abs(biOutput.biHeight) * sizeof(RGBTRIPLE)) + (paddingOutput * abs(biOutput.biHeight));
bfOutput.bfSize = sizeof(BITMAPFILEHEADER) + sizeof(BITMAPINFOHEADER) + biOutput.biSizeImage;
// write outfile's BITMAPFILEHEADER
fwrite(&bfOutput, sizeof(BITMAPFILEHEADER), 1, outptr);
// write outfile's BITMAPINFOHEADER
fwrite(&biOutput, sizeof(BITMAPINFOHEADER), 1, outptr);
// determine padding for scanlines
int padding = (4 - (bi.biWidth * sizeof(RGBTRIPLE)) % 4) % 4;