BMP encoding: simplify padding computation