Tested. Works properly with a big-endian client where server host color depth is 16-bit, and client color depths are 32, 16, and 8-bit. Thank you.
Attaching diff file.
Black image sent when connecting with a big-endian client at lower color pixel formats