Set pixel format correctly.