How to handle image data byte-order?

ByteOrder class is defined to handle data byte-orders: