I usually, on Mac, do this task with https://www.cockos.com/licecap/ (source: https://github.com/justinfrankel/licecap). It also runs on Windows.
LICEcap can capture an area of your desktop and save it directly to .GIF (for viewing in web browsers, etc).
GUI is simple but effective, and it's really easy to select just the area you want to capture.
Demo
Output