cpp: test: Test writing and reading of all pixel types