pyScreenCapture is a tool to capture video (with cursor) using Python. It is ideal for creating short animated GIFs demonstrating how small programs work. I often use it in combination with ImageJ (to crop and save as animated GIF).
A more feature-rich solution is: https://github.com/NickeManarin/ScreenToGif
- tested in Anaconda (Python 3) on Windows 10
- takes screenshots with
PIL.ImageGrab
- captures cursor with win32gui.GetCursorPos()
- supports Windows DPI scaling using
SetProcessDPIAware
- Capture: Just run go.py and it will capture video as a series of BMP files and save them in the
./output/
folder. Modify the script to set the number of captures and the frame rate. - Edit/Crop: Drag the entire
./output/
folder icon onto FIJI / ImageJ and it will open as an image sequence. You can then crop/modify the image (if desired). - Saving as GIF: In FIJI / ImageJ click File > Save As > Animated GIF