patch_bmp bugfixes

1. Changed how the new width and height is calculated.
2. Scanline alignment buffering is not necessarily 0.