bitmap: add endianness casts