image-copy: Move duplicate code to a `cursor_capture_constraints()`