32-bit support and bugfixes in BMP viewer