handle pixel-format correctly