Hana bmp decode with bitwise ops