Added support for fixing aspect ratio if the bitmap size does not match the window size