Add fn for extracting a rectangle from the center of an image