Use enum PixelFormat instead of int for srcFormat and dstFormat.