Fix some icc warnings by using enum PixelFormat instead of int where appropriate.