I'm having a bit of a hard time understanding certain lines of code in copy.c. For example below:
// skip over padding, if any
fseek(inptr, padding, SEEK_CUR);
// then add it back (to demonstrate how)
for (int k = 0; k < padding; k++)
{
fputc(0x00, outptr);
}
If padding is so important since each scanline of a BMP file has to be a multiple of 4 bytes, why is copy.c skipping over padding? Then why and how is it able to add it back to the bitmap?
Also, what does this look like visually? Is padding always placed at the end of each scanline?