frontend: Fix colorspace conversion routines on big-endian