Fix endianness assumption, make PIXELFORMATs readonly.