Prefer enum PixelFormat over int for the type of the format parameter