Fix BMP header size
The bfSize member of BITMAPFILEHEADER is supposed to store the size of the BMP[1], and as such needs to be equal to the file size (for BMPs stored as files). Otherwise that may trip up readers; at least they may assume that the BMP is corrupted; e.g. ImageMagick warns about this.
While for compressed BMP images we actually calculate the size as we go, for uncompressed BMP images we calculate the size in advance, but so far did not account for padding of the rows.
We also fix the biSizeImage of the BITMAPINFOHEADER[2] accordingly.
[1] https://learn.microsoft.com/en-us/windows/win32/api/wingdi/ns-wingdi-bitmapfileheader [2] https://learn.microsoft.com/en-us/windows/win32/api/wingdi/ns-wingdi-bitmapinfoheader
Ubuntu and macOS CI failures are unrelated.
The CI failures are unrelated again (note that there are occassional segfaults on MinGW for different tests; that might justify some further investigation).
Rebased and force-pushed to get CI green (at least Ubuntu should be fixed in the meantime).