Check50 is giving an ok for resizing a 1x1 pixel bmp when n is 1,4, and 5 but not the others. Not sure what's going wrong.
Made this again because I thought I knew what the problem was. For some reason padding was added to the end of each scanline when I didn't correctly implement it. Now that, I think, its fixed check50 still gives errors.
// changes the biWidth and biHeight to match the new size bi.biWidth *= n; bi.biHeight *= n; // determine padding for scanlines // padding for infile //int infilepadding = (4 - (bi.biWidth / n * sizeof(RGBTRIPLE)) % 4 ) % 4; int infilepadding = (4 - (bi.biWidth / n % 4) ) % 4 * sizeof(RGBTRIPLE); // padding for outfile //int padding = (4 - (bi.biWidth * sizeof(RGBTRIPLE)) % 4) % 4; int padding = (4 - (bi.biWidth % 4) ) % 4 * sizeof(RGBTRIPLE);