file-bmp: Fix final bfSize patched into BMP header (#737669)

(cherry picked from commit db18c1f172be871fd5758d7d8ee6da447468696f)
file-bmp: Use cleaner serialization (sign)

(cherry picked from commit bcf16161e60ed9e3caac9dda891257abf0ada94c)