Revert "fix pixelFormat handling"

This reverts commit 77e388671aac2759b12df941ffaa6cae3e413812.