tests: Fix image writing on big endian
The code tried to only write the RGB bytes of FORMAT_RGB24, however, the in-memory layout is different on big-endian which would result in the wrong bytes being written.
Fix this by simply also writing the byte we do not care about.