static uint SwapBytes(uint i) { i = (i << 16) | (i >> 16); i = ((i << 8) & 0xff00ff00) | ((i >> 8) & 0x00ff00ff); return i; }